Generating Random Samples from Discrete and Continuous Random Variables

  • Thread starter Thread starter Tereno
  • Start date Start date
  • Tags Tags
    Statistics
Click For Summary

Homework Help Overview

The discussion revolves around generating random samples from discrete and continuous random variables in statistics. The original poster presents two scenarios: one involving a discrete random variable with specified probabilities and another involving a continuous random variable defined by its cumulative distribution function (c.d.f.). Participants explore methods for sampling and the implications of these definitions.

Discussion Character

  • Exploratory, Conceptual clarification, Mathematical reasoning

Approaches and Questions Raised

  • Participants discuss how to generate random samples from a discrete random variable using random numbers from the interval [0, 1]. There are inquiries about the interpretation of the c.d.f. and its application to continuous random variables. Some participants suggest using integrals and probability density functions (pdf) to approach the problem.

Discussion Status

The discussion is ongoing, with various interpretations and methods being explored. Some participants express confusion about specific mathematical notations and concepts, while others attempt to clarify these points. There is no explicit consensus yet, as participants are still questioning and elaborating on the ideas presented.

Contextual Notes

Some participants note potential issues with notation and clarity in the original post, which may affect understanding. There is also a mention of assumptions regarding the distribution of random numbers used for sampling.

Tereno
Messages
8
Reaction score
0
Hey guys I've got several questions about statistics.

Here's the first one.

1. Suppose X is a discrete random variable that takes on the three values x1, x2, x3 with probabilities p1, p2, p3 respectively. Describe how you could generate a random sample from X if all you had access to were a list of numbers generated at random from the interval [0, 1].

2. Suppose X is a continuous random variable with c.d.f. FX(x) = P(X  x). To make things easier, suppose further that X takes on values in an interval [a, b] (do allow for a to be −1 and b to be +1).

Let Y be the random variable defined by Y = FX(X). This looks strange, but is perfectly
valid since FX is just a function, and you are allowed to take functions of random variables.

Your problem: show that Y distributed U[0, 1].

Method: calculate the c.d.f. Y , FY (y) = P(Y  y), for all real y. Replace Y with FX(X),
and consider when you can take the inverse of FX.
Taking the inverse of FX is not always possible, in particular, for x < a and x > b. Consider
those cases separately.
You will find that the c.d.f. of Y is 0 for y < 0, y for 0  y  1, and 1 for y > 1, so indeed
Y distributed U[0, 1].
An important application of this fact is that if u is a random selection from the interval [0, 1], F−1 X (u) is a random selection from X.
 
Physics news on Phys.org
Tereno said:
2. Suppose X is a continuous random variable with c.d.f. FX(x) = P(X  x[/color]).

Regarding the part in blue[/color]:

My browser is showing that as "X square x", as in there is a square-shaped symbol between the X and the x. Is that what you meant? Does anyone else see it differently? Your post is riddled with those squares.
 
Concerning part 1. Find the pdf of X and call it f(t). Consider the
integral int(f(t), t,0,x)=y, where y is one of the numbers generated randomly from (0,1). Solve for x in the above integral. This will generate a quasi-random sequence of samplings of X.
 
P(X  x) = P (X <= x)
and P(Y  y) = P (Y <= y)

and the other two are strict inequalities <

Sorry for the confusion.
 
hmm..what do you mean by int(f(t), t,0,x)=y...??

o to x is the limits of integration?
 
My familiarity with part 1. comes from Monte Carlo Methods for Integration, in which a definite integral gets approximated by the expectation value of a random variable (who's pdf matches the argument of the integral). In order to sample the random variable, call it x, one creates the equation int(pdf(x),x,o,y)=z, where pdf(x) is the probability density function of the random variable x, y is the variable to be solved for, and z is a random sequence chosen from an arbitrary distribution. As you can see, my example deals with the continuous case, but I would imagine that the discrete case, such as yours, may be dealt with in the same manner.
 
Whoa..that's a little hard for me to understand. i don't think I've learn that yet.
 
And here's another question:

2. Suppose X is a discrete random variable that takes on values from {1, 2, 3, . . .} with probabilities
{p1, p2, p3, . . .}. If u is a number selected at random from [0, 1] explain why

min {sum from i=1 to n of p subscript i >= u}

can be considered as a random selection from X.
 
1. Suppose X is a discrete random variable that takes on the three values x1, x2, x3 with probabilities p1, p2, p3 respectively. Describe how you could generate a random sample from X if all you had access to were a list of numbers generated at random from the interval [0, 1].
Don't you have to know according to which random distribution that list of numbers was generated? I think at the very least you have to assume that you know their distribution even if you don't assume what it is (e.g. uniform).
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 4 ·
Replies
4
Views
3K
Replies
7
Views
1K
Replies
2
Views
2K
Replies
9
Views
4K
  • · Replies 6 ·
Replies
6
Views
2K
Replies
1
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K