- Let \(X_1, X_2, ...,X_n\) be \(n\) mutually independent random variables, each of which is uniformly distributed on the integers from \(1\) to \(k\). Let \(Y\) denote the minimum of the \(X_i\)’s. Find the distribution of \(Y\).
- Suppose minimum of the \(X_i\) is \(P(Y=j)\).
- First, suppose that each \(X_i\) has \(k\) possibilities: \(1,2,...,k\).
- Then, the total possible number of assignments for the entire collection of random variables \(X_1, X_2, ...,X_n\) is \(k^n\).
- Now, the number of ways of getting \(Y=1\) is \(k^n-(k-1)^n\), since \(k^n\) represents the total number of options and \((k-1)^n\) represent all of the options where none of the \(X_i\)’s are equal to \(1\).
- If \(Y=2\), then there are \(k^n-(k-2)^n-[k^n-(k-1)^n]\) different options for the collection of \(X_i\)’s, where the \(k^n\) represents the total number of options, \((k-2)^n\) represents the number of ways that we could assign \(X_1, X_2, ...,X_n\) with all of their values being greather than 2, and, as we showed above, \([k^n-(k-1)^n]\) represents the number of ways that we could assign \(X_1, X_2, ...,X_n\) and have at least one of them equal 1.
- We can simplify \(k^n-(k-2)^n-[k^n-(k-1)^n]\) to get \((k-1)^n-(k-2)^n\).
- In general, if \(Y=j\) then there are \((k-j+1)^n-(k-j)^n)\) ways to assign \(X_1, X_2, ...,X_n\) so that the minimum value is \(j\).
- Therefore, we should define \(P(Y=j)\) to be \(\frac{(k-j+1)^n-(k-j)^n)}{k^n}\).
- Your organization owns a copier (future lawyers, etc.) or MRI (future doctors). This machine has a manufacturer’s expected lifetime of 10 years. This means that we expect one failure every ten years. (Include the probability statements and R Code for each part.).
- What is the probability that the machine will fail after 8 years?. Provide also the expected value and standard deviation. Model as a geometric. (Hint: the probability is equivalent to not failing during the first 8 years..)
p <- 1/10 #probability of the event
k <- 8 #no faiulres in first 8 trials
print(paste0("The probability that the machine will fail after 8 years is ", dgeom(k, p)))
## [1] "The probability that the machine will fail after 8 years is 0.043046721"
q <- 1-p
print(paste0("Expected value is ", 1/p))
## [1] "Expected value is 10"
print(paste0("Standard Deviation is ", sqrt((1-p)/p^2)))
## [1] "Standard Deviation is 9.48683298050514"
- What is the probability that the machine will fail after 8 years?. Provide also the expected value and standard deviation. Model as an exponential.
lambda <- 1/10 #success rate
print(paste0("The probability that the machine will fail after 8 years is ", dexp(k, p)))
## [1] "The probability that the machine will fail after 8 years is 0.0449328964117222"
print(paste0("Expected value is ", 1/p))
## [1] "Expected value is 10"
print(paste0("Standard Deviation is ", sqrt(1/lambda^2)))
## [1] "Standard Deviation is 10"
- What is the probability that the machine will fail after 8 years?. Provide also the expected value and standard deviation. Model as a binomial. (Hint: 0 success in 8 years)
n <- 8 #number of trials
k <- 0 #number of failures
p <- 1/10 #probability of successes
print(paste0("The probability that the machine will fail after 8 years is ", dbinom(k, n, p)))
## [1] "The probability that the machine will fail after 8 years is 0.43046721"
print(paste0("Expected value is ", n * p))
## [1] "Expected value is 0.8"
print(paste0("Standard Deviation is ", sqrt(n*p*(1-p))))
## [1] "Standard Deviation is 0.848528137423857"
- What is the probability that the machine will fail after 8 years?. Provide also the expected value and standard deviation. Model as a Poisson.
lambda <- (1/10)*8 #mean number of successes in 8 years
x <- 0 #actual number of successes in 8 years
print(paste0("The probability that the machine will fail after 8 years is ", dpois(k, lambda)))
## [1] "The probability that the machine will fail after 8 years is 0.449328964117222"
print(paste0("Expected value is ", lambda))
## [1] "Expected value is 0.8"
print(paste0("Standard Deviation is ", sqrt(lambda)))
## [1] "Standard Deviation is 0.894427190999916"