A research showed that the average rate of renting a car in Marrakech is 884.2 dhs and the average in Casablanca is 806.1 dhs. The mentioned data was obtained by taking two samples of 50 rental agencies in each city and that the standard deviation of the population is 56.2 dhs and 48.3 dhs of Marrakech and Casablanca respectively. At α = 0.05, can it be concluded that there is a difference in the rates of both cities?
Null and alternative hypotheses :
"H_o: \\mu_1 = \\mu_2\\\\\n\n\n\nH_a: \\mu_1\\neq \\mu_2"
Test statistic :
To test the hypothesis the most appropriate test is two samples z-test for the means. The test statistic is given as follows :
"z=\\dfrac{\\bar{x_1}-\\bar{x_2}}{\\sqrt{\\frac{\\sigma_1^2}{n_1}+\\frac{\\sigma_2^2}{n_2}}}"
Where, "x\u0304_1, x\u0304_2" are sample means, "\u03c3_1, \u03c3_2" are population standard deviations and "n_1, n_2" are sample sizes.
We are given the following values :
"x\u0304_1 = 884.2, x\u0304_2 = 806.1,\n\n\n\n\u03c3_1 = 56.2, \u03c3_2 = 48.2,\n\n\n\nn_1 = 50, n_2 = 50"
"z=\\dfrac{884.2-806.1}{\\sqrt{\\frac{56.2^2}{50}+\\frac{48.3^2}{50}}}=7.452"
The value of the test statistic is 7.452.
P-value :
Our test is two-tailed test. The p-value for two-tailed z-test is given as follows :
P-value = 2.P(Z > | Test statistic value |)
P-value = 2.P(Z > 7.452)
P-value = 0.0000
Decision :
Since p-value is less than the significance level of 0.05, therefore we shall reject the null hypothesis at 0.05 significance level.
Conclusion : At 0.05 significance level there is sufficient evidence to conclude there is a difference in the average rates of both cities.
Comments
Leave a comment