Lab 2F
Directions: Follow along with the slides and answer the questions in red font in your journal.
do-loop and the shuffle function, we could simulate randomly shuffling our data many times.
Is there any evidence to suggest that wealthier passengers on the Titanic were more likely to survive than poorer passengers?
fare for their ticket.data function to load the titanic passenger and survival data.fares paid by passengers and facet the plot based on whether the passenger survived or not.
do and the shuffle functions to shuffle the passenger’s survival status 500 times.
median fare paid.Assign your shuffled data the name shuffles.mutate function to create a variable called diff to the shuffled medians you just calculated. (Assign your mutated data the name shuffles again).Is there any evidence to suggest that wealthier passengers on the Titanic were more likely to survive than poorer passengers?