Z = − 1.13
x=seq(-3,3,length=500)
y=dnorm(x,mean=0,sd=1)
plot(x,y,type="l")
x=seq(-1.13,3,length=100)
y=dnorm(x,mean=0,sd=1)
polygon(c(-1.13,x,3),c(0,y,0),col="grey")
1-pnorm(-1.13)
## [1] 0.8707619
x=seq(-3,3,length=500)
y=dnorm(x,mean=0,sd=1)
plot(x,y,type="l")
x=seq(-3,0.18,length=100)
y=dnorm(x,mean=0,sd=1)
polygon(c(-3,x,.18),c(0,y,0),col="grey")
pnorm(0.18)
## [1] 0.5714237
x=seq(-3,10,length=500)
y=dnorm(x,mean=0,sd=1)
plot(x,y,type="l")
x=seq(8,10,length=100)
y=dnorm(x,mean=0,sd=1)
polygon(c(8,x,10),c(0,y,0),col="grey")
pnorm(8)
## [1] 1
x=seq(-3,3,length=500)
y=dnorm(x,mean=0,sd=1)
plot(x,y,type="l")
x=seq(-0.5, 0.5, length=100)
y=dnorm(x,mean=0,sd=1)
polygon(c(-.5,x,.5),c(0,y,0),col="grey")
pnorm(.5)
## [1] 0.6914625
In triathlons, it is common for racers to be placed into age and gender groups. Friends Leo and Mary both completed the Hermosa Beach Triathlon, where Leo competed in the Men, Ages 30 - 34 group while Mary competed in the Women, Ages 25 -29 group. Leo completed the race in 1:22:28 (4948 seconds), while Mary completed the race in 1:31:53 (5513 seconds). Obviously Leo finished faster, but they are curious about how they did within their respective groups. Can you help them?
Men’s group, age 30-34 μ=4313s, σ=583s Women’s group, age 25-29 μ=5216s, σ=807s
Leo’s Z Score =
(4948-4313)/583
## [1] 1.089194
Mary’s Z Score =
(5513-5216)/807
## [1] 0.3680297
Leo scored 1.09 standard deviations above the mean, while Mary scored 0.31 standard deviations above the mean, each in their respective groups.
The lower the time the better you did. Since Mary’s z-score is smaller, it mean’s she finished closer to the mean of her group, so she did better in her respective group.
1- pnorm(1.089194)
## [1] 0.1380342
x=seq(-10,10,length=500)
y=dnorm(x,mean=0,sd=1)
plot(x,y,type="l")
x=seq(0.18,5,length=100)
y=dnorm(x,mean=0,sd=1)
polygon(c(0.1380342,x,Inf),c(0,y,0),col="grey")
1- pnorm(0.3680297)
## [1] 0.3564255
x=seq(-10,10,length=500)
y=dnorm(x,mean=0,sd=1)
plot(x,y,type="l")
x=seq(0.3680297,5,length=100)
y=dnorm(x,mean=0,sd=1)
polygon(c(0.3564255,x,Inf),c(0,y,0),col="grey")
femaleheight <- c(54,55,56,56,57,58,58,59,60,60,60,61,61,62,62,63,63,63,64,65,65,67,67,69,73)
femaleheight
## [1] 54 55 56 56 57 58 58 59 60 60 60 61 61 62 62 63 63 63 64 65 65 67 67
## [24] 69 73
fhMean <- mean(femaleheight)
fhSd <- sd(femaleheight)
x1 <- fhMean - fhSd
x2 <- fhMean + fhSd
v1 <- pnorm(x2,fhMean,fhSd) - pnorm(x1,fhMean,fhSd)
v1
## [1] 0.6826895
x1 <- fhMean - 2*fhSd
x2 <- fhMean + 2*fhSd
v1 <- pnorm(x2,fhMean,fhSd) - pnorm(x1,fhMean,fhSd)
v1
## [1] 0.9544997
x1 <- fhMean - 3*fhSd
x2 <- fhMean + 3*fhSd
v1 <- pnorm(x2,fhMean,fhSd) - pnorm(x1,fhMean,fhSd)
v1
## [1] 0.9973002
We can see that the 68-95-99.7 rule is almost perfectly.
A machine that produces a special type of transistor (a component of computers) has a 2% defective rate. The production is considered a random process where each transistor is independent of the others. ####a: What is the probability that the 10th transistor produced is the first with a defect?
n = 10
p= 0.02
q = 0.98
prb = (q^(n-1)*p)
prb
## [1] 0.01667496
Ans: 1.667496%
n = 100
p= 0.02
q = 0.98
prb = (q^(n))
prb
## [1] 0.1326196
Ans: 13.26196% chance of no defective transistors
σ=√(q/p^2) =√(0.98/0.022) =49.497
σ=√(q/p^2) =√(0.95/0.052) =19.494
Both the mean, μ, and standard deviation, σ decrease as probabilty increases.
While it is often assumed that the probabilities of having a boy or a girl are the same, the actual probability of having a boy is slightly higher at 0.51. Suppose a couple plans to have 3 kids.
dbinom(2,3,0.51)
## [1] 0.382347
P({f,m,m}or{m,f,m}or{m,m,f}) =P({f,m,m})+P({m,f,m})+P({m,m,f}) =(0.49∗0.51∗0.51)+(0.51∗0.49∗0.51)+(0.51∗0.51∗0.49) =0.382347
There are 8!/(8−3)!=336 permutations in this case.
dbinom(3,8,0.51)
## [1] 0.2098355
A not-so-skilled volleyball player hasa 15% chance of making the serve, which involves hitting the ball so it passes over the net on a trajectory such that it will land in the opposing team’s court. Suppose that her serves are independent of each other.
n = 10
k = 3
p= 0.15
q = 0.85
prb = (factorial(n-1)/(factorial(k-1)*factorial(n-k))*p^k*q^(n-k))
prb
## [1] 0.03895012
she has 3.895012% chance
Since the serves are independant, the probability of her 10th serve will be successful is 15%