In: Statistics and Probability
Using R-Studio please answer the following questions and show your code.
1. Julie buys a take-out coffee from one of two coffee shops on a random basis: Ultimo Coffee and Joe’s Place. This month, she measured the temperature of each cup immediately after purchase, using a cooking thermometer. Sample data is shown below, temperatures are in Fahrenheit.
ultimo = c(171,161,169,179, 171,166,169,178,171, 165,172,172)
joes = c(168,165,172, 151,162,158,157,160, 158,160,158,164)
2. For a project, Mia is investigating whether women eat less frequently in fast-food chains than men. She asked 11 men and 11 women to keep track of how many times they ate in a fast-food restaurant in the last two months.
women = c(10,5,15,13,5, 7,18,8,19, 9, 8)
men = c(16, 9,17,14,15,11, 18,12, 37,16,30)
3. Expedia is investigating if the month of travel impacts the online flight ticket purchases (i.e., number of tickets purchased online via Expedia webpage during that month). The statistical analysis team collects information on number of flights booked during each month over the past 10 years and run a statistical test to test whether the average number of flight tickets purchased are same across all months or if some months are different than others.
a) Null hypothesis: Mean temperature at Ultimo Coffee and Joe's Place do not differ significantly vs
Alternative hypothesis: Mean temperature at Ultimo Coffee and Joe's Place differ significantly
or
b) A two sample t-test is appropriate here.
Reasoning: To compare the means of two samples when the sample size is as small as 12, a two sample t-test should be used.
The R code for the further distribution is givrn below:
Hope this was helpful. Please leave back any comment.