Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Question 2 (12 marks) In R, load a data set called iris using the following code: data(iris). The data set includes measurement for 150 iris
Question 2 (12 marks) In R, load a data set called iris using the following code: data(iris). The data set includes measurement for 150 iris flowers. a) Using the iris data set, find the following confidence intervals (6 marks): i. 90% confidence interval for the true mean of Sepal.Length (using the complete dataset) ii. 90% confidence interval for the true mean of Sepal.Length for observations that come from species setosa. Note that to choose the relevant observations, you need to add code Species=="setosa\" when you use the subset() function. iii. 90% confidence interval for the true mean of Sepal.Length for observations that come from the versicolor species. b) Indicate what method of calculation you chose for each interval and why (e.g., did you use the z or t distribution). (2 marks) ) Discuss the findings. Explain what your results show you. (2 marks) d) Provide the R code that you used to get your results (starting from the line to load the data). (2 marks) Question 3 (13 marks) An owner of a travel agency would like to determine whether or not the mean age of the agency's customers is under 60. If so, the owner plans to alter the destination of the agency's special cruises and tours. A random sample of 64 customers was analyzed, resulting in the sample mean of ages equal 57.3 years and the sample standard deviation of ages equals 7.5 years. a) State the null and alternative hypotheses for this study using full sentences and using mathematical notation. (4 marks) b) What sample statistic would you use to test the null hypothesis? (1 mark) c) What test statistic would you use to test the null hypothesis? Explain why you would choose this one. (2 marks) d) Calculate the value of the observed test statistic. (1 mark) e) Find the p-value for the observed test statistic. (1 mark) f) Using the 5% significance level, state whether you can reject the null hypothesis. Explain what your finding means in the context of the problem. (2 marks) g) Obtain and interpret a 90% confidence interval for the true mean age of all customers of the travel agency. (2 marks)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started