Let X1, X2,…,Xn 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 Xis. Find the distribution of Y.
In regards to a uniform distribution there is no mode and every outcome is equally likely to occur; the mean and median coincide, and the distrubtion looks like a rectangle.
The way to obtain the area under the curve, once should use the following formula \[(x - 1) * P(x)\] #Part 2 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).
A) 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.)
According to Khan Academy the difference between the geometric distribution and the binomial distribution is you stop playing after you have your first success.
Geometric Distribution Model \[P(X = n) = (1 - p)^{(n-1)}p\]
Expected Value \[E(X) = \frac{1}{p}\] Variance \[Var(X) = \frac{1-p}{p^2}\] Using R, we will use the pgeom function
cat("Geometric Distribution: Probability","\n")
## Geometric Distribution: Probability
(gp <- pgeom(8,0.1,lower.tail = FALSE))
## [1] 0.3874205
cat("Geometric Distribution: Complement","\n")
## Geometric Distribution: Complement
(one_minus_gp <- 1 - gp)
## [1] 0.6125795
cat("Geometric Distribution: Expected Value","\n")
## Geometric Distribution: Expected Value
(ge <- 1/gp)
## [1] 2.581175
cat("Geometric Distribution: Variance","\n")
## Geometric Distribution: Variance
(gv <- (1-0.1)/(0.1**2))
## [1] 90
cat("Geometric Distribution: Standard Deviation","\n")
## Geometric Distribution: Standard Deviation
(gsd <- sqrt(gv))
## [1] 9.486833
B) What is the probability that the machine will fail after 8 years? Provide also the expected value and standard deviation. Model as an exponential.
Expected Value \[E(X) = \frac{1}{\lambda}\] Variance \[Var(X) = \frac{1}{\lambda^2}\] We will utilize the pexp function
cat("Exponential Distribution: Probability","\n")
## Exponential Distribution: Probability
(ep <- pexp(8,0.1,lower.tail = FALSE))
## [1] 0.449329
cat("Exponential Distribution: Complement","\n")
## Exponential Distribution: Complement
(one_minus_ep <- 1 - ep)
## [1] 0.550671
cat("Exponential Distribution: Expected Value","\n")
## Exponential Distribution: Expected Value
cat("Exponential Distribution: Standard Deviation","\n")
## Exponential Distribution: Standard Deviation
C) 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).
Binomial Distribution Model \[\binom{n}{k} = \frac{n!}{k!(n-k)!} p^x(1-p)^{(n-x)}\] p is the probability of each choice we want k is the number of choices we want n is the total number of choices
Expected Value \[E(X) = np\] Standard Deviation Formula \[\sigma = \sqrt{np(1-p)}\] We will use the pbinom function in R to acheive our results.
cat("Binomial Distributuion: Probability","\n")
## Binomial Distributuion: Probability
(bp <- pbinom(0, size = 8, prob=0.1))
## [1] 0.4304672
cat("Binomial Distributuion: Complement","\n")
## Binomial Distributuion: Complement
(one_minus_bp <- 1 - bp)
## [1] 0.5695328
cat("Binomial Distributuion: Expected Value","\n")
## Binomial Distributuion: Expected Value
(be <- 8 * 0.1)
## [1] 0.8
cat("Binomial Distributuion: Standard Deviation","\n")
## Binomial Distributuion: Standard Deviation
(bsd <- sqrt(8 * 0.1 * (1-0.1)))
## [1] 0.8485281
D) What is the probability that the machine will fail after 8 years? Provide also the expected value and standard deviation. Model as a Poisson.
The Poisson distribution can provide a reasonable approximation to the binomial distribution if n is large and p is small.
Poisson Distribution Model \[f(x) = \frac{\lambda^xe^-1}{x!} where x=0,1,2,3...\] Expected Value \[E(X) = \lambda\] Variance \[Var(X) = \lambda\]
cat("Poisson Distributuion: Probability","\n")
## Poisson Distributuion: Probability
(pp = ppois(0,lambda = 1, lower=FALSE))
## [1] 0.6321206
cat("Poisson Distributuion: Complement","\n")
## Poisson Distributuion: Complement
(one_minus_pp <- 1 - pp)
## [1] 0.3678794
cat("Poisson Distributuion: Expected Value","\n")
## Poisson Distributuion: Expected Value
(pe <- 10)
## [1] 10
cat("Poisson Distributuion: Expected Value","\n")
## Poisson Distributuion: Expected Value
(pe <- 10)
## [1] 10
cat("Poisson Distributuion: Standard Deviation","\n")
## Poisson Distributuion: Standard Deviation
(psd <- sqrt(pe))
## [1] 3.162278