library(glue)
P(X1 > y, X2 > y, …, Xn > y) = (k-y)n/kn
Therefore the probability that Y = y is given by the difference
P(Y = y) = P(X1 > y, X2 > y, …, Xn > y) - P(X1 > y+1, X2 > y+1, …, Xn > y+1)
= (k-y)n/kn - (k-y-1)n/kn
= [(k-y)^n - (k-y-1)^n]/k^n
So the distribution of Y is given by:
P(Y = y) = [(k-y)^n - (k-y-1)^n]/k^n, where y = 1, 2, …, k.
P(X=x)=p(1−p)^n−1
p <- 1/10
x <- (1-p)**(8-1)*p**0
glue('The probability that the machine fails using the geometric model is {x}.')
## The probability that the machine fails using the geometric model is 0.4782969.
Expected Value:
E[X]=1/p
q <- 1/p
glue('There is an expected value of {q} years for the machine.')
## There is an expected value of 10 years for the machine.
Standard Deviation = sqrt(1-p/p^2)
standdev <- sqrt((1-p)/(p^2))
glue('The standard deviation is {standdev}.')
## The standard deviation is 9.48683298050514.
Exponential Distribution P(X>=8)=e^−k/u
expdev <- exp(-8/10)
glue('P(X>=8) = {expdev}.')
## P(X>=8) = 0.449328964117222.
Expected Value:
E[X]=u=1/u!=10
u!=1/10
expval <- 1/.1
glue('E(X) = {expval}')
## E(X) = 10
Standard Deviation:
sd= sqrt(1/(u!)^2)
sd = sqrt((1)/(.1^2))
glue('Standard Deviation = {sd}')
## Standard Deviation = 10
P(X>8)=1∗px(1−p)n−x
probb = (.1)^(0)*(.9)^(8)
glue('P(X>=8) = {probb}')
## P(X>=8) = 0.43046721
Expected Value:
E[X]=np
evalu = 8*p
glue('E(X) = {evalu} failures')
## E(X) = 0.8 failures
Standard Deviation = sqrt(npq)
stdev = sqrt(8*(.1)*(.9))
glue('Standard Deviation is {stdev}')
## Standard Deviation is 0.848528137423857
P(X=8)=u!xe−u!/x!
u!=np/t=8∗.1/1=.8 x=8
prob = .8^(8)*exp(-.8/8)
glue('P(X>=8) = {prob}')
## P(X>=8) = 0.151806528072716
Expected Value
E[X]=u!=.8
Standard Deviation:
sd=sqrt(u!)
sd = sqrt(.8)
glue('Standard Deviation is {sd}')
## Standard Deviation is 0.894427190999916