Because elderly people may have difficulty standing to have their heights measured, a study looked at predicting overall height from the height to the knee. The data (in cm) for five elderly men is as follows:
Knee Height, x |
57.7 |
47.4 |
43.5 |
44.8 |
55.2 |
Overall Height, y |
192.1 |
153.3 |
146.4 |
162.7 |
169.1 |
Show your R-codes and output/result (copy/paste) in the spaces for this question.
R codes
First create a data vector for knee height and overall height. Here, x is the object name for knee height and y is the object name for overall height. R codes to compute mean. variance and standard deviation is mean(), var() and sd(), respectively.
The output is reported just after the command.
x=c(57.7,47.4,43.5,44.8,55.2)
y=c(192.1,153.3,146.4,162.7,169.1)
mean(x)
[1] 49.72
mean(y)
[1] 164.72
var(x)
[1] 40.497
var(y)
309.742
sd(x)
6.363725
sd(y)
17.59949
Get Answers For Free
Most questions answered within 1 hours.