Question

2) Consider a random variable with the following probability distribution: P(X-0)-0., Px-1)-0.2, PX-2)-0.3, PX-3) -0.3, and P

0 0
Add a comment Improve this question Transcribed image text
Answer #1

We will use Excel to simulate 400 values

First we get the cumulative distribution and the random number interval for the random variable.

X P(X) Cumulative Probability Random number from Random number To
0 0.1 0.1 0 0.1
1 0.2 0.3 0.1 0.3
2 0.3 0.6 0.3 0.6
3 0.3 0.9 0.6 0.9
4 0.1 1 0.9 1

To simulate X we use the following

  • Generate a random number from uniform distribution in the interval (0,1) using RAND()
  • Pick the value of X corresponding to the random number interval in which the above random number lies.
    • For example if the random number generated is 0.55, it lies in the interval 0.3 to 0.6 and the corresponding X is 2. Hence the value of X for this simulation is 2

a) Prepare the following sheet

Random number from Random number To X 0 Cumulative Probabilit P(X) 0.1 0.2 0.3 0.3 0.1 B2 B3+C2 B4+C3 E2 EE3 E4 E5 4 2 4 B6+C

Copy the Row s to make 400 trials. Paste the X as values to avoid changes to X.

Get the following

Random Random Cumulative number number Probabilit P(X) from To 0.1 0.2 0.3 0.3 0.1 0.1 0.3 0.6 0.9 0.1 0.3 0.6 0.9 0 1 2 1 0.

b) Count the number of Xs and divide by 400 to get the distribution of Xs

Random number P(X 0.1 0.2 0.3 0.3 0.1 Cumulative Probabilit Random number To X Simulated Probability of X COUNTIF(SB$9:$B$408

get this

Simulated Probability of X Random Cumulative number Random Probabilit number To X from P(X) 0.085 0.165 0.335 0.315 0.1 0.1 0

We can see that the simulated probability is very much indicative of the actual probability P(X). The accuracy will increase as we increase the number of simulations.

As per classical probability theory, the discrete probability P(X) is the proportion of times particular values of X (X=0,1,2,3,4) would occur in the long run if we keep generating the values of X. Hence the simulation trial tries to replicate this situation of generating Xs and calculate the proportions for a sufficiently large number of trials.

c) The expectation of X is

= 0 × 0.1 + 1 × 0.2 ー2.1 2 × 0.3 3 × 0.3 4 × 0.1

The expected value of \begin{align*} X^2 \end{align*} is

r P(r) = 02 × 0.1 + 12 × 0.2 + 22 × 0.3 + 32 × 0.3 +42 × 0.1 = 5.7

The variance of X is

Var(X) = E(X2)-(E(X))2-5.7-(2.1)2-1.29

the standard deviation of X is

SD(X) VVar(X)-V1.29 1.1358

The mean and standard deviation of the simulated values is calculated below

P(X 0.1 0.2 0.3 0.3 0.1 Cumulative Probabili Random number fromRandom number To Simulated Probability of x COUNTIF(SB$9:$B$40

get these values

Random Cumulative number Random Probabilit Simulated Probability of > P(X) 0 from number To X Simulated 2.18 1.0911 0.1 0.2 0

We can see that the simulated mean is 2.18 and the theoretical mean of X is 2.1. The simulated standard deviation is 1.0911 and the theoretical standard deviation of X is 1.1358.

These values are close.

Add a comment
Know the answer?
Add Answer to:
2) Consider a random variable with the following probability distribution: P(X-0)-0., Px-1)-0.2, PX-2)-0.3, PX-3) -0.3, and PX-4)-0.1 A. Generate 400 values of this random variable with the given pro...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT