knitr::opts_chunk$set(echo = TRUE)
MS 3.36 pg 105-106
The probability that an expert will correctly identify the matched prints is p = 92.12%. So, the probability that the expert will not identify the matched prints is q = 100 - p or 100-92.12 = 7.88%
The probability that a novice will correctly identify the matched prints is p = 74.55%. So, the probability that the novice will not identify the matched prints is q = 100 - p or 100-74.55 = 25.45%
The parcipant is probably a novice, because each class (expert and novice) has a .5 probability of being the one selected but the novice has the higher fail rate.
MS 3.52 - pg 111
We can solve this by setting it up as a conditional probability problem.
Let + denote positive test results, and user denote a user.
The problem becomes $p(+ | user) = \frac{p(+ \cap user )}{p(user)}$
$p(+ \cap user) = \frac{users\space testing\space positive}{sample \space size} = \frac{50}{1000}$
$p(user) = \frac{users}{sample \space size} = \frac{100}{1000}$
Finally, we get $\frac{p(+ \cap user )}{p(user)} = \frac{\frac{50}{1000}}{\frac{100}{1000}} = .5$ or 50%
Again, this is a conditional probability problem.
Let - denote negative test results, and nonuser denote a nonuser
The problem becomes $p(- | nonuser) = \frac{p(- \cap nonuser )}{p(nonuser)}$
$p(- \cap nonuser) = \frac{nonusers\space testing\space negative}{sample \space size} = \frac{891}{1000}$
$p(nonuser) = \frac{nonusers}{sample \space size} = \frac{900}{1000}$
Finally, we get $\frac{p(- \cap nonuser )}{p(nonuser)} = \frac{\frac{891}{1000}}{\frac{900}{1000}} = .99$ or 99%
Let +,-,u,nu* be positive result, negative result, user, nonuser***, respectively.
The problem becomes $p(u | +) = \frac{p(u)p(+|u)}{p(u)p(+|u)+p(nu)p(+|nu)}$
Then,
$p(u) = .1$, $p(nu) = .9$
$p(+|u) = \frac{\frac{50}{1000}}{.1}$, $p(+|nu) = \frac{\frac{9}{1000}}{.9}$
Finally,
$p(u|+) = \frac{(.1)(.5)}{(.1)(.5)+(.9)(.01)} = .8475$
Let $A = {x_1,x_2,x_n}, B = {y_1,y_2,y_n}$
Suppose A, B are events with $x_n, y_n$ possible outcomes.
We can compute the amount of total possible outcomes between them by calculating $|A| \times |B| = N$ (cardinalities)
${x_1,y_1},{x_1,y_2},{x_1,y_3},$
${x_2,y_1},{x_2,y_2},{x_2,y_3},$
${x_n,y_1},{x_n,y_2},{x_n,y_n}$
And for n = 3 we can see that we have $|A| \times |B| = 3\times3=9$ possible outcomes.$\square$
Let $A = {x_1,x_2,x_n}$ be a set of elements.
Let $N = |A|, n = amount\space of\space elements\space we\space want\space in\space our\space permutations$
Then, $\frac{N!}{(N-n)!}$ will tell us how many permutations we create, using n elements from a set of size N.
Let $A = {x_1,x_2,x_3}$ be a set of elements.
If we let N = 3, and n = 2 then we can calculate how many permutations we'll get using 2 elements from a set of cardinality 3.
$\frac{3!}{(3-2)!}=\frac{6}{1} = 6$
We get $x_1x_2,x_1x_3,x_2x_1,x_2x_3,x_3x_1,x_3x_2\square$
Let A be a set of N unique elements and we are going to partition them into k sets. Then we will use $\frac{N!}{n_1!...n_k!}$
The proof for the Combinations rules is derived from the proof of the Partition Rule.
We want to choose n elements from a sample of N elements and break them into two groups: the n elements that are being selected and the N-n elements that are not.
So we get $N\choose n$ $= \frac{N!}{n!(N-n)!}$
MS 4.2 - pg 138
.09 + .3 + .37 + .2 + .04
$p(x=3 \cup x=4) = p(x=3) + p(x=4) = .20 + .04 = .24$
$p(2 > x) = p(x=0) + p(x=1) = .09 + .30 = .39 $
MS 4.12 - pg 143
The first rule that 0 <= p(y) <= 1 is met because each p(y) falls within the range The second rule that the sum of all p(y) = 1 is also met, as shown below.
.17+.10+.11+.11+.10+.10+.07+.05+.03+.02+.02+.02+.02+.02+.01+.01+.01+.01+.01+.005+.005
Just sum p(10) through p(20)
.02+.02+.02+.02+.01+.01+.01+.01+.01+.005+.005
numbers <- seq(0,20) mu <- sum(numbers*c(.17,.10,.11,.11,.10,.10,.07,.05,.03,.02,.02,.02,.02,.02,.01,.01,.01,.01,.01,.005,.005)) ySquared = numbers^2 variance <- (numbers - mu)^2 * c(.17,.10,.11,.11,.10,.10,.07,.05,.03,.02,.02,.02,.02,.02,.01,.01,.01,.01,.01,.005,.005) variance <- sum(variance) variance <- round(variance, 4) paste0("The mean is: ", mu) paste0("The var is: ", variance)
Chebyshev's says that 75% will lie within k = 2 so (mu - 2s, mu + 2s)
std = sqrt(variance) paste0("The interval is: ","(",round((mu - (2*std)),4), ", ", round((mu+(2*std)),4), ")")
MS 4.34 - pg 154
Simple binomial probability $\binom{25}{10}.7^{10}.3^{15} = .0013$
Alternatively:
round(dbinom(10,size=25, prob=.7),4)
$\binom{25}{0}.7^{0}.3^{25} + \binom{25}{1}.7^{1}.3^{24} + \binom{25}{2}.7^{2}.3^{23} +\binom{25}{3}.7^{3}.3^{22} + \binom{25}{4}.7^{4}.3^{21} + \binom{25}{5}.7^{5}.3^{20} = .000000345744$
Alternatively:
pbinom(5,size=25,.7)
$\mu = np = 25(.7) = 17.5$
$\sigma^2 = npq = 25(.7)(.3) = 5.25$
$\sigma = \sqrt{\sigma^2} = \sqrt{5.25} = 2.2913$
paste0("The mean is: 17.5, the standard deviation is: 2.2913")
My interpretation: If you sample 25 graduate students, on average 17.5 students will have earned their PhD with a standard deviation of 2.2913.
MS 4.46 - pg 158
$N=50, p_k=.1$
Then the formula is: $p(y_1=5,y_2=5,y_3=5,y_4=5,y_5=5,y_6=5,y_7=5,y_8=5,y_9=5,y_10=5)=$
$\frac{50!}{(5!)^{10}} \times (.1)^{50} = .0000005$
For each of the 50 experiments we will ask if the train is assigned to Track #1.This is a binomial distribution. We want to know the probability that there will be fewer than two success to that question. In other words, $p(y=0) + p(y=1) = \binom{50}{0}\times.1^0\times.9^{49} + \binom{50}{1}\times.1^1\times.9^{50} = .0338$
MS 4.54 - pg 162
This will be a Geometric Probability distribution. So, we first need to find p. What percentage of customers give a reason that is NOT because of label or packaging? $p = \frac{12+6+4+18}{100} = .4$ and since q = 1-p, this tells us q = .6
Now, the formula will be $p(y) = (p)(q)^{y-1}$
Since $\mu =E(y) = \frac{1}{p}$ we get $\frac{1}{.4} = 2.5$
The probability that it takes exactly 1 consumer to get an answer that is other than "labeling or packaging" is $p(y) = (.4)(.6)^{1-1} = .4$
I'll first find p(y <= 2) $p(1) + p(2) = (.4)(.6)^{1-1} + (.4)(.6)^{2-1} = .64$ and since $p + p^c = 1$ then $p(y > 2) = .36$
MS 4.66 - pg 168
Asking for the expected value or mean which is $\mu = \frac{nr}{N} = \frac{80}{209} = .3828$ This means that the expected maximum is 1 facility that treats on site.
$\frac{\binom{8}{4} \binom{201}{6}}{\binom{209}{10}} = .00017$
MS 4.78 - pg 173
By definition: $\mu = \sigma^2$ so $\sigma^2 = .03$
For the assumptions to hold, the experiment will need to meet the three required characteristics:
Experiment consists of counting the number of time Y a particular (rare) event occurs during a given unit of time or in a given area or volume.
The probability that an event occurs in a given unit of time, area, or volume is the same for all the units. Also, units are mutually exclusive.
The number of events that occur in one unit of time, area, or volume is independent of the number that occur in other units.
We simply plug y=0 into the function $\lambda =.03;\quad y(0) = \frac{.03^0\times e^{-.03}}{0!} = .9704$
MS 5.2 - pg 191
$f(y) = 2c-yc ;\quad Solve\space \int_0^1f(y)dy = 1$
$2c \int_0^1 dy - c \int_0^1 y dy = 1$
$\quad\quad 2c\space-\space\frac{c}{2} = 1$
$\quad\quad c=\frac{2}{3}$
The Cdf is the integral of f(y):
$F(y) = \int_ {-\infty}^yf(x)dx = \int_0^yf(x)dx$
$\frac{2}{3}\int_0^y(2-y) = \frac{2}{3}(2\int_0^ydx - \int_0^yxdx)$
$= \frac{2}{3}(2x\rvert_0^y -\frac{x^2}{2}\rvert_0^y)$
$= \frac{2}{3}(2y-\frac{y^2}{2})$
Thus, the Cdf is $F(y) = 0\quad y\leq0; \quad\quad \frac{2}{3}(2y-\frac{y^2}{2})\quad 0
$y = .4\quad$ Since $0 < y \leq 1$ holds we use $\frac{2}{3}(2y-\frac{y^2}{2})$
$F(.4)= \frac{2}{3}(2(.4)-\frac{.4^2}{2}) = 0.48$
Being that the values of Y will be $0 < y \leq 1$ throughout the given interval we use $F(y) = \frac{2}{3}(2y-\frac{y^2}{2})$ and calculate $F(.6) - F (.1)$
$F(.1 \leq y \leq .6) = F(.6) - F(.1) = \frac{2}{3}(2(.6)-\frac{.6^2}{2}) - \frac{2}{3}(2(.1)-\frac{.1^2}{2}) = 0.55$
MS 5.10 - pg 196
Distributing we get $f(y) = \frac{3}{20} -\frac{3y^2}{500}$
To find the mean: $\mu = E(Y) = \int_{-5}^{5}y(\frac{3}{20} -\frac{3y^2}{500})dy=\int_{-5}^{5}(\frac{3y}{20} -\frac{3y^3}{500})dy = \frac{3}{20}\int_{-5}^{5}ydy - \frac{3}{500}\int_{-5}^5y^3dy = 0$
To find the variance: $E(Y^2) -\mu^2$, so we first need to find $E(Y^2) = \int_{-5}^{5}y^2(\frac{3}{20} -\frac{3y^2}{500})dy = 5$
Now use the $E(Y^2) -\mu^2 = 5 - 0 = 5$
Thus, $\mu = 0,\sigma^2 = 5$
Being that the random variable Y is in minutes, we can easily convert this in to hours by doing $\frac{Y}{60}$ and redoing the steps from (a). Since the expected value rules hold for continuous random variables, we can simply do $E(\frac{1}{60}Y) = \frac{1}{60}E(Y) = 0$ so $\mu = 0$ still.
For the variance we do the same, but c is squared: $E(\frac{1}{60^2}Y^2) = \frac{1}{60^2}E(Y^2) = \frac{5}{60^2}= .0014$
We will take the exact same steps but multiply by 60 instead of dividing.
$\mu = E(60Y) = 60E(Y) = 60\times0 = 0$
For the variance: $E(60Y^2) = 60^2E(Y^2) = 60^2\times5 = 18000$
MS 5.36 - pg 205
We have two methods of doing this (*Note: Since Y is continuous, the boundaries we use are not critical as they were with discrete random variables):
round(1-pnorm(45, mean=50, sd=3.2),4)
round(1-pnorm(-1.5625, mean=0, sd=1),4)
And we see that using both methods the answer is $0.9409$
Again we have two methods of doing this. But since Y is an upperlimit, we only need to find the lower tail.
round(pnorm(55, mean=50, sd=3.2),4)
round(pnorm(1.5625, mean=0, sd=1),4)
Once again we can see that both methods return the same result of $0.9409$ (Note: Again, since Y is continuous, it is not important that we use $<$ or $\leq$)
Using the same strategy from (a) and (b) we can calculate $p(52) - p(51)$ to get the area in between
round(pnorm(52, mean=50,sd=3.2) - pnorm(51,mean=50, sd=3.2),4)
round(pnorm((52-50)/3.2, mean=0, sd=1) - pnorm((51-50)/3.2,mean=0,sd=1),4)
As you can see, both methods give the same answer of: $0.1113$
MS 5.38 - pg 205
round(pnorm(700, mean = 605, sd=185)-pnorm(500, mean = 605, sd=185),4)
round(pnorm(500, mean = 605, sd=185)-pnorm(400, mean = 605, sd=185),4)
round(pnorm(850, mean = 605, sd=185),4)
round(1-pnorm(1000,mean=605, sd=185),4)
y <- 605 + qnorm(.9, mean=0, sd=1) * 185 y
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.