Question: Hi Sir/Madam, Could you help me with solving this problem using Rstudio, please? Problem 2: Classroom Demographics The file students.csv contains data from a sample
Hi Sir/Madam,
Could you help me with solving this problem using Rstudio, please?
Problem 2: Classroom Demographics
The file students.csv contains data from a sample of students in a hypothetical classroom.
Heights are in centimeters, weights are in kilograms, and ages are in years.
1. Determine whether male and female students (as a population) differ in average height. Provide a p-value.
2. Determine whether male and female students (as a population) differ in average weight. Provide a p-value.
3. Calculate the Pearson correlation coefficient between height and weight for male students.
4. Calculate the Spearman correlation coefficient between height and weight for students (of either gender) under the age of 25.
5. Assess whether male and female students of similar height differ significantly in average weight (as a population), ignoring all other variables. Provide a p-value. (You may assume that the relation is linear, and that weight increases with height in the same way for both genders.)
6. Produce a scatter plot that illustrates your result from part 5, using labels, symbols, lines, and/or colours as appropriate.
Here is the data set;
Gender Height Weight Age
Male 182 92 21
Male 153 67 25
Female 154 54 22
Male 185 96 21
Male 178 81 21
Male 159 64 30
Female 162 59 22
Female 162 62 24
Female 165 64 33
Female 167 76 26
Male 170 82 21
Female 164 59 21
Male 176 90 21
Female 157 62 22
Female 160 60 22
Male 171 83 21
Male 174 87 24
Female 167 57 21
Male 177 91 23
Male 165 81 22
Waiting to hear from you.
Thank you
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
