MATH 376 -- Probability and Statistics II

Lab Project 3 Solutions

April 14, 2004

A)

>    read "/home/fac/little/public_html/ProbStat/MaplePackage/MSP.map";

Warning, the name changecoords has been redefined

119793802

>    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]);

XList := [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.,...
XList := [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.,...

>    Xbar:=Mean(XList);

Xbar := 1208.333333

>    S[X]:=StandardDeviation(XList);

S[X] := 144.8681541

>    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]);

YList := [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....
YList := [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....

>    Ybar:=Mean(YList);

Ybar := 1088.666667

>    S[Y]:=StandardDeviation(YList);

S[Y] := 182.4305858

1)

>    BoxWhisker(XList,YList);

[Maple Plot]

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 mu[Y] < mu[X]   Thus, our null hypothesis is   H[0] :   mu[X] = mu[Y] ; alternative hypothesis

is mu[Y] < mu[X]  

>    nops(XList),nops(YList);

30, 30

so a large sample  Z-test  is appropriate.  

Z = (Xbar-Ybar)/sqrt(S[X]^2/30+S[Y]^2/30)

With   alpha = .5e-1 ,  the rejection region is   z > z[.5e-1]  = 1.645

>    z:=(Xbar-Ybar)/sqrt(S[X]^2/30+S[Y]^2/30);

z := 2.813604878

This is well into the rejection region, so we reject the null hypothesis

at this level.

c)  With alpha = .5e-1 ,  the data indicate we have good reason to

reject the null hypothesis in favor of the alternative hypothesis

mu[Y] < mu[X]   

d)  The attained significance level is:

>    p:=1-NormalCDF(0,1,z);

p := .24494702e-2

B)  

1)

>    XListB:=[21.7,21.0,21.2,20.7,20.4,21.9,20.2,21.6,20.6];

XListB := [21.7, 21.0, 21.2, 20.7, 20.4, 21.9, 20.2, 21.6, 20.6]

>    nops(XListB);

9

>    XbarB:=Mean(XListB);

XbarB := 21.03333333

>    SB2[X]:=Variance(XListB);

SB2[X] := .3675001250

>    YListB:=[21.5,20.5,20.3,21.6,21.7,21.3,23.0,21.3,18.9,20.0,20.4,20.8,20.3];

YListB := [21.5, 20.5, 20.3, 21.6, 21.7, 21.3, 23.0, 21.3, 18.9, 20.0, 20.4, 20.8, 20.3]

>    nops(YListB);

13

>    YbarB:=Mean(YListB);

YbarB := 20.89230769

>    SB2[Y]:=Variance(YListB);

SB2[Y] := 1.014102667

With   H[0]   being   sigma[X]^2 = sigma[Y]^2

>    F:=8*SB2[X]/(12*SB2[Y]);

F := .2415929780

For a level alpha = .5e-1   two-tail F-test (for instance)

>    1-FCDF(8,12,3.5114);

.250093707e-1

>    1-FCDF(8,12,.2381);

.9750043398

RR:  F > 3.5114 or F < .2381.

Here   F = .24329 is not in RR, so we do not reject the null hypothesis on the basis of this data.

2)  Since we can work under the assumption that the variances are equal, we use the

t-test for equality of means:

>    S[P]:=sqrt((8*SB2[X]+12*SB2[Y])/20);

S[P] := .8691729691

>    T:=evalf((XbarB-YbarB)/(S[P]*sqrt(1/9+1/13)));

T := .3741738722

Rejection region, though, is   abs(t)  > t[alpha/2]

For instance, for   alpha = .5e-1   two-tailed   t-test

>    1-TCDF(20,2.0859);

.250031642e-1

RR:   abs(t)   >  2.0859

So cannot reject null hypothesis on the basis of this data.

3)

>    BoxWhisker(XListB,YListB);

[Maple Plot]

>    Welch:=(SB2[X]/9+SB2[Y]/13)^2/((SB2[X]/9)^2/8+(SB2[Y]/13)^2/12);

Welch := 19.73834855

>