Highlights
Exercises:
1. We are going to use a portion of the famous data set in statistical learning dealing with the famed Titanic sinking in 1912. Read in the data set called titanic.csv. How many observations do we have? How many variables? Each observation is a passenger that was on board when the ship sank.
2. We will first use the Fare as our response variable. This was the price of the ticket in USD (in 1912). Fit the OLS regression model with Pclass (class of the ticket: 1st = 1, 2nd = 2, 3rd = 3), Sex (female vs. male), Age (in years), and Parch (number of parents/children with the passenger) as explanatory variables. Interpret the estimated coefficients in context to the problem.
3. Use the predict( ) function to estimate the mean Fare for a 31 year old male passenger with a 1st class ticket and 0 parents/children on board. Include the 95% confidence interval for this estimate. Interpret the interval in context to the problem.
4. Use the predict( ) function to estimate the mean Fare for a 31 year old female passenger with a 1st class ticket and 0 parents/children on board. Look at the difference between this answer and the previous part. Compare this difference to an estimate found within the summary.
5. Now, we will model the probability that the passenger survived based on their class, sex, and age. The response variable is now Survived (0 if not and 1 if they did survive). Fit the logistic regression model with Pclass, Sex, and Age as explanatory variables and Survived as the response variable. Here, a 1 is a success and a 0 is a failure. Interpret the coefficients from the summary.
6. Use the predict( ) function to estimate the odds of a 29-year-old female passenger with a 2nd class ticket surviving. Interpret this value in context to the problem.
7. Use the predict( ) function to estimate the probability that a 29-year-old female passenger with a 2nd class ticket surviving. Explain why it makes sense that this value is greater to or less than 0.50 based on the estimated odds from the previous part.
8. Break up the data set such that the first 500 observations are used for the training set and the remaining are in the test set.
9. Using the fitted model on the training set, get the test misclassification error rate.
10. Use the group by( ) and summarize( ) functions from the tidyverse package to find the mean of Survived grouped by Pclass and Sex. What can you summarize from this output?
This Statistics Assignment has been solved by our Statistics Experts at My Uni Paper. Our Assignment Writing Experts are efficient to provide a fresh solution to this question. We are serving more than 10000+ Students in Australia, UK & US by helping them to score HD in their academics. Our Experts are well trained to follow all marking rubrics & referencing style.
Be it a used or new solution, the quality of the work submitted by our assignment experts remains unhampered. You may continue to expect the same or even better quality with the used and new assignment solution files respectively. There’s one thing to be noticed that you could choose one between the two and acquire an HD either way. You could choose a new assignment solution file to get yourself an exclusive, plagiarism (with free Turnitin file), expert quality assignment or order an old solution file that was considered worthy of the highest distinction.
© Copyright 2026 My Uni Papers – Student Hustle Made Hassle Free. All rights reserved.