Let \(X =\) catfish weight. \(X\) has a normal distribution with mean \(3.4\) and standard deviation \(0.8\). Find the \(98^{th}\) percentile of \(X\).
qnorm(0.98,3.4,0.8)
[1] 5.042999
Let \(X =\) how long customers are willing to wait. \(X\) has an exponential distribution with \(\lambda = \frac{1}{3.5}\). Find \(P(X>5)=1-P(X<5)\)
1-pexp(5,1/3.5)
[1] 0.239651
Let \(X =\) time you have to wait at dentist’s office. \(X\) has a uniform distribution from \(0\) to \(20\), i.e. \(f(x) = \frac{1}{20}\) for \(0 \le x \le 20\)
punif(15,0,20) - punif(10,0,20)
[1] 0.25
Let \(X =\) over the counter sales and let \(Y\) = deliveries and so \(X+Y\) = monthly sales.
102972 + 242354
[1] 345326
sqrt(13523^2 + 24956^2)
## [1] 28384.39
4*50 - 3*100
[1] -100
sqrt(4^2 * 50 + (-3)^2 * 200 + 2*4*-3*.5*sqrt(50)*sqrt(200))
[1] 37.41657
Let \(X =\) number of units produced with mean \(1100\) and standard deviation \(800\). Let \(Y\) = profit = \(7200 - 2.8X\)
7200 - 2.8*1100
[1] 4120
2.8^2*(800)
[1] 6272
| Weight in Ounces | 14 | 15 | 16 | 17 |
|---|---|---|---|---|
| Probability | 0.10 | 0.30 | 0.40 | 0.20 |
x <- c(14,15,16,17)
p <- c(0.1,0.3,0.4,0.2)
mean <- sum(x*p)
mean
[1] 15.7
x <- c(14,15,16,17)
p <- c(0.1,0.3,0.4,0.2)
mean <- sum(x*p)
dev.sq <- (x-mean)^2
sd <- sqrt(sum(dev.sq*p))
sd
[1] 0.9
Let \(X =\) the number of RVs sold per month. \(X\) has a Poisson distribution with \(\lambda=6\).
dpois(4,6)
[1] 0.1338526
1-ppois(3,6)
[1] 0.8487961
Let \(X =\) trucks without air conditioning. \(X\) has a hypergeometric distribution with \(N=18\), \(S=4\), \(n=4\), \(x=0,1,2,3,4\)
dhyper(2,4,14,4)
[1] 0.1784314
x <- c(0,1,2)
p <- dhyper(x,4,14,4)
sum(p)
[1] 0.9813725
phyper(2,4,14,4)
[1] 0.9813725
Let \(\bar X =\) average amount that \(25\) randomly selected students spend on entertainment each week \(\sim N(52.30,\frac{18.23}{\sqrt{25}})\)
1-pnorm(60,52.30,18.23/sqrt(25))
[1] 0.01734737
qnorm(0.35,52.3,18.23/sqrt(25))
## [1] 50.89512
Let \(\hat p\) = sample proportion of the \(100\) tax returns that lead to refund.
\(\hat p\) has a normal distribution with mean \(p=0.8\) and standard error \(\sqrt{\frac{0.8(1-0.8)}{100}}=0.04\)
pnorm(0.84,0.8,0.04) - pnorm(0.78,0.8,0.04)
[1] 0.5328072
qnorm(0.4,0.8,0.04)
## [1] 0.7898661
| \(x=1\) | \(x=2\) | \(x=3\) | |
|---|---|---|---|
| \(y=0\) | \(0.10\) | \(0.12\) | \(0.06\) |
| \(y=1\) | \(0.05\) | \(0.10\) | \(0.11\) |
| \(y=2\) | \(0.02\) | \(0.16\) | \(0.28\) |
x <- c(1,2,3)
px <- c(.10+.05+.02,.12+.10+.16,.06+.11+.28)
meanx <- sum(x*px)
meanx
## [1] 2.28
y <- c(0,1,2)
pyx2 <- c(0.12,0.10,0.16)/(0.12+0.10+0.16)
meanyx2 <- sum(y*pyx2)
meanyx2
## [1] 1.105263
y <- c(0,1,2)
py <- c(.1+.12+.06,.05+.1+.11,.02+.16+.28)
meany <- sum(y*py)
meany
## [1] 1.18
exy <- .05+2*.1+3*.11+2*.02+4*.16+6*.28
exy
## [1] 2.94
cov <- (exy-meanx*meany)
cov
## [1] 0.2496
Let \(X =\) number of free throws he makes in eight shots \(\sim Bin(8,0.80)\)
x <- c(6,7,8)
p <- dbinom(x,8,0.8)
x
[1] 6 7 8
p
[1] 0.2936013 0.3355443 0.1677722
sum(p)
[1] 0.7969178
mean <- 8*0.8
mean
## [1] 6.4
sigma <- sqrt(8*0.8*0.2)
sigma
[1] 1.131371
Let \(X =\) number of soft drinks you get. \(X\) has a hypergeometric distribution with \(N = 14\), \(S = 8\), \(n = 3\) and \(x = 0,1,2,3\).
| \(x\) | \(0\) | \(1\) | \(2\) | \(3\) |
|---|---|---|---|---|
| \(p(x)\) | \(\frac{C_0^8 C_3^6}{C_3^{14}}=0.05\) | \(\frac{C_1^8 C_2^6}{C_3^{14}}=0.33\) | \(\frac{C_2^8 C_1^6}{C_3^{14}}=0.46\) | \(\frac{C_3^8 C_0^6}{C_3^{14}}=0.15\) |
x <- c(0,1,2,3)
p <- dhyper(x,8,6,3)
x
[1] 0 1 2 3
p
[1] 0.05494505 0.32967033 0.46153846 0.15384615