MATH 376 -- Probability and Statistics II
Lab Project 4 Solutions
April 4, 2006
A)
> | read "/home/fac/little/public_html/ProbStat0506/MSP.map"; |
The data on breaking strength for the two glue application processes:
> | XList:=evalf([1250,1210,990,1310,1320,1200,1290,1360,1200,1150,1120,1360,1310,1110,1320,980,950,1430,1100,1080,960,1050,1310,1240,1420,1170,1470,1060,1230,1300]); |
> | Xbar:=Mean(XList); |
> | S[X]:=StandardDeviation(XList); |
> | YList:=evalf([1180,1360,1310,1190,920,1060,1440,1010,1000,950,1310,980,1310,1030,960,800,1280,1080,900,1030,930,1050,1010,1310,940,860,1450,1070,840,1100]); |
> | Ybar:=Mean(YList); |
> | S[Y]:=StandardDeviation(YList); |
1)
> | BoxWhisker(XList,YList); |
Here XList (new process) is the bottom, YList (old process) is the top.
The median and 25th %ile are definitely greater for the new process --
guess that Thus, our null hypothesis is : ; alternative hypothesis
is
> | nops(XList),nops(YList); |
so a large sample Z-test is appropriate.
Z =
With = .01, the rejection region is z > = 2.326
> | 1 - NormalCDF(0,1,2.326); |
> | z:=(Xbar-Ybar)/sqrt(S[X]^2/30+S[Y]^2/30); |
This is well into the rejection region, so we reject the null hypothesis
at this level.
c) With = .01, the data indicate we have good reason to
reject the null hypothesis in favor of the alternative hypothesis
d) The attained significance level is:
> | p:=1-NormalCDF(0,1,z); |
B)
1) The data for the male and female spiders:
> | XListB:=[20.4,21.7,21.9,21.4,21.1,23.6,18.9,22.6,21.3]; |
> | nops(XListB); |
> | XbarB:=Mean(XListB); |
> | SB2[X]:=Variance(XListB); |
> | YListB:=[20.5,20.4,20.3,21.1,21.2,20.9,21.0,21.3,20.9,20.0,20.4,20.8,20.3]; |
> | nops(YListB); |
> | YbarB:=Mean(YListB); |
> | SB2[Y]:=Variance(YListB); |
With being
> | Fval:=SB2[X]/SB2[Y]; |
For a level two-tail F-test (for instance)
> | 1-FCDF(8,12,3.5114); |
> | 1-FCDF(8,12,.2381); |
RR: all F with F < .2381 or F > 3.5114 (the union of two intervals).
Here F = 10.58 is in RR, so we reject the null hypothesis on the basis of this data.
There is evidence to suggest that the variances are different.
The attained significance level is
> | p:=2*(1 - FCDF(8,12,Fval)); |
Note: Must multiply by 2 here since this is a two-tail test.
2) Since we cannot assume the variances are the same, we use the
t-test for equality of means with the Welch variant for the number of d.f.
> | Welch:=trunc((SB2[X]/9+SB2[Y]/13)^2/((SB2[X]/9)^2/8+(SB2[Y]/13)^2/12)); |
The test statistic value:
> | T:=evalf((XbarB-YbarB)/(sqrt(SB2[X]/9+SB2[Y]/13))); |
The p-value for the test on the means is:
> | 2*(1-TCDF(Welch,T)); |
So we cannot reject null hypothesis ( ) on the basis of this data ( p -value is too large). The
conclusion is that the mean lengths could be the same based on this data.
3) The box-whisker plot confirms our conclusions in parts 1 and 2:
Note that the males (the bottom) have much more variance than the females.
But the medians are not that far apart, so the means are probably not
that different either:
> | BoxWhisker(XListB,YListB); |