4. Using R code, compare the pdfs of three normal random variables, one with mean 1 and standard deviation 1, one with mean 1 and standard deviation 10, and one with mean -4 and standard deviation 1.
Thank you
If we plot three pdf separately we get:
R code: ggdistribution(dnorm,seq(-4,4,0.1),mean=1,sd=1)
Mean=1,SD=10
R code: ggdistribution(dnorm,seq(-10,5,0.1),mean=1,sd=10)
Mean=-4,SD=1
R code: ggdistribution(dnorm,seq(-30,35,0.1),mean=-4,sd=1)
For comparison we plot them into one graph and get:
Red: mean=1 SD=10
Blue: mean=1 SD=1
Yellow: mean=-4 SD=1
R code:
p=ggdistribution(dnorm,seq(-30,35,0.1),mean=1,sd=1,colour='blue')
p=ggdistribution(dnorm,seq(-30,35,0.1),mean=1,sd=10,colour='red',p=p)
ggdistribution(dnorm,seq(-30,35,0.1),mean=-4,sd=1,colour='yellow',p=p)
Get Answers For Free
Most questions answered within 1 hours.