Using R, generate 10 different samples of size 20 from a standard normal distribution and generate qq plots for each sample. Include two qq plots for your answer; one that shows the sample that is most and one that shows the sample that is least similar to what we would expect from a normal population. Make sure to label which is which and explain what characteristics of the graphs you used to choose which was which.
R codes and output:
s=list()
for(i in 1:10)
{
s[[i]]=rnorm(20)
}
par(mfrow=c(2,3))
qqnorm(s[[1]],main="QQ plot for sample-1")
qqline(s[[1]])
qqnorm(s[[2]],main="QQ plot for sample-2")
qqline(s[[2]])
qqnorm(s[[3]],main="QQ plot for sample-3")
qqline(s[[3]])
qqnorm(s[[4]],main="QQ plot for sample-4")
qqline(s[[4]])
qqnorm(s[[5]],main="QQ plot for sample-5")
qqline(s[[5]])
qqnorm(s[[6]],main="QQ plot for sample-6")
qqline(s[[6]])
par(mfrow=c(2,2))
qqnorm(s[[7]],main="QQ plot for sample-7")
qqline(s[[7]])
qqnorm(s[[8]],main="QQ plot for sample-8")
qqline(s[[8]])
qqnorm(s[[9]],main="QQ plot for sample-9")
qqline(s[[9]])
qqnorm(s[[10]],main="QQ plot for sample-10")
qqline(s[[10]])
A Q-Q plot is a plot created by plotting two sets of quantiles against one another. If both sets of quantiles came from the same distribution, we should see the points forming a line that’s roughly straight.
Now see plot of sample 3, Some points at the both end lie away from straight line. This is the plot which is least similar to normal distribution.
Plot 8 is most similar to normal distribution, because almost all points are lie close to straight line.
We use quantiles of distribution to see distribution is similar to normal or not.
Get Answers For Free
Most questions answered within 1 hours.