S11202415 - Lab 3
S11202415 - Lab 3
S11202415 - Lab 3
1
S11202415- Lab 3
Question 1:
2
S11202415- Lab 3
3
S11202415- Lab 3
4
S11202415- Lab 3
5
S11202415- Lab 3
Question 2:
> mean=1
> sd=10
> n=1000
> mean
[1] 1
> sd
[1] 10
> n
[1] 1000
> SE=(sd/sqrt(n-1))
> SE
[1] 0.316386
Question 3:
Question 4:
> hist(rnorm(n=1000000, mean = 1, sd = 10),
+ main = "Normally distrubuted scores",
+ xlab = "Test score range",
+ breaks = 10,
+ density = 50,
+ col = "red")
>
> rnorm(n=1000000, mean=1, sd=10)
[1] 1.89165013 -7.89443166 -1.07718791 1.76904859 7.17056538
[6] -16.51831094 -2.99142906 -15.03535578 1.19396758 -3.97835576
[11] -3.82239780 25.51358642 -5.18772289 -11.65229502 -17.38068221
[16] -1.86427092 2.89298405 -10.84795045 22.58543275 -3.77082658
[21] 2.96331224 -9.86276832 -8.61872487 16.01049534 -0.67916129
[26] 1.60525149 -6.28050583 11.10254391 0.70869738 13.81322401
[31] -0.58343654 10.54678319 0.96370017 -1.56056209 5.25543320
[36] 19.80987739 -13.42132310 11.05569262 1.75679380 -10.38072130
[41] 17.01853487 14.83059221 10.99571581 20.37821538 20.71248339
[46] 8.13122823 -0.44259893 16.91422437 12.43035269 -12.58174892
[51] -8.98519161 -2.40102298 4.27951378 0.49135013 25.43074410
[56] 7.67347851 9.31464353 3.53805437 -9.23317616 7.59720327
6
S11202415- Lab 3
7
S11202415- Lab 3
8
S11202415- Lab 3
9
S11202415- Lab 3
> mean=1
> sd=10
> n=100000
> mean
[1] 1
> sd
[1] 10
> n
[1] 1e+05
> SE=(sd/sqrt(n-1))
> SE
[1] 0.03162293
Question 5:
Question 6:
The width of the sampling distribution does vary. This is because the sample size on the ‘y-axis’ is
larger in the second set of variables; therefore, the shape of the distribution approximates towards a
normal distribution and the mean estimate of the distribution approaches the true population mean.
10