Friday, December 6, 2019

Testing Statistical Hypotheses

Question: Discuss about the Testing Statistical Hypotheses. Answer: Introduction: The Malaysian restaurant makes the best fried noodles in Sydney. The Malaysian restaurant claims that they deliver food in 20 minutes. To test this hypothesis, a sample of 30 customers was selected for the test randomly and the waiting time for each customer was noted. Null Hypothesis: The waiting time of the Malaysian restaurant is less than 20 minutes. i.e. 20 minutes. Alternative Hypothesis: The waiting time of the Malaysian restaurant is more than 20 minutes. i.e. 20 minutes. The significance level = 0.05 Since sample size is 30, we have used t distribution and the t-statistic to test the hypothesis. We have performed one tailed test as the company wants to find out if the waiting time is greater than 20 minutes. t = (x - )/ (s/ Degree of freedom = n-1 Thus for the sample mean = 20.3, standard deviation = 0.9965 Thus t = (20.3 20)/ (0.9965/ ) = 1.648 For = 0.05, df = 29, from the t distribution t critical for one tailed = 1.699. In case of upper tailed test, we reject the null hypothesis if the t calculated is greater than t critical. Since t t critical, we cannot reject the null hypothesis. Thus the critic is wrong.(E Lehmann) Thus the claim by the company that the waiting time of the Malaysian restaurant is less than 20 minutes is correct at 95% confidence level. 2. The Malaysian restaurant has received a claim from the food critic, Mr. Jellybean that the other restaurant also serves the customer with waiting time of less than 20 minutes. Null Hypothesis: The waiting time of the other restaurant is same as the Malaysian restaurant. i.e. 0 = . Alternative Hypothesis: The waiting time of the other restaurant is same as the Malaysian restaurant. i.e. 0 . The significance level = 0.05 Since sample size is 30, we have used t distribution and the t-statistic to test the hypothesis. We have performed two tailed test as the company wants to find out if there is a difference in the waiting time of the other restaurant and the Malaysian restaurant. t = , s12 = Degree of freedom = n-1 Using Excel, the following Output was generated t-Test: Two-Sample Assuming Equal Variances Malaysian Restaurant Other Restaurant Mean 20.3 21.1 Variance 0.993103448 0.989655172 Observations 30 30 Pooled Variance 0.99137931 Hypothesized Mean Difference 0 df 58 t Stat -3.111828765 P(T=t) one-tail 0.001442129 t Critical one-tail 1.671552762 P(T=t) two-tail 0.002884258 t Critical two-tail 2.001717484 Thus similar output is generated. This is a two tailed test as the company wants to know if there is a difference between the waiting time of the restaurants. The t scores are used as the sample size is not greater than 30. Hence the t distribution is followed. In two tailed t test we reject the null hypothesis if the t test statistic is less than critical t value for the given significance level and degree of freedom. In this case, t test (-3.11) t critical and hence we reject the null hypothesis. (E Lehmann) Thus there is a difference between the waiting time of the two restaurants and the waiting time of other restaurant is higher than the Malaysian restaurant. 3. The restaurant owner wants to find out the waiting time of all the Malaysian restaurants in the region. The owner has collected waiting time of a sample of 18 Malaysian restaurants selected at random. The sample mean of the waiting time is calculated by Sample mean = 1/n Xi , where Xi = waiting time, n = sample size Standard deviation = 1/(n-1) (Xi X)2 For the given 18 restaurants, sample mean = 22 and standard deviation = 3.44 To calculate Margin of error t statistic will be used as the sample size is less than 30. For t statistic Margin of error is given by Critical value * Standard deviation of the statistic Confidence level = 95% Thus = 1 0.95 = 0.05 Degree of freedom = 18 1 =17 Critical Value for = 0.05 and df = 17 from the t distribution table, t critical = 2.11 Thus the Margin of error = 2.11* 3.44 = 7.27 Thus confidence interval of the waiting time of all Malaysian restaurants in Australia at 95% confidence level is = 22 7.27 = (14.72, 29.27) Thus we can say with 95% confidence that the waiting time of any Malaysian restaurant in Australia will be between 14.72 minutes and 29.27 minutes. References Lehmann, E.,Romano,P. (2005). Testing Statistical Hypotheses. NewYork: Spring-Verlag Two Sample t Test: equal variances. (2010) Retrieved from https://www.real-statistics.com/students-t-distribution/two-sample-t-test-equal-variances/ Boston University. (n.d.). The Five Steps in Hypothesis Testing. Retrieved from https://learn.bu.edu/bbcswebdav/pid-826908-dt-content-rid-2073693_1/courses/13sprgmetcj702_ol/week04/metcj702_W04S01T05_fivesteps.html Hypothesis Testing: Upper-, Lower, and Two Tailed Tests. (2016). Retrieved from https://sphweb.bumc.bu.edu/otlt/MPH-Modules/BS/BS704_HypothesisTest-Means-Proportions/BS704_HypothesisTest-Means-Proportions3.html

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.