1. ## Cumulative Distribution function

Lets say I have a random variable X that can take values 1,2,3,4 and 5 with probabilities 0.2 0.3 0.1 0.25 0.10 0.05.

My question is how I can determine the Cumulative distribution function and how I can use it to generate the numbers from X?

2. You have five values and six probabilities.

3. Originally Posted by stordase39
Lets say I have a random variable X that can take values 1,2,3,4 and 5 with probabilities 0.2 0.3 0.1 0.25 0.10 0.05.

My question is how I can determine the Cumulative distribution function?
I will get you started on the CDF:
$\[
P\left( {X \leqslant b} \right) = F(b) = \left\{ {\begin{array}{rl}
{0,} & {b < 1} \\
{0.2,} & {1 \leqslant b < 2} \\
{0.5,} & {2 \leqslant b < 3} \\
{?,} & {3 \leqslant b < 4} \\
?, & ? \\
?, & ? \\ \end{array} } \right.$

4. Ok sorry for that... say that the probabilities are 0.2 0.3 0.1 0.1 0.3 then. How can i generate numbers from that distribution using the CDF.

5. Originally Posted by stordase39
Ok sorry for that... say that the probabilities are 0.2 0.3 0.1 0.1 0.3 then. How can i generate numbers from that distribution using the CDF.
Read post #3. Learn from it. Post all your work and say where you get stuck.

6. Originally Posted by mr fantastic
Read post #3. Learn from it. Post all your work and say where you get stuck.
I know how to contruct the CDF now. My question is how to generate numbers from the distribution using the CDF?

7. Originally Posted by stordase39
I know how to contruct the CDF now. My question is how to generate numbers from the distribution using the CDF?
What do you mean by that question?
What numbers?

8. Originally Posted by Plato
What do you mean by that question?
What numbers?
I'm inclined to suggest to the OP that s/he make a spinner, with the area for each number weighted according to the probability of that number occuring.

Memo to OP: The usefulness of the help you get is directly proportional to the accuracy and clarity of the question you post.

9. Originally Posted by Plato
What do you mean by that question?
What numbers?
I think what he means is: Given a RV $X \sim U(0,1)$ find a transformation $f(.)$ such that $Y=f(X)$ has the required distribution?

$y=F^{-1}(x)$