top of page

Univariate Data Analysis: concrete strength, 20 data

Updated: Sep 24, 2023

We have a dataset of 20 data, concrete strength.

We want to develop simple data analysis, including:

  • statistics of the samples

  • histograms

  • empirical cdf


import numpy as np import matplotlib.pyplot as plt import OpenStat as sta




data=np.loadtxt('concrete20.dat') d=sta.data1(data)

#d is the object collecting the dataset d.disp_summary()



edges=[23, 26, 29, 32, 35, 38, 41] edges=np.array(edges)

#Number of observations d.plot_hist(bins=edges,stat='count')

#bins=edges: limits of the bins #stat='count': number of observations at each bin #color='blue': color of the bars,41)'$f_c \ MPa$')'Concrete strength n=20')

#Relative frequency d.plot_hist(bins=edges, stat='probability')

#bins=edges: limits of the bins #stat='count': number of observations at each bin,41)'$f_c \ MPa$')'Concrete strength n=20')




#plot the empirical cdf,41),1)'$f_c \ MPa$')'ecdf')'Concrete strength n=20')

d.plot_quantile_emp() #plot the empirical quantile function'$probability$')'f_c \ MPa'),1),41)'$probability$')'$f_c \ MPa$')

Download TXT • 360B

30 views0 comments


bottom of page