# Random variables

Printable View

• Mar 16th 2006, 04:16 PM
Kiwigirl
Random variables
1.
X is a random variable which can take the following values: (This is a table, c/2 means c over 2)
x.............0....1.....2...3....4
P(X=x)....c/2...c....2c..c...2/c

State the conditions for P(X = x) to be a probability distribution, then find the value of c for which this will be the case.

2.
The random variable X represents the number of visitors a hospital patient has in a visiting period. A maximum of four visitors is permitted. C is found to have probability distribution:
x...........0.......1......2......3.......4
P(X=x)..0.1....0.2....0.4....0.2....0.1

Show that E[X] = 2 and E [X²] = 5.2, then write down the probability distribution of the random variable Y = (X-2)² and hence, or otherwise, find E[(X-2)²].
• Mar 19th 2006, 12:10 PM
CaptainBlack
Quote:

Originally Posted by Kiwigirl
1.
X is a random variable which can take the following values: (This is a table, c/2 means c over 2)
x.............0....1.....2...3....4
P(X=x)....c/2...c....2c..c...2/c

State the conditions for P(X = x) to be a probability distribution, then find the value of c for which this will be the case.

For P(X=x) to be a probability distribution we need:

$\displaystyle \sum_{x} P(X=x)=1$

Which in this case is:

$\displaystyle \sum_0^4 P(X=x)=c/2+c+2c+c+2/c=\frac{9c^2+4}{2c}=1$

So $\displaystyle 9c^2-2c+4=0$, but this has no roots so no value of $\displaystyle c$
will make $\displaystyle P(X=x)$ a probability distribution.

RonL
• Mar 19th 2006, 12:30 PM
CaptainBlack
Quote:

Originally Posted by Kiwigirl
2.
The random variable X represents the number of visitors a hospital patient has in a visiting period. A maximum of four visitors is permitted. C is found to have probability distribution:
x...........0.......1......2......3.......4
P(X=x)..0.1....0.2....0.4....0.2....0.1

Show that E[X] = 2 and E [X²] = 5.2, then write down the probability distribution of the random variable Y = (X-2)² and hence, or otherwise, find E[(X-2)²].

By definition the expectation of a discrete RV $\displaystyle R$ is:

$\displaystyle E(R)=\sum r_i\ P(R=r_i)$

So:

$\displaystyle E(X)=0 \times 0.1+1\times 0.2+2 \times 0.4+3 \times 0.2+4\times 0.1=2$

and:

$\displaystyle E(X^2)=0 \times 0.1+1\times 0.2+4 \times 0.4+9 \times 0.2+16\times 0.1=5.2$

The probability distribution of $\displaystyle Y=(X-2)^2$ is:

$\displaystyle \begin{array}{cccc}y&0&1&4\\p(Y=y)&0.4&0.4&0.2\end {array}$

So:

$\displaystyle E(Y)=E((X-2)^2)=0\times 0.4+1 \times 0.4 +4\times 0.2=1.2$

RonL