a sample of 60 units was inspected to find the number of defective,which was grouped in 0,1,2,3,4 or 5 defectives .if X is the random variable defining the number of defective units, then the frequency table of the X is as follows
X012345Frequency517121583
test at 1% level of significance whether this data can be considered to follow a binomial distribution.
"x=(0,1,2,3,4,5)"
observed frequencies:
"f=(5,17,12,15,8,3)"
relative frequencies are "r_x=f_x\/60"
the sample mean is
"\\mu=\\sum xr_x=\\frac{17+24+45+32+15}{60}=2.22"
binomial mean:
"\\mu=np" , where "n=6" is the number of independent trials,
p is the success probability.
"p=2.22\/6=0.37"
The chi-squared goodness-of-fit test:
the null hypothesis is that the distribution "Binom(6,0.37)" is an appropriate model for the number of successes.
test statistic is:
"\\chi^2=\\sum\\frac{(f_x-E_x)^2}{E_x}"
where expected frequencies are "E_x=60p_x"
"p_x=C^x_np^x(1-p)^{n-x}"
"p_0=0.0625,p_1=0.2203,p_2=0.3234,p_3=0.2533"
"p_4=0.1116,p_5=0.0262"
"E_0=3.75,E_1=13.22,E_2=19.40,E_3=15.20"
"E_4=6.70,E_5=1.57"
"\\chi^2=\\frac{(5-3.75)^2}{3.75}+\\frac{(17-13.22)^2}{13.22}+\\frac{(12-19.4)^2}{19.4}+\\frac{(15-15.2)^2}{15.2}+\\frac{(8-6.7)^2}{6.7}+\\frac{(3-1.57)^2}{1.57}=5.8775"
"df=n-2=4"
critical value:
"\\chi^2_{crit}=13.277"
Since "\\chi^2<\\chi^2_{crit}" we accept the null hypothesis. Data can be considered to follow a binomial distribution.
Comments
Leave a comment