Mean and variance of Bernoulli distribution example
unfavorable = 40% ----> 0
favorable = 60% ----> 1
We map the values to a 0 and 1.
Mean:
μ=0.4⋅0+0.6⋅1=0.6
Variance:
σ2=0.4⋅(0−0.6)2+0.6⋅(1−0.6)2σ2=0.4⋅0.36+0.6⋅0.16σ2=0.24σ =0.24=0.49
unfavorable = 40% ----> 0 ===> we change it to (1 - p) -> failure
favorable = 60% ----> 1 ===> we change it to (p) -> success
μ=(1−p)⋅0+p⋅1=p
σ2=(1−p)(0−p)2+p(1−p)2σ2=(1−p)p2+p(1−2p+p2)σ2=p2−p3+p−2p2+p3σ2=p−p2σ2=p(1−p)
(see Statistics (hackerrank)/Poisson Distribution)
X = # of successes after n trials where P(success) for each trial is p
E(X)=n⋅p
E(X+Y)=E(X)+E(Y)
Finding the mean and standard deviation of a binomial random variable
A company produces cell phone chips. 2% of them are defect. A quality check involves randomly selecting and testing 500 chips.
What are the mean and standard deviation?
X= # of defective chips in 500 chip sample
μx=E(X)=n⋅pμx=500⋅0.02=10
σx=σx2=Var(X)=n⋅p⋅(1−p)=500⋅0.02⋅0.98=9.8=3.13