STAT217 Tutorial sheet #5 Solutions

 

Question 1

Ho: the distribution is uniform

Ha: the distribution is not uniform

Since there are 4 categories, the degrees are 3. Reject Ho if c2 > 7.81

To compute the test statistic, since the distribution is uniform, each category should have 25 observations.

 c2 = (28 – 25)2/25 + (30 – 25)2/25 + (23 – 25)2/25 + (19 – 25)2/25 = 2.96

Do not reject Ho.

Conclude the distribution is uniform.

 

Question 2

Ho: the distribution is binomial with n=7 and p=0.24

Ha: it is not

To get the expected value we multiply P(x) by 500 for each value of x:

x

500P(x)

0

73.25

1

161.85

2

153.35

3

80.7

4

25.5

5

4.85

6

0.5

7

0

You will note the sum of the second column is 500. Since the expected value of the last three values is less than 5, we combine them to get 5.35. The sum of the observed values for these categories is 4+0+0 = 4.

Since we now have 6 categories instead of 8, the degrees of freedom are 5. Reject Ho if c2 > 11.0705

c2 = (85-73.25)2/73.25 + (159-161.85)2/161.85 + … + (4-5.35)2/5.35 = 4.7763.

Do not reject Ho.

Conclude the data follows a binomial distribution with n=7 and p=0.24.

 

Question 3

Ho: the distribution is Poisson with mean = 3

Ha: it is not

To get the expected value we multiply P(x) by 500 for each value of x:

x

500P(x)

0

24.9

1

74.7

2

112

3

112

4

84

5

50.4

6

25.2

7

10.8

8

4.05

Since the expected value of 8 is less than 5, we stop. We note that the sum of 500P(0) through 500P(7) (i.e. the expected values for 0 through 7) is 494; that means the sum of the remaining expected values is 500 – 494 = 6 for x=8 onward. The sum of the observed values for the last category is then 1+2 = 3.

Since we have 9 categories, the degrees of freedom is 8. Reject Ho if c2 > 15.5073.

c2 = (26-24.9)2/24.9 + (84-74.7)2/74.7 + … + (3-6)2/6 = 5.3892

Do not reject Ho.

Conclude the data follows a Poisson distribution with mean = 3.

 

Question 4

a)      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.

b)      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.

 

Question 5

a)      Ho: home status does not depend on gender

Ha: it does

degrees of freedom = 3; Reject Ho if c2 > 7.8147

First we need the totals:

 

Male

Female

Total

Stable home

3658

8099

11757

Home with problems

138

293

431

Transient home situation

357

708

1065

Homeless

2450

3047

5497

Total

6603

12147

18750

Next, the expected values:

 

Male

Female

Stable home

4140.3451

7616.6549

Home with problems

151.7810

279.2190

Transient home situation

375.0504

689.9496

Homeless

1935.8235

3561.1765

Finally, the terms for the test statistic:

 

Male

Female

Stable home

56.1926

30.5458

Home with problems

1.2512

0.6802

Transient home situation

0.8687

0.4722

Homeless

136.5711

74.2388

The sum of the terms gives c2 = 300.8206.

Reject Ho and conclude that home status depends on gender.

b)      Cramer’s V = sqrt(300.8206/18750) = 0.1267 = 12.67%