library('utils')
library("RcppParallel")
library("Rcpp")
library("StMoSim")
library("fastGraph")
mean<- 0
SD <- 1
x <- seq(-4, 4, length = 1000)
y <- dnorm(x, mean, SD)
shadeDist(-1.13,lower.tail = FALSE,col = c("black", "blue"))
shadeDist(0.18, col = c("yellow", "grey"))
shadeDist(8, col = c("green", "grey"),lower.tail = FALSE)
shadeDist( c( 0, 0.5 ), , 0, 1, col = c("black", "red"),lower.tail = FALSE )
Remember: a better performance corresponds to a faster finish.
N(mean,sd); men- N(4313,583) ; women- N(5261,807)
leo_z<-(4948-4313)/583
leo_z
## [1] 1.089194
mary_z<-(5513-5261)/807
mary_z
## [1] 0.3122677
The score indicates that Mary did much better within her group than Leo with standard deviation of .31 verses 1.09 for Leo
Mary rank much better than Leo it has with Low positive standard deviation
pnorm(leo_z,lower.tail=FALSE)
## [1] 0.1380342
pnorm(mary_z,lower.tail=FALSE)
## [1] 0.3774186
If the curve changed and skewed the answer would change. The distribution would be shifted from the center and the z-score would be effected. Thus, the z-score evaluation might not me be the best for this evaluation since it depends on the mean, where the median would have better result in this case.
hgt <- 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)
summary(hgt)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 54.00 58.00 61.00 61.52 64.00 73.00
qqnormSim(hgt, nSim=500)
pnorm(61.52+1*4.58,mean=61.52,sd=4.58)
## [1] 0.8413447
pnorm(61.52+2*4.58,mean=61.52,sd=4.58)
## [1] 0.9772499
pnorm(61.52+3*4.58,mean=61.52,sd=4.58)
## [1] 0.9986501
The information above didn’t show that the distribution follows the 68-95-99.7 rules and the distribution seems to be a little bit skewed to the right.
it appear it following normal distribution. The point of the q-q plot fall within the boundries.
0.98^(10-1)*0.2
## [1] 0.1667496
0.98^(100)
## [1] 0.1326196
1/.02
## [1] 50
1/0.05
## [1] 20
Increasing the probability of an event will decrease the mean and standard deviation.
p <- 0.51
k <- 2
n <- 3
fN <- factorial(n)
fK <- factorial(k)
fn_k <- factorial(n-k)
p2_of_3 <- ( fN / (fK * fn_k)) * p^k * (1-p)^(n-k)
p2_of_3
## [1] 0.382347
posiible outcomes;
((1-p) * p * p) * 3
## [1] 0.382347
Because if requires manual input of the possible combination
choose(9,2)*0.15^3*0.85^7
## [1] 0.03895012
The probability is 15%
For a, we are determining the probability of success for number of trials; while for b, we are determining the probability of a single event based on previous trials. Thus we have this discrepancy.