Question

In: Statistics and Probability

Say I want to generate random variables from the probability distribution p={ 2-2x 0<x<1 0 ....

Say I want to generate random variables from the probability distribution

p={ 2-2x 0<x<1

0 . elsewhere

My scheme is to generate U's from [0,1],double them and plug them into the probability distribution. So U = 0.3 gives me p(0.6)=0.8 as random variable. Prove my idea is right or wrong.

Solutions

Expert Solution

You are right except you forgot to subtract it from 2.

I generated 1000 x and calculated f(x)=2-2(x).

This is a sample from it.

X f(x)
0.107907   1.78419
0.403739   1.19252
0.427420   1.14516
0.909383   0.18123
0.050595   1.89881
0.132632   1.73474
0.215042   1.56992
0.901474   0.19705
0.347013   1.30597
0.573234   0.85353
0.051896   1.89621
0.889484   0.22103
0.829647   0.34071
0.548284   0.90343
0.774248   0.45150
0.589716   0.82057
0.799201   0.40160

Descriptive Statistics: X, f(x)

Total
Variable Count Mean StDev Median IQR
X 1000 0.48803 0.29540 0.49065 0.52513
f(x) 1000 1.0239 0.5908 1.0187 1.0503


Related Solutions

This is the probability distribution between two random variables X and Y: Y \ X 0...
This is the probability distribution between two random variables X and Y: Y \ X 0 1 2 3 0.1 0.2 0.2 4 0.2 0.2 0.1 a) Are those variables independent? b) What is the marginal probability of X? c) Find E[XY]
Let X and Y be i.i.d. geometric random variables with parameter (probability of success) p, 0<p<1....
Let X and Y be i.i.d. geometric random variables with parameter (probability of success) p, 0<p<1. (a) Find P(X>Y). (b) Find P(X+Y=n) and P(X=k|X+Y=n), for n=2,3,..., and k=1,2,...,n−1. I need an answer asap please. Thank you.
Let X and Y be random variables. Suppose P(X = 0, Y = 0) = .1,...
Let X and Y be random variables. Suppose P(X = 0, Y = 0) = .1, P(X = 1, Y = 0) = .3, P(X = 2, Y = 0) = .2 P(X = 0, Y = 1) = .2, P(X = 1, Y = 1) = .2, P(X = 2, Y = 1) = 0. a. Determine E(X) and E(Y ). b. Find Cov(X, Y ) c. Find Cov(2X + 3Y, Y ).
Let X and Y be i.i.d. geometric random variables with parameter (probability of success) p, 0...
Let X and Y be i.i.d. geometric random variables with parameter (probability of success) p, 0 < p < 1. (a) (6pts) Find P(X > Y ). (b) (8pts) Find P(X + Y = n) and P(X = k∣X + Y = n), for n = 2, 3, ..., and k = 1, 2, ..., n − 1
Question 1: Given the following probability distribution for a random variable X: x P(X=x) -2 0.30...
Question 1: Given the following probability distribution for a random variable X: x P(X=x) -2 0.30 -1 0.15 0 0.20 1 0.20 2 0.15 a) Explain two reasons why the above distribution is a valid probability distribution. b) Calculate μX and σX. c) Determine the cdf(X), and write it as an additional column in the table. d) Calculate P(−1<X≤3) . e) Draw a histogram that represents the probability distribution of X.
A probability distribution function P(x) for a random variable X is defined by P(x) = P...
A probability distribution function P(x) for a random variable X is defined by P(x) = P r{X ≤ x}. Suppose that we draw a list of n random variables X1, X2, X3 · · · Xn from a continuous probability distribution function P that is computable in O(1) time. Give an algorithm that sorts these numbers in linear average case time.
Suppose X has probability distribution x: 0 1 2 3 4 P(X = x) 0.2 0.1...
Suppose X has probability distribution x: 0 1 2 3 4 P(X = x) 0.2 0.1 0.2 0.2 0.3 Find the following probabilities: a. P(X < 2) b. P(X ≤ 2 and X < 4) c. P(X ≤ 2 and X ≥ 1) d. P(X = 1 or X ≤ 3) e. P(X = 2 given X ≤ 2)
1. Consider the probability distribution shown below. x 0 1 2 P(x) 0.25 0.60 0.15 Compute...
1. Consider the probability distribution shown below. x 0 1 2 P(x) 0.25 0.60 0.15 Compute the expected value of the distribution. (Enter a number.) Compute the standard deviation of the distribution. (Enter a number. Round your answer to four decimal places.) 2. What is the income distribution of super shoppers? A supermarket super shopper is defined as a shopper for whom at least 70% of the items purchased were on sale or purchased with a coupon. In the following...
The probability distribution of a discrete random variable x is shown below. X                         0    &
The probability distribution of a discrete random variable x is shown below. X                         0               1               2               3 P(X)                   0.25        0.40         0.20          0.15 What is the standard deviation of x? a. 0.9875 b. 3.0000 c. 0.5623 d. 0.9937 e. 0.6000 Each of the following are characteristics of the sampling distribution of the mean except: a. The standard deviation of the sampling distribution of the mean is referred to as the standard error. b. If the original population is not normally distributed, the sampling distribution of the mean will also...
a. Consider the following distribution of a random variable X X – 1 0 1 2...
a. Consider the following distribution of a random variable X X – 1 0 1 2 P(X) 1/8 2/8 3/8 2/8                 Find the mean, variance and standard deviation b. There are 6 Republican, 5 Democrat, and 4 Independent candidates. Find the probability the committee will be made of 3 Republicans, 2 Democrats, and 2 Independent be selected? c. At a large university, the probability that a student takes calculus and is on the dean’s list is 0.042. The probability...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT