Question

In: Statistics and Probability

Using R-Studio please answer the following questions and show your code. 1. Julie buys a take-out...

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)

  1. State the null and alternative hypothesis in your own words.
  2. What type of statistical test would you use for this problem? Explain your choice.
  3. Using R, find the test statistic, critical value. Assuming equal variances, is there sufficient evidence that the mean temperature at Ultimo Coffee and Joe’s place are different at significance level α = 0.05?
  4. What is the p value and how do you interpret its’ value in this problem?
  5. What if the equal variances of both populations cannot be assumed? What type of test would you use?  Run this test in R. What is the statistical decision?
  6. Check the normality assumption. Does it hold for Ultimo coffee? Does it hold for Joes coffee? Clearly explain your response using the appropriate visual method.

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)

  1. Assuming equal variances, is there sufficient evidence to support that average times to eat in fast-food chain is different between genders at the 5% level of significance?
  2. What is the 95% Confidence interval for the true difference in mean frequency of eating in fast-food chains between the two genders?
  3. Assuming equal variances, is there sufficient evidence to support that average times to eat in fast-food chain is different between genders at the 1% level of significance?

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.

  1. What type of statistical test would you recommend? Why? Explain your response.
  2. What is/are the factor(s)? What are the levels? What is the response? How many replicates are there?

Solutions

Expert Solution

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.


Related Solutions

Solve following using Program R studio. Please show code and results. Thank you. 1. Assume that...
Solve following using Program R studio. Please show code and results. Thank you. 1. Assume that ? is a random variable follows binomial probability distribution with parameters 15 and 0.25.   a. Simulate 100 binomial pseudorandom numbers from the given distribution (using set.seed(200)) and assign them to vector called binran. b. Calculate ?(? < 8) using cumulative probability function. c. Calculate ?(? = 8) using probability distribution function. d. Calculate the average of simulated data and compare it with the corresponding...
Solve following using Program R studio. Please show code and results. Thank you. 3. Assume that...
Solve following using Program R studio. Please show code and results. Thank you. 3. Assume that ? is a random variable represents lifetime of a certain type of battery which is exponentially distributed with mean 60 hours.   a. Simulate 500 pseudorandom numbers (using set.seed(10)) and assign them to a vector called expran. b. Calculate average of simulated data and compare it with corresponding theoretical value. c. Calculate probability that lifetime is less than 50 hours using cumulative probability function. d....
Using the R script, answer the following questions. Please show all works for full credit. 1....
Using the R script, answer the following questions. Please show all works for full credit. 1. Suppose you invest $150,000 into your mutual fund account on January 1st, 2019. a) [5 points] What would the account balance be at the end of June, 2019 if the account carries a rate of return of 2% every month? b) [5 points] If you earn a 4% return in July and a 5% return in August, 2019, what would the account balance be...
Using the R package to answer the following two questions. You MUST submit your R code...
Using the R package to answer the following two questions. You MUST submit your R code for analysis. 2. Below are heights for a simple random sample of n = 15 young trees (in cm). (50 pts) 27, 33, 33, 34, 36, 37, 39, 40, 40, 41, 41, 42, 44, 46, 47. (a) Test the hypothesis that the mean tree height is equal to 38 cm. (b) Calculate the 95% confidence interval for the population mean of young trees. (c)...
please use R studio to answer the following questions 1. An eductional theorist collects behavioural data...
please use R studio to answer the following questions 1. An eductional theorist collects behavioural data from two groups of children in an early childhood center. She measures how much time the children are active (e.g. running or swinging on the monkey bars) in minutes. The first group of children are encouraged to run about and as such are expected to be active; the second group is encouraged to sit still and paint, and are expected to be less active....
R studio questions Write up your answers and paste the R code Copy and paste all...
R studio questions Write up your answers and paste the R code Copy and paste all plots generated. First create a sample drawn from a normal random variable. R has many distributions for which you can get probabilities and draw random numbers. We are going to use the normal. Go to help in R and type in rnorm. You will see a write up for functions associated with the normal distribution. dnorm is the density; pnorm is the probability distribution...
Complete the following problems using R. PLEASE SHOW ANSWER IN R FORMAT and be sure to...
Complete the following problems using R. PLEASE SHOW ANSWER IN R FORMAT and be sure to turn in explanations and interpretations where appropriate. 2.A random sample of 15 values of PAR (photosynthetically active radiation) were taken at noon in a certain forest (in moles per meter2per second). Data are included in the assignment .xlsx file. Assume that PAR is approximately normally distributed with a known standard deviation of 40.71 moles/(m2s). a.What is the mean value observed for PAR? b.What is...
Can You please Answer the question using R studio and R cloud Telomeres are complexes of...
Can You please Answer the question using R studio and R cloud Telomeres are complexes of DNA and protein that cap chromosomal ends. They consist of the same short DNA sequence TTAGGG repeated over and over again. They tend to shorted with cell divisions and with advancing cellular age, which will lead to chromosome instability or apoptosis (programmed cell death). Eukaryotic cells have the ability to reverse telomere shortening by expressing telomerase, an enzyme that extends the telomeres of chromosomes....
*Please provide r studio code/file* 1) Find the equation of the best fit line using least...
*Please provide r studio code/file* 1) Find the equation of the best fit line using least squares linear fit of x,y: set.seed(88) x <- 1:100 y <- jitter(1.5*x+8,amount=10) 2) For question 1, Draw the P=0.95 prediction intervals for y when x=1:150 3) For question 1, Find the equation of the best fit line using median-based linear fit of x,y. 4) For question 3, draw the P=0.95 prediction interval for y # when x=1:150
Use R studio to answer the following. A study was carried out to investigate the variation...
Use R studio to answer the following. A study was carried out to investigate the variation of rainbow trout weights in a certain creek. The weights (in kilograms) of 10 randomly selected fish are listed below:       0.78, 0.45, 0.35, 0.76, 0.57, 0.42, 0.33, 0.68, 0.66, 0.42 Assume that the population is approximately normally distributed.  Hint: make a vector to enter the weight data into R, e.g.: > wt = c(0.78, ..., 0.42) Find the 90% confidence interval for the unknown population...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT