STAT177 Homework sheet #6 Solutions

 

Question 1

a)     The data is interval/ratio, the samples are independent and the sample sizes are over 30. The appropriate test is the Z test for 2 means.

b)     The data is interval/ratio, the samples are independent, but the data is not normal. The appropriate test is the Mann-Whitney test.

c)     The data is ordinal and the samples are dependent. The appropriate test is the Wilcoxon test.

d)     The data is interval/ratio, the data is normal, the samples are independent, the sample sizes are under 30 and the standard deviations are equal. The appropriate test is the t test assuming equal variances.

e)     The data is interval/ratio, the data is normal and the samples are dependent. The appropriate test is the paired t test.

 

Question 2

If we choose downtown as group 1, the null and alternative hypotheses are:

Ho: m1 = m2

Ha: m1 ¹ m2

 

Question 3

Here is the output:

t test for two means assuming unequal variances

Ho: mean(Downtown) - mean(Suburbs) equals 0

Ha: mean(Downtown) - mean(Suburbs) does not equal 0

Reject Ho if test statistic > 2.201 or < -2.201

Test statistic = 0.591

P-value = 0.567

Do not reject Ho

Conclude mean(Downtown) - mean(Suburbs) equals 0

95% confidence interval of mean(Downtown) - mean(Suburbs): -72.904 to 126.404

Under the general rule of thumb, since the p-value is greater than 10%, we do not reject the null hypothesis. We conclude there is no significant difference in average daily rates between downtown and suburban hotels.

 

Question 4

If we choose After as group 1, the null and alternative hypotheses are:

Ho: m1 £ m2

Ha: m1 > m2

 

Question 5

The data is ordinal and the samples are independent. The appropriate test is the Mann-Whitney test.

 

Question 6

Here is the output:

Mann-Whitney test for two medians

Ho: median(After) - median(Before) is not greater than 0

Ha: median(After) - median(Before) is greater than 0

Reject Ho if test statistic > 84

Sample sizes = 8 and 8

Test statistic = 88

Reject Ho

Conclude median(After) - median(Before) is greater than 0

Since the test statistic is greater than the critical value, we reject the null hypothesis. We conclude the ratings are improved.

 

Question 7

Under this scenario, the samples would be dependent. The appropriate test would be the Wilcoxon test.

 

Question 8

Here is the output:

Wilcoxon test for paired data

Ho: median(After) - median(Before) is not greater than 0

Ha: median(After) - median(Before) is greater than 0

Reject Ho if test statistic less than or equal to 2

Sample size = 6

Test statistic = 1.5

Reject Ho

Conclude median(After) - median(Before) is greater than 0

Since the test statistic is less than the critical value, we reject the null hypothesis and reach the same conclusion as in question 6.

 

Question 9

The data is interval/ratio, the data is normal and the samples are dependent. The appropriate test is the paired t test.

 

Question 10

Here is the output:

paired t test

Ho: mean(After) - mean(Before) is not greater than 0

Ha: mean(After) - mean(Before) is greater than 0

Reject Ho if test statistic > 1.895

Test statistic = 5.848

P-value = 0

Reject Ho

Conclude mean(After) - mean(Before) is greater than 0

95% confidence interval of mean(After) - mean(Before): 34.771 to 81.979

Note that this was set up as a right-tail test with After as group 1. The p-value is less than the level of significance. We reject the null hypothesis and conclude the loyalty program is effective.

 

Question 11

Under the general rule of thumb, since the p-value is less than 1%, we reject the null hypothesis and reach the same conclusion.