2.13. GOODNESS-OF-FIT TEST:
2
TEST 95
pd—should be the same variable name as that in Equation (2.135).
0
Alpha
0
; value—is the significant level a and its value. e value of the significant level a
can be 0.10, 0.05, 0.01, and so on. However, the significant level a must be at least 0.10. If
the significant level a has a default value, that is, 0.05, the command in Equation (2.137)
can be used.
h—will be equal to 0 or 1. If h is equal to 0, the hypothesis should not be rejected; that
is, the sample data can be properly described by the assumed distribution. If h is equal to
1, the hypothesis should be rejected; that is, the sample data cannot be properly described
by the assumed distribution.
Example 2.47
A set of 100 sample data of material strength is listed in Table 2.14 and is stored in an Excel file
with the name “Example2-44.xls.” (1) Display its histogram. (2) Use the MATLAB program to
check whether it follows a lognormal distribution with a significant level a D 0:05. (3) Use the
MATLAB program to check whether it follows a Weibull distribution with a significant level
a D 0:05. (4) Use the MATLAB program to check whether it follows a normal distribution
with a significant level a D 0:05.
Table 2.14: One hundred sample data of material strengh (ksi)
12.47, 12.15, 22.01, 16.66, 10.57, 28.11, 27.98,47.46, 60.95, 17.63, 37.9,5.91, 9.69, 6.1, 13.82, 39.25, 44.65,
42.83, 85.33, 14.06, 8.13, 2.66, 23.99, 27.36, 23.28, 13.52, 63.75, 8.83, 158.65, 21.83, 16.04, 46.82, 20.22, 55.95,
74.14, 7.1, 37.27, 24.6, 48.51, 4.96, 49.78, 27.69, 77.36, 3.79, 19.79, 18.63, 23.9, 153.06, 27.72, 74.08, 9.89,6.99,
14.76, 10.07, 14.25, 30.84, 19.63, 9.34, 61.22, 10.37, 54.44, 32.57, 6.88, 41.54, 49.41, 30.09, 16.82, 29.09, 72.4,
36.42, 25.31, 9.25, 11.33, 10.06, 18.42, 23.85, 29.87, 38.07, 24.71, 56.74, 25.72, 3.92, 5.53, 37.66, 45.59, 17.19,
79.8, 6.51, 13.17, 15.55, 12.28, 13.91, 10.79, 38.44, 19.56, 3.86, 31.36, 27.29, 71.44, 24.31,
Solution:
1. Display its histogram.
e MATLAB program for display the histogram with a 10 bin is:
%Import the data from an Excel file
X=xlsread(‘Example 2.44’),
% Create a 10-bin histogram
histogram(X,10)