Question 1165673
.
Five-digit codes are selected at random from the set {0, 1, 2, ..., 9} with replacement. 
If the random variable X denotes the number of zeros in randomly chosen codes, then what are 
the space and the probability density function of X?
~~~~~~~~~~~~~~~~~~~~~~~~~~~


<pre>
The words "with replacement" mean, in this context, that in every of 5 positions, from 1 to 5,
from left to right, any of 10 digits can appear independently of digits in other positions, 
with the probability  {{{1/10}}} = 0.1.


For X, we have 6 possible values, X = 0, 1, 2, 3, 4, 5.


The probability density function of X is

    P(X=0) = {{{(9/10)^5}}} = {{{0.9^5}}} = 0.59049,

    P(X=1) = {{{C(5,1)*0.1^1*0.9^4}}} = {{{0.5*0.9^4}}} = 0.32805,

    P(X=2) = {{{C(5,2)*0.1^2*0.9^3}}} = {{{10*0.01*0.9^3}}} = {{{0.1*0.9^3}}} = 0.0729,

    P(X=3) = {{{C(5,3)*0.1^3*0.9^2}}} = {{{10*0.1^3*0.9^2}}} = {{{0.01*0.9^2}}} = 0.0081,

    P(X=4) = {{{C(5,4)*0.1^4*0.9^1}}} = {{{5*0.1^4*0.9}}} = {{{0.0005*0.9}}} = 0.00045,

    P(X=5) = {{{C(5,5)*0.1^5*0.9^0}}} = {{{0.1^5}}} = 0.00001.


<U>CHECK</U>.  0.59049 + 0.32805 + 0.0729 + 0.0081 + 0.00045 + 0.00001 = 1.   (! correct !)
</pre>

Solved.