1.0 normal distribution
z<-pretty(c(-5,5),100)
ht<-dnorm(z)
plot(z,ht,type = "l")
Probability or area of a point
pnorm(-2)#P(Z<-2)
## [1] 0.02275013
Find area given z =0.95
qnorm(0.95)#p(z<?)=0.95
## [1] 1.644854
#1.0 Afriend tales you the piece of brains has a mean of 22 and a standard deviation of 6.2.
#Find the proportion of the piece below 25.9
#solution
pnorm(25.9,22,6.2)
## [1] 0.735336
#2.0 If the health of children has a mean of 87 and a standard deviation of 5.1 .
#Find value for which 63.79 percent of the health fall below
#solution
qnorm(0.6379,87,5.1)
## [1] 88.79954
#3.0 you discover that the softness of cats has a mean of 84 and a standard deviation of 4.3 .
#Find the value for which 4.48 percent of the softness falls a bove .
qnorm(1-0.0448,84,4.3)
## [1] 91.2993
#4.0 A friend tells you that the amplitude of seattleites has a mean of 59 and a standard deviation of 5.1
#find the proportion of the amplitude between 60.3 and 68.2
pnorm(68.2,59,5.1)-pnorm(60.3,59,5.1)
## [1] 0.3637776
#5.0 A google search shows that piety skittles has a mean of 67 and standard deviation of 5.9
#find the value 7.25 percent of the piety fall below
#solution
qnorm(0.0725,67,5.9)
## [1] 58.40121
#6.0 suppose the knowledge of airlines has a mean of 58 and a standard deviation of 4.3
#find proportion of the knowledge below 55.2 and above 63.4
#solution
pnorm(55.2,58,4.3)+(1-pnorm(63.4,58,4.3))
## [1] 0.3620624
#7.0 lets assume that the news of weather events has a mean of 42 and astandard devition of 5.6
#find the proportion of the news below 40 and above 41.2
#solution
pnorm(40,42,5.6)+(1-pnorm(41.2,42,5.6))
## [1] 0.9172909
#8.0 suppose the importance of the chickens has a mean of 90 and atatdard deviation of 3.7
#find the proportion of the importance below 85.3
#solution
pnorm(85.3,90,3.7)
## [1] 0.1019942
#9.0 a friend tells you that the quantity of psychology classes has amean of 21 and a standard deviation of 6 .
#find values that bracket the middle 2.66 percent of the quantity
#solution
c(qnorm((1-0.0266)/2,21,6),qnorm(1-(1-0.0266)/2,21,6))
## [1] 20.79993 21.20007
#10.0 if you know that the wind of bananas has a mean of 11 and a standard deviation of 4.2
#find values that brackets the middle 55.39 percent of teh wind
#solution
c(qnorm((1-0.5539)/2,11,4.2),qnorm(1-(1-0.5539)/2,11,4.2))
## [1] 7.799881 14.200119
#11.0 suppose the price of babies has a mean of 61 and a standard deviation of 5.9 .
#Find proportion of the price between 60.6 and 64
pnorm(64,61,5.9)-pnorm(60.6,61,5.9)
## [1] 0.2214659
#12.0 suppose the culture of fathers has amean of 38 and a standard deviation of 5.4
#find value for which 77.62 percent of the culture fall below
qnorm(0.7762,38,5.4)
## [1] 42.10088
#13.0 a friend tels you that the recognination of airlines has a mean of 85 and atandard deviation of 5.4
#find value for which 9.12 percent of recognition fall below
#solution
qnorm(0.0912,85,5.4)
## [1] 77.79963
#14.0 suppose the speed of UW undergraduates has amean of 97 and a standard deviation of 5.4.
#find the proportion of the speed below 100.9 and above 103.1
#solution
pnorm(100.9,97,5.4)+(1-pnorm(103.1,97,5.4))
## [1] 0.8942372
#15 a google search shows that thae speeed of apartments has amean of 95 and a stsndard deviation of 2.6
#find value for which 39.39 percent of the speed fall below
#solution
qnorm(0.3939,95,2.6)
## [1] 94.30016
#16 let assume that the IQ of monkeys has a mean of 9 and a standard deviation of 4.7
#find the proportion of the IQ below 10.5
pnorm(10.5,9,4.7)
## [1] 0.6251932
#17.0 you discover that the equipment of interest rate has a mean of 6 and a standard deviation of 4.5
#find the proportion of the equipment below 6
pnorm(6,6,4.5)
## [1] 0.5
#18.0 a friend tells you that the arousla of oceans has a mean of 51 and astandard deviation of 6.6
#find the value for which 80.19 percent of arousla fall below
qnorm(0.8019,51,6.6)
## [1] 56.59962
#19.0 if you kow the soap of republicans has amean of 93 and a standard deviation of 5.3
#find the proportion of the soap between 88.1 and 92.6
pnorm(92.6,93,5.3)-pnorm(88.1,93,5.3)
## [1] 0.292314
#20.0 if the shopping of ping pong balls has a mean of 15 and a standard deviation of 5.1
#find the proportion of the shopping below 12.1
pnorm(12.1,15,5.1)
## [1] 0.2848045
#21.0 afriend tells you that the piety of bananas has amean of 59 and a standard deviation of 4.7
#find the value for which 66.48 percent of the piety fall below
qnorm(0.6648,59,4.7)
## [1] 61.00032
#22.0 suppose atime for brothers has a mean of 83 and a standard devition
#find values that bracket the middle 98.53 percent of the time
c(qnorm((1-0.9853)/2,83,6.6),qnorm(1-(1-0.9856)/2,83,6.6))
## [1] 66.89807 99.15104
#23 suppose the importance of oranges has am ean of 73 and standard deviation of 3.9
#find the proportion of the importance below 77.4
pnorm(77.4,73,3.9)
## [1] 0.8703834
#24 if the importance of daughters has a mean of 33 and a standard deviation of 5.6
#find the value for which 60.56 percent of importance falls a browseVignettes
qnorm(1-0.6056,33,5.6)
## [1] 31.49993
#25 suppose the distance of europeans has amean of 50 and a standard deviation of 5.4
#find the value of which 83.68 percent of the distance falls above
qnorm(1-0.8368,50,5.4)
## [1] 44.70049
#26 if you know the safety of computers has a mean of 29 and a standard deviation of 4
#find value for which 62.74 percent of the safety fall below
qnorm(0.6274,29,4)
## [1] 30.2999
#27.0 lets assume that the music of labaratory rate has a mean of 89 and a standard deviation of 6.5
#find the proportion of the music below 93.9
pnorm(93.9,89,6.5)
## [1] 0.7745292
#28.0 money of psychilogical class has a mean of 92 and a standard deviation of of 4.5
#ind the proportion of the money below 90.9 and above 96
pnorm(90.9,92,4.5)+(1-pnorm(96,92,4.5))
## [1] 0.5904747
#29.0 happiness has a mean of 92 and standard deviation of 4.3
#ind proportion of hapinness below 80.4 and above 90.1
pnorm(89.4,92,4.3)+(1-pnorm(90,1.92,4.3))
## [1] 0.2727054
#30 oranges has amean of 38 and standarded deviation of 48
#ind the proportion of the peace below 32.9 and a bove 40.7
pnorm(32.9,38,4.8)+(1-pnorm(40.7,38,4.8))
## [1] 0.4308921
t-distribution
t<-pretty(c(-5,5),100)
ht<-dt(t,3)
plot(t,ht,type = "l")
find probability of -2 given 3 degrees of freedom
pt(-2,3)
## [1] 0.06966298
find t value given probability 0.95 of and 3 degree of freedom
qt(0.95,3)
## [1] 2.353363
simulation
z<-rnorm(10)#generate 10 random numbers standard normally distributed
z
## [1] 0.11746819 0.15319082 -0.10726244 -1.52152880 -1.96751613 1.28659074
## [7] 0.17860933 -0.18886382 1.20682802 -0.07447976
qqplot
qqnorm(z)
qqline(z)
plot 4 qqplots
loops
```r
par(mfrow=c(2,2))
N<-4
for (i in 1:N){z<-rnorm(10)
qqnorm(z)
qqline(z)}