4
$\begingroup$

I wrote the following code in R to make the following qqplot. In a question I am asked to read the mean and standard deviation of the sample off the plot. I see that the mean can be read as the intersection of the blue line with the vertical line starting from the 0 on the x-axis. However I don't see an obvious way of reading the standard deviation which I tried to draw in brown with the following equation

$$ \mathbf{CI} = \Big[\bar{x}_n \pm Z \cdot \frac{s_x}{\sqrt{n}}\Big] $$

my_data <- ToothGrowth
attach(my_data)
library("car")
n = length(len)
z = 1.96
stndev = sd(len)
meansample = mean(my_data$len)
mediansample = median(len)
bound = z+(stndev/sqrt(n))
qqPlot(len)
abline(h=meansample, col="green")
abline(h=mediansample, col="red")
abline(h=meansample+bound, col="brown")
abline(h=meansample-bound, col="brown")

enter image description here

$\endgroup$
1

1 Answer 1

1
$\begingroup$

On your plot, standard deviation corresponds to the slope of the center blue line. Remember "rise over run?" If you move left one standard deviation, say from x=0 to x=1, then y increases from about 19 to 27 which is a rise of about roughly 8. Therefore the standard deviation is approximately 8. You can compare this to sd(len).

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.