In: Statistics and Probability
a. | In the region to the right, produce a scatterplot of the height versus footlength data (remember this means footlength runs along the horizontal axis as the independent variable and height along the vertical axis as the dependent variable). Based upon your scatterplot, briefly discuss below your thoughts on whether the “visual” trend between the individuals’ footlength and height appears linear, curvilinear, or has no general trend at all. | ||||||||
b. | Complete the following: | ||||||||
i. | Include the trend line's graph and equation (least squares line) on the scatterplot created in part a. Give the line's equation below and explain within this context what the "x" and "y" variables represent in the equation. | ||||||||
ii. | Below, explicitly state the slope of your trend line and discuss what the value of the slope signifies in terms of this context. | ||||||||
c. | Determine the value of the correlation coefficient (r) for this paired data. Explain what this value tells you regarding these two variables. Determine the value of the coefficient of determination (r^2) for this paired data. Explain what this value tells you regarding these two variables. | ||||||||
Male | 23.0 | 162.5 |
Female | 21.5 | 167.5 |
Male | 33.0 | 193.0 |
Female | 24.5 | 165.0 |
Female | 24.0 | 160.0 |
Female | 23.5 | 162.5 |
Male | 28.0 | 189.0 |
Female | 24.5 | 165.0 |
Female | 24.5 | 164.0 |
Female | 27.0 | 175.0 |
Male | 25.0 | 177.0 |
Male | 28.0 | 188.0 |
Female | 20.0 | 167.5 |
Female | 25.0 | 163.0 |
Male | 26.5 | 181.0 |
Female | 27.0 | 183.0 |
Female | 23.5 | 169.0 |
Female | 25.5 | 161.5 |
Male | 26.0 | 184.0 |
Female | 23.5 | 167.5 |
Female | 28.0 | 167.5 |
Male | 26.5 | 171.5 |
Female | 23.5 | 170.0 |
Female | 25.0 | 175.0 |
Male | 25.5 | 173.0 |
Male | 30.5 | 180.5 |
Female | 23.0 | 160.0 |
Female | 22.0 | 172.5 |
Male | 29.0 | 180.0 |
Female | 21.5 | 173.0 |
Male | 26.5 | 176.5 |
Male | 30.5 | 184.0 |
Female | 22.5 | 154.5 |
Female | 25.0 | 162.5 |
Female | 25.0 | 162.5 |
Female | 24.0 | 170.0 |
Female | 23.0 | 167.5 |
Male | 28.0 | 179.0 |
Female | 18.0 | 166.0 |
Female | 23.0 | 160.0 |
Female | 24.0 | 170.5 |
Female | 27.0 | 177.0 |
Female | 23.0 | 167.0 |
Male | 27.5 | 190.5 |
Male | 25.5 | 167.0 |
Female | 16.5 | 152.0 |
Female | 24.0 | 152.5 |
Female | 24.0 | 163.0 |
Female | 24.0 | 157.0 |
Female | 25.5 | 167.0 |
Female | 23.5 | 161.0 |
Female | 25.5 | 161.0 |
Female | 26.0 | 158.0 |
Female | 23.5 | 152.5 |
Female | 25.0 | 169.0 |
Female | 25.5 | 165.0 |
Male | 25.0 | 172.5 |
Female | 25.5 | 170.5 |
Male | 29.0 | 186.0 |
Female | 23.0 | 157.5 |
Male | 28.5 | 180.5 |
Male | 28.0 | 177.5 |
Male | 30.0 | 185.5 |
Female | 24.0 | 155.0 |
Male | 29.5 | 185.0 |
Male | 28.0 | 181.0 |
Female | 22.0 | 154.0 |
Female | 20.0 | 170.0 |
Female | 23.0 | 159.0 |
Female | 31.0 | 165.0 |
Male | 25.5 | 186.0 |
Male | 29.0 | 180.0 |
Female | 23.0 | 148.0 |
a) ### By using R command:
>
footlength=c(23,21.5,33,24.5,24,23.5,28,24.5,24.5,27,25,28,20,25,26.5,27,23.5,25.5,26,23.5,28,26.5,23.5,25,25.5,30.5,23,22,29,21.5,26.5,30.5,22.5,25,25,24,23,28,18,23,24,27,23,27.5,25.5,16.5,24,24,24,25.5,23.5,25.5,26,23.5,25,25.5,25,25.5,29,23,28.5,28,30,24,29.5,28,22,20,23,31,25.5,29,23)
> footlength
[1] 23.0 21.5 33.0 24.5 24.0 23.5 28.0 24.5 24.5 27.0 25.0 28.0
20.0 25.0 26.5
[16] 27.0 23.5 25.5 26.0 23.5 28.0 26.5 23.5 25.0 25.5 30.5 23.0
22.0 29.0 21.5
[31] 26.5 30.5 22.5 25.0 25.0 24.0 23.0 28.0 18.0 23.0 24.0 27.0
23.0 27.5 25.5
[46] 16.5 24.0 24.0 24.0 25.5 23.5 25.5 26.0 23.5 25.0 25.5 25.0
25.5 29.0 23.0
[61] 28.5 28.0 30.0 24.0 29.5 28.0 22.0 20.0 23.0 31.0 25.5 29.0
23.0
>
height=c(162.5,167.5,193,165,160,162.5,189,165,164,175,177,188,167.5,163,181,183,169,161.5,184,167.5,167.5,171.5,170,175,173,180.5,160,172.5,180,173,176.5,184,154.5,162.5,162.5,170,167.5,179,166,160,170.5,177,167,190.5,167,152,152.5,163,157,167,161,161,158,152.5,169,165,172.5,170.5,186,157.5,180.5,177.5,185.5,155,185,181,154,170,159,165,186,180,148)
> height
[1] 162.5 167.5 193.0 165.0 160.0 162.5 189.0 165.0 164.0 175.0
177.0 188.0
[13] 167.5 163.0 181.0 183.0 169.0 161.5 184.0 167.5 167.5 171.5
170.0 175.0
[25] 173.0 180.5 160.0 172.5 180.0 173.0 176.5 184.0 154.5 162.5
162.5 170.0
[37] 167.5 179.0 166.0 160.0 170.5 177.0 167.0 190.5 167.0 152.0
152.5 163.0
[49] 157.0 167.0 161.0 161.0 158.0 152.5 169.0 165.0 172.5 170.5
186.0 157.5
[61] 180.5 177.5 185.5 155.0 185.0 181.0 154.0 170.0 159.0 165.0
186.0 180.0
[73] 148.0
>
plot(footlength,height,xlab="footlength",ylab="height",main="Scatterplot")
>
From the above scatter plot it is clear that there is a strong positive linear relationship between foot length and height.
b) ### Using R command:
> fit=lm(height~footlength)
> fit
Call:
lm(formula = height ~ footlength)
Coefficients:
(Intercept) footlength
109.503 2.394
The equation of line of best fit is:
> abline(fit, col="red") ### regression line
Here the slope of the regression line is =2.394 which indicates that a unit increase in the foot length results in the increase in the height of a person by 2.394 unit.
c) The correlation coefficient is r=0.67
## By using command:
> cor(footlength,height)
[1] 0.6669175
The correlation coefficient tells us that there is a strong positive correlation between foot length and height.
The value of coefficient of determination is
Which tells us that the about 45% variability in the height is explained by the foot length.
Overall the model well fits the data.