STAT217 Worksheet #5 Solutions

 

Question 1

a)      Ho: response does not depend on city

Ha: response depends on city

Degrees of freedom = 2 x 4 = 8. Reject Ho if c2 > 15.507

To get the test statistic, we need the row and column totals:

 

Strongly Disagree

Disagree

Neutral

Agree

Strongly Agree

Total

Vancouver

6

20

40

20

14

100

Calgary

12

18

24

16

12

82

Toronto

12

18

62

16

12

120

Total

30

56

126

52

38

302

From there we can get the expected values:

 

Strongly Disagree

Disagree

Neutral

Agree

Strongly Agree

Vancouver

9.9338

18.5430

41.7219

17.2185

12.5828

Calgary

8.1457

15.2053

34.2119

14.1192

10.3179

Toronto

11.9205

22.2517

50.0662

20.6623

15.0993

And then the terms for the test statistic:

 

Strongly Disagree

Disagree

Neutral

Agree

Strongly Agree

Vancouver

1.5578

0.1145

0.0711

0.4493

0.1596

Calgary

1.8237

0.5137

3.0482

0.2505

0.2742

Toronto

0.0005

0.8124

2.8445

1.0520

0.6362

When we add the terms for the test statistic, we get 13.6082.

Do not reject Ho.

Conclude the response does not depend on what city the person is from.

b)      Cramer’s V = sqrt(13.6082/(2x302)) = 0.1501 = 15.01%

c)      The 10% critical value is 13.362. We reject Ho and conclude that the response depends on what city the person is from.

 

Question 2

a)      When we work out the expected values for the 20+ category, this is what we get:

working

semi-retired

retired

1.33

3.62

5.05

As we see, 2 of the 3 expected values are less than 5. Thus, we need to collapse this category with the 10 to 19 category.

b)      Here is the new crosstab of observed values:

< 10

10 or more

Total

Working

10

4

14

Semi-retired

13

25

38

Retired

15

38

53

Total

38

67

105

Ho: hours worked does not depend on work status

Ha: hours worked does depend on work status

Degrees of freedom = 2 x 1 = 2; Reject Ho if test statistic > 5.991.

Here is the crosstab of expected values:

5.067

8.933

13.752

24.248

19.181

33.819

Test statistic = 4.803 + 2.724 + 0.041 + 0.023 + 0.911 + 0.517 = 9.019

Reject Ho.

Conclude hours worked depends on work status

c)      Cramer’s V = sqrt(9.019/105) = 0.2931 = 29.31%

 

Question 3

Ho: data is normal

Ha: data is not normal

Reject Ho if test statistic > 0.319.

Here is the completed table:

X

Z

F(z)

S(z)

S'(z)

D

0

-1.1667

0.1217

0.1667

0

0.1217

2

-0.4298

0.3337

0.5000

0.1667

0.1670

2

-0.4298

0.3337

0.5000

0.1667

0.1670

3

-0.0614

0.4755

0.6667

0.5

0.1912

4

0.3070

0.6206

0.8333

0.6667

0.2127

8

1.7808

0.9625

1.0000

0.8333

0.1292

Test statistic = 0.2127.

Do not reject Ho and conclude the data is normally distributed.

 

From the textbook

Section 10-2

Question 9 (page 563)

Ho: digits are uniformly distributed

Ha: digits are not uniformly distributed

Reject Ho if c2 > 16.919 (based on 9 df)

c2 = (8 – 10)2/10 + (8 – 10)2/10 + (12 – 10)2/10 + (11 – 10)2/10 + (10 – 10)2/10 + (8 – 10)2/10 + (9 – 10)2/10 + (8 – 10)2/10 + (12 – 10)2/10 + (14 – 10)2/10 = 0.4 + 0.4 + 0.4 + 0.1 + 0 + 0.4 + 0.1 + 0.4 + 0.4 + 1.6 = 4.2

Do not reject Ho. Conclude the digits are uniformly distributed.

 

Question 10 (page 563)

Ho: digits are uniformly distributed

Ha: digits are not uniformly distributed

Reject Ho if c2 > 16.919 (based on 9 df)

c2 = (0 – 10)2/10 + (17 – 10)2/10 + (17 – 10)2/10 + (1 – 10)2/10 + (17 – 10)2/10 + (16 – 10)2/10 + (0 – 10)2/10 + (16 – 10)2/10 + (16 – 10)2/10 + (0 – 10)2/10 = 10 + 4.9 + 4.9 + 8.1 + 4.9 + 3.6 + 10 + 3.6 + 3.6 + 10 = 63.6

Reject Ho. Conclude the digits are not uniformly distributed.

 

Section 10-3

Question 6 (page 579)

Ho: error rate does not depend on price

Ha: error rate does depend on price

Df = (2-1)(3-1) = 2; reject Ho if c2 > 5.991

c2 = (20 – 13.8)2/13.8 + (7 – 13.2)2/13.2 + (15 – 22.5)2/22.5 + (29 – 21.5)2/21.5 + (384 – 382.7)2/382.7 + (364 – 365.3)2/365.3 = 2.7855 + 2.9121 + 2.5 + 2.6163 + 0.0044 + 0.0046 = 10.8229

Reject Ho. Conclude the error rates are not the same for regular-priced items as for advertised-special items. Based on the expected values for the over-priced items, it does appear that advertised-priced items are overpriced more. If I believed a store was overcharging me on advertised-priced items, I’d be shopping somewhere else. Note that Cramer’s V = sqrt(10.8229/819) = 11.5% which indicates that over/undercharging depends on the price 11.5% of the time.

 

Section 10-4

Question 1 (page 592)

Ho: the data is normally distributed

Ha: it is not

Reject Ho if test statistic > 0.285

The mean of the data is 278.125 and the standard deviation is 436.8551. This spreadsheet summarizes the results:

Value

Z score

F(z)

S(z)

S'(z)

Max diff

50

-0.52

0.3015

0.1250

0

0.3015

75

-0.46

0.3228

0.2500

0.125

0.1978

100

-0.41

0.3409

0.3750

0.25

0.0909

120

-0.36

0.3594

0.5000

0.375

0.1406

140

-0.32

0.3745

0.6250

0.5

0.2505

150

-0.29

0.3859

0.7500

0.625

0.3641

240

-0.09

0.4641

0.8750

0.75

0.4109

1350

2.45

0.9929

1.0000

0.875

0.1179

278.125

mean

 

 

test stat

0.4109

436.8551

stdev

 

 

 

 

The test statistic is 0.4109. Reject Ho and conclude the data is not normally distributed.

 

Question 2 (page 592)

Ho/Ha are the same.

Since n=7, reject Ho if test statistic > 0.3

The mean is now 125 and the standard deviation is 61.7117. Here are the results:

Value

Z score

F(z)

S(z)

S'(z)

Max diff

50

-1.22

0.1112

0.1429

0

0.1112

75

-0.81

0.209

0.2857

0.1429

0.0767

100

-0.41

0.3409

0.4286

0.2857

0.0877

120

-0.08

0.4681

0.5714

0.4286

0.1033

140

0.24

0.5948

0.7143

0.5714

0.1195

150

0.41

0.6591

0.8571

0.7143

0.1980

240

1.86

0.9686

1.0000

0.8571

0.1115

125

mean

 

 

test stat

0.1980

61.7117

stdev

 

 

 

 

The test statistic is 0.198. Do not reject Ho and conclude the data is normally distributed.