STAT4051 Spring 2023 Assignment 2
Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit
STAT4051 Spring 2023
Assignment 2
Due: Feb 12, 2023
Show all work for full credit. Assignment is worth 10 points
1. Download the menu.csv dataset from Canvas. The file nutritional information about
every item on US McDonalds’ menu. Data was obtained from Kaggle,
https://www.kaggle.com/datasets/mcdonalds/nutrition-facts.
You may find the following code helpful. Tip: type the following code in R, DO NOT cut and paste. datasetname <- read.csv("~/yourpathnamegoeshere/menu.csv",header=TRUE) attach (datasetname) |
a. Construct a randomization test to determine if there is a statistical difference between the two protein groups (Beef & Pork vs. Chicken & Fish) in saturated fat content at α=0.05. (0.75 Pts)
b. Construct a 95% bootstrap t-confidence interval for the difference between the two protein groups and discuss how it agrees/disagrees with your conclusion from part a. (0.75 Pts)
c. Assume that the saturated fat content follows a normal distribution for both protein groups (Beef & Pork; Chicken & Fish). Construct a 95% bootstrap confidence interval for the difference between the two protein groups.(0.75 Pts)
d. Construct a randomization test to determine if the saturated fat content of the Beef & Pork category is statistically greater than 5 grams. Interpret your finding. (0.75Pts)
e. Construct a 95% bootstrap percentile confidence interval for the mean saturated fat content of Beef & Pork. Discuss whether the mean saturated fat content is statistically greater than 5 grams. (0.75Pts)
2. BBC news reported that about 80% of Britians only knew one monarch, QueenElizabeth II, during their lifetime. To check this statement, a group of students in statistics collected a random sample of 1600 Britians, and they asked each person whether Queen Elizabeth was the only monarch in power during their entire lifetime. One thousand three hundred and fifty-five (1,355) people said yes.
a. Construct a 95% bootstrap percentile confidence interval for the true proportion ofBritians who had only QueenElizabeth II as their monarch.(1 pt)
b. Is there statistical evidence at the 0.05 significance level that BBC’s statement is accurate? Confirm your answer from part a. with a randomization test.(1 pt)
3. Is gas cheaper in suburbs than around campus? GasBuddy reported the following prices on September 8, 2022.
UMN campus: 3.79, 3.99, 3.79, 3.79
Suburbs: 3.77, 3.79, 3.39
a. Perform an exact test to determine if there is any difference in gas prices between the two geographic regions at α=0.05. Interpret your results.(0.5pts)
b. Perform a randomization test to determine if there is any difference in gas prices between the two geographic regions at α=0.05. Interpret your results.(0.5pts)
c. How does the statistical results from parts a. and b. compare to the t-test results?(0.5pts)
d. Which p-value is most accurate and why?(0.75pts)
4. Minnesotans love their “Great Minnesota Get-Together.” Are UMN students from Minnesota more likely to attend the Minnesota State Fair compared to out-of-state UMN students? A random sample of 500 in-state students and 500 out-of-state students was collected from students staying in the Twin Cities over summer. Each student was asked whether then attended the 2022 MN state fair at least once. The following results were obtained:
|
In-State Students |
Out-of-State Students |
Attended the fair |
334 |
259 |
Did not attend the fair |
166 |
241 |
The research question is whether in-state students are more likely to go to the fair compared to UMN students from out-of-state. Test at a significance level of α=0.10. Interpret your results.
a. Estimate and interpret the true difference between the two groups with a 90% bootstrap percentile confidence interval. (1 pt)
b. Compare to the results in part a with90% confidence interval based on normal theory(1pt)
Note: Use R codes for all questions.
2023-03-18