Professional Documents
Culture Documents
The values of observed frequency and expected frequency are shown in the
table. The 2 or Chi-square of random variable also can be calculated in this table
as follow.
Matlab Program
The values of observed frequency and expected frequency are shown in the
table. The 2 or Chi-square of random variable also can be calculated in this table
as follow.
The value of 2 is 2.722. By using confidence level or F(z) is 0.95 and degree of
freedom k-3 (for Gaussian distribution), from Chi-square distribution table (appendix
A) the value of 2,dof is 14,07. So, because 2 < 2,dof the random variable is valid as a
Gaussian random variable.
The values of observed frequency and expected frequency are shown in the
table. The 2 or Chi-square of random variable also can be calculated in this table
as follow.
The value of 2 is 12.594. By using confidence level or F(z) is 0.95 and degree
of freedom k-3 (for Gaussian distribution), from Chi-square distribution table
(appendix A) the value of 2,dof is 14,07. So, because 2 < 2,dof the random
variable is valid as a Gaussian random variable.
d. Gaussian random variable (100000,1)
Generating Gaussian random variable with 10.000 data and make a histogram
with 10 bins.
Matlab Program
The values of observed frequency and expected frequency are shown in the
table. The 2 or Chi-square of random variable also can be calculated in this table
as follow.
So, by using 2 or Chi-square goodness of fit test with the formula:
The value of 2 is 3.820. By using confidence level or F(z) is 0.95 and degree
of freedom k-3 (for Gaussian distribution), from Chi-square distribution table
(appendix A) the value of 2,dof is 14,07. So, because 2 < 2,dof the random
variable is valid as a Gaussian random variable.
The values of observed frequency and expected frequency are shown in the
table. The 2 or Chi-square of random variable also can be calculated in this table
as follow.
So, by using 2 or Chi-square goodness of fit test with the formula:
The value of 2 is 13.25. By using confidence level or F(z) is 0.95 and degree
of freedom k-3 (for Gaussian distribution), from Chi-square distribution table
(appendix A) the value of 2,dof is 18.31. So, because 2 < 2,dof the random
variable is valid as a Gaussian random variable.
The values of observed frequency and expected frequency are shown in the
table. The 2 or Chi-square of random variable also can be calculated in this table
as follow.
Generating Gaussian random variable with 10.000 data and make histogram
with 19 bins.
Matlab Program
The values of observed frequency and expected frequency are shown in the
table. The 2 or Chi-square of random variable also can be calculated in this table
as follow.
The value of 2 is 19.909. By using confidence level or F(z) is 0.95 and degree
of freedom k-3 (for Gaussian distribution), from Chi-square distribution table
(appendix A) the value of 2,dof is 26.30. So, because 2 < 2,dof the random variable
is valid as a Gaussian random variable.
Generating Gaussian random variable with 10.000 data and make histogram
with 22 bins.
Matlab Program
The value of 2 is 18.120. By using confidence level or F(z) is 0.95 and degree
of freedom k-3 (for Gaussian distribution), from Chi-square distribution table
(appendix A) the value of 2,dof is 30.14. So, because 2 < 2,dof the random variable
is valid as a Gaussian random variable.
14
MATLAB Program
The values of observed frequency and expected frequency are shown in the table.
The 2 or Chi-square of random variable also can be calculated in this table as
follow.
15
So, by using 2 or Chi-square goodness of fit test with the formula:
The value of 2 is 3.009. By using confidence level or F(z) is 0.95 and degree
of freedom k-3 (for Gaussian distribution), from Chi-square distribution table
(appendix A) the value of 2,dof is 14,07. So, because 2 < 2,dof the random variable
is valid as a Gaussian random variable.
b. Gaussian random variable (7,3,1000,1)
Generating gaussian random variable with the mean value is 7, and the
standard deviation is 1.
16
MATLAB Program
The values of observed frequency and expected frequency are shown in the table.
The 2 or Chi-square of random variable also can be calculated in this table as
follow.
17
So, by using 2 or Chi-square goodness of fit test with the formula:
MATLAB Program
18
The values of observed frequency and expected frequency are shown in the table.
The 2 or Chi-square of random variable also can be calculated in this table as
follow.
The value of 2 is 13.251. By using confidence level or F(z) is 0.95 and degree
of freedom k-3 (for Gaussian distribution), from Chi-square distribution table
(appendix A) the value of 2,dof is 14,07. So, because 2 < 2,dof the random variable
is valid as a Gaussian random variable.
19
d. Gaussian random variable (7,7,1000,1)
Generating gaussian random variable with the mean value is 7, and the
standard deviation is 1.
MATLAB Program
20
The values of observed frequency and expected frequency are shown in the table.
The 2 or Chi-square of random variable also can be calculated in this table as
follow.
The value of 2 is 5.657. By using confidence level or F(z) is 0.95 and
degree of freedom k-3 (for Gaussian distribution), from Chi-square distribution
table (appendix A) the value of 2,dof is 14,07. So, because 2 < 2,dof the random
variable is valid as a Gaussian random variable.
This transformation will produce zero mean and unit variance of Gaussian
random variable. The experiment is conducted by varying the number of data
(1000, and 10000) and the histogram has 10 bins.
21
a. Gaussian random variable with 1000 data
Generating Gaussian random variable using box-muller with 1000 data
of uniform random variables.
MATLAB Program
22
The values of observed frequency and expected frequency are shown in the
table. The 2 or Chi-square of random variable also can be calculated in this table
as follow.
The value of is 10.586. By using confidence level or F(z) is 0.95 and degree
2
23
MATLAB Program
The values of observed frequency and expected frequency are shown in the
table. The 2 or Chi-square of random variable also can be calculated in this table
as follow.
24
So, by using 2 or Chi-square goodness of fit test with the formula:
The value of 2 is 6.527. By using confidence level or F(z) is 0.95 and degree
of freedom k-3 (for Gaussian distribution), from Chi-square distribution table
(appendix A) the value of 2,dof is 14,07. So, because 2 < 2,dof the random variable
is valid as a Gaussian random variable.
2. From generated gaussian random variable in matlab with number of data 10000 and
bin of data 13,16, 19, 22, we get four histogram, from our observation, the value
of chi square are 13,25; 16,074; 19,909 ; and 18,128 respectively, that has value
2 < 2,dof , the random variable is valid as a Gaussian random variable. If we
increase the bin, increasing of degree of freedom, and value 2,dof will increase
too. So, the value acceptable for the histogram will increasing even the chi square
of each histogram increase.
26