Question: #Let's look at another dataset, 'sleep' which has three columns. In the help-section of R-studio, type sleep to read more about this dataset. #We will
#Let's look at another dataset, 'sleep' which has three columns. In the help-section of R-studio, type "sleep" to read more about this dataset. #We will compare variance and mean in the numeric increase in hours of sleep in two groups who were given different drugs: #First, subset the dataframe to get only those observations for which the value of the "group" variable is 1. #(if you don't remember how to do this review lab 1) extra_gr1 =
#Create a stripchart for hours of extra-sleep for patients in group 1:
#Do the same thing for group 2. Fix the x-scale to be the same for both groups (hint: use the xlim parameter). #Compute the IQR for both groups. Which group seems to have more variable data?
#Now, compare the means of 'extra-sleep' for group 1 and group 2. Which group has a bigger mean?
#Looking at the stripcharts and the means, would you *guess* that the difference between the two groups is significant? (You don't have to test this!)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
