Y = min(X1, X2, … Xn)
n
are mutually independentt random variables and uniformly distributed, meaning that there is no overlap or repetition in variables. Thus the distribution of Y is always count as 1 or probability of \(\frac{1}{n}\)
The number of possible combinations of \(X_i\) is \(k^n\) – choose n
values out of k
options with replacement.
Consider number of combinations with at least one 1
.
P(Y = 1) = \(\frac{k((k-1)^n)}{k^n}\)
Consider the number of combinations with at least one 2
and no 1
.
P(Y = 2) = \(\frac{k^n - (k^n - (k-1)^n) - (k-2)^n}{K^n}\) = \(\frac{k^n - k^n +(k-1)^n - (k-2)^n}{k^n}\) = \(\frac{(k-1)^n - (k-2)^n}{k^n}\)
Consider the number of combinations without 1
or 2
but at least one 3
P(Y = 3) = \(\frac{k^n - (k^n - (k-1)^n) - ((k-1)^n) - (k-2)^n) - (k-3)^n}{}\) = \(\frac{k^n - k^n + (k-1)^n - (k-1)^n +(k-2)^n - (k-3)^n}{}\) = \(\frac{(k-2)^n - (k-3)^n}{k^n}\)
Thus we can generalize this by
P(Y = a) = \(\frac{(k-a+1)^n - (k-a)n}{k^n}\)
k = 50
sample <- runif(k, min = 1, max = k)
Y = min(sample)
plot(sample)
hist(sample)
Cumulative Distribution Function (cdf) for the geometric distribution, \(F_X(k)=P(X\le k)=1-q^{k+1}\), where k
is the number of failures before the first success. The R pgeom
defines the geometric distribution this way.
Thus to calculate P(X > 8) using geometric distribution:
pgeom(8, 0.1, lower.tail = F)
## [1] 0.3874205
The expected value (number of years before the first machine fails) is
q <- 0.9
p <- 0.1
E.v <- q/p
E.v
## [1] 9
The standard deviation is \(\sigma^2 = \sqrt{q/p^2} = \sqrt{0.9/0.1^2} \approx 9.4868\).
sqrt(q/p^2)
## [1] 9.486833
For exponential distribution, CDF \(F_X(k) = P(X \le k) = 1-e^{-\lambda k}\), where \(\lambda\) is the rate parameter.
For the b example, \(\lambda = 0.1\).
pexp(8, 0.1, lower.tail = FALSE)
## [1] 0.449329
The expected value is \(E(X) = 1/\lambda = 1/0.1 = 10\)
The standard deviation is \(\sigma^2 = \sqrt{1/\lambda^2} = 1/\lambda = 10\)
For binomial distribution, \(P(X=k)= {n \choose k}p^k q^{n-k}\).
Probability of a machine failing after 8 years is equivalent to probability 0 successes after 8 trials.
Thus, for \(k=0\) and \(n=8\), \(P(X=0) = {8\choose0} 0.1^0 \times 0.9^{8-0} = 1 \times 1 \times 0.9^8 \approx 0.4305\).
pbinom(0,8,0.1,lower.tail=TRUE)
## [1] 0.4304672
The Expected value \(E(X)=np= 8 \times 0.1 = 0.8\)
The standard deviation \(\sigma^2 = \sqrt{npq} = \sqrt{8 \times 0.1 \times 0.9} \approx 0.8485\).
For Poisson distribution, \(P(X=k)=\frac{e^{-\lambda}\lambda^k}{k!}\)
Similar to the binomial distribution, the probability of a machine failurre after 8 years is the same as probability of 0 successes after 8 intervals.
\(P(X=0)^8 = (\frac{e^{-0.1} \times 0.1^0}{0!})^8 = (e^{-0.1})^8 \approx 0.4493\)
ppois(0, 0.1, lower.tail = TRUE)^8
## [1] 0.449329
The expected value \(E(X) = \sigma^2 = \lambda = 0.1\).
The standard deviation \(\sigma^2 = \sqrt{\lambda} = \sqrt{8 \times \frac{1}{10}} \approx 0.8944\).