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.). this is saying P = 1/10 = 0.1
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..)
The geometric distribution represents the number of failures before you get a success in a series of Bernoulli trials. This discrete probability distribution is represented by the probability density function:
\[ f(x) = p(1 − p)^{x − 1} , where \quad p \quad is \quad the \quad probability \quad of \quad success, 1-p = q \quad is \quad the \quad probability \quad of \quad failure\] There are 03 assumptions for the Geometric Distribution
1-There are two possible outcomes for each trial (success or failure). 2-The trials are independent. 3-The probability of success is the same for each trial.
So , the event machine fails after 8 years is equivalent to event happens more than 8 years or the probability is equivalent to not failing during the first 8 years.
\[ P(8>X) = 1 - P(8\leqslant X) = 1- (1-q^8) = 0.9^8 = 0.4305 \]
## a. What is the probability that the machine will fail after 8 years?
## Answer: 0.4304672
##
## The expected value is 10
## The standard deviation is 9.486833
The exponential distribution is often concerned with the amount of time until some specific event occurs. The probability density function: \[ f(x) = λe^{–λx} , where \quad the \quad number \quad e = 2.71828182846… λ \quad is \quad the \quad rate\quad parameter\]
\[ P(X=k)= λe^{−λk}, where \quad k > 0 \quad and \quad P(X=x) = 0\quad as \quad otherwise, \quad EX \quad or \quad \\EV = expected \quad value = \frac{1}{λ}\\ Var(X) = EX^2 - (EX)^2 = \frac{1}{λ^2} \\ SD = \sqrt{Var(X)} \]
cat("\n The probability that your MRI will fail after 8 years is ", round((1-pexp(8, 0.1)), 4))
##
## The probability that your MRI will fail after 8 years is 0.4493
cat("\n The probability that your MRI will fail after 8 years is ", round(1-(1-exp(-0.1*8)), 4))
##
## The probability that your MRI will fail after 8 years is 0.4493
cat("\nlambda = 1/10, EV = 1 , What is the expected failure time? The expected failure time is 10.")
##
## lambda = 1/10, EV = 1 , What is the expected failure time? The expected failure time is 10.
cat("\nWhat is the standard deviation? The standard deviation is 10.")
##
## What is the standard deviation? The standard deviation is 10.
A binomial distribution can be thought of as simply the probability of a SUCCESS or FAILURE outcome in an experiment or survey that is repeated multiple times. The binomial is a type of distribution that has two possible outcomes (the prefix “bi” means two, or twice).
I found this reference interesting as it mentioned my former school …https://www.statisticshowto.com/probability-and-statistics/binomial-theorem/binomial-distribution-formula/#:~:text=Worked%20Examples-,What%20is%20a%20Binomial%20Distribution%3F,means%20two%2C%20or%20twice).
The binomial distribution is closely related to the Bernoulli distribution. According to Washington State University, “If each Bernoulli trial is independent, then the number of successes in Bernoulli trails has a binomial Distribution. On the other hand, the Bernoulli distribution is the Binomial distribution with n=1.”
\[ P(X = x) = \quad \dbinom{n}{x} p^x q^{n-x} \]
cat("\n The probability that your MRI will fail after 8 years is ", round(dbinom(0,8, .1), 4))
##
## The probability that your MRI will fail after 8 years is 0.4305
cat("\n What is the expected failure time?\n The expected failure time is np = 0.1*8 = 0.8.")
##
## What is the expected failure time?
## The expected failure time is np = 0.1*8 = 0.8.
cat("\n What is the standard deviation? \n The standard deviation is sqrt((np(1-p))) = .", sqrt(0.8*0.9))
##
## What is the standard deviation?
## The standard deviation is sqrt((np(1-p))) = . 0.8485281
The Poisson distribution is used to model the number of events occurring within a given time interval. In other words, the number of successes in a Poisson experiment is referred to as a Poisson random variable. A Poisson distribution is a probability distribution of a Poisson random variable.
Poisson distribution \[ P(X=k)= \frac{λ^k e^{−λ}}{k!} \] So, if we have 1 failure every 10 years , this means we have 0.1 failure rate per year . Thus, for 8 years , the rate will be lambda = 0.1x8 = 0.8
p <- ppois(0, lambda = 0.8)
cat("\n The probability that your MRI will fail after 8 years is ", p)
##
## The probability that your MRI will fail after 8 years is 0.449329
cat("\n What is the expected failure time?\n The expected failure time is EV = lambda = 0.8")
##
## What is the expected failure time?
## The expected failure time is EV = lambda = 0.8
cat("\n What is the standard deviation? \n The standard deviation is sqrt(variance) = ", sqrt(8/10))
##
## What is the standard deviation?
## The standard deviation is sqrt(variance) = 0.8944272
\[ P(Y ≤ y) = 1 − P(Y > y)\\= 1 − (\frac{k-y}{k})^n \\ futher, P(Y ≤ y − 1) = 1 − (\frac{k-y +1}{k})^n \\So , \quad m(y) = P(Y = y) = P(Y ≤ y)−P(Y ≤ y−1) = 1 − (\frac{k-y}{k})^n -1 + (\frac{k-y +1}{k})^n \\= (\frac{k-y +1}{k})^n - (\frac{k-y}{k})^n \\= \frac{(k-y +1)^n - (k-y)^n}{k^n} \]