Transforming a uniform distribution into a binomial

bennyska
Messages
110
Reaction score
0

Homework Statement


Let X~UNIF(0,1). Find y = G(u) such that Y = G(U)~BIN(3,1/2)


Homework Equations





The Attempt at a Solution


after a bit of searching/reading, i found how to do this with a continuous distribution (the problem i had was an exponential, so i took the inverse)... however, more searching has not led to any results for the discrete case, which i need for the binomial. any pointers would be definitely appreciated.
 
Physics news on Phys.org
You might want to take a look at http://en.wikipedia.org/wiki/Inverse_transform_sampling

Basically, given X an arbitrary distribution, and let FX be it's cdf, then we define

F^{-1}_X(u)=inf\{x~\vert~F(x)=u,~0<u<1\}.

Then, if U has uniform distribution, then F_X^{-1}(U) has the distribution of X...
 
X is continuous whereas Y is not. This implies that G(X) isn't be continuous. Does that help?
 
vela said:
X is continuous whereas Y is not. This implies that G(X) isn't be continuous. Does that help?

no... how about one more hint?
 
What do you mean, one more hint? I practically gave you the answer in my post!
 
Start by figuring out the cdf for Y.
 
well, for a binomial, with these parameters, the cdf would be ..5^{3}\sum_{i=0}^{3}\left({3\atop i}\right)
 
That expression is not the cdf. That's equal to 1. Try again.
 
F_{x}=Pr(X\leq x)=.5^{3}\sum_{i=1}^{x}\left({x\atop i}\right) for<br /> x = 0, 1, 2, 3[\tex]<br /> <br /> not sure if this tex will show up, but here&#039;s the pdf<br /> <br /> (also, basically .5<sup>3</sup>*SUM(from i=0 to x) (x choose i) )
 

Attachments

  • #10
Close enough. The lower limit of the summation should be i=0, but other than that it's correct. It's easy enough to just write FX(x) out explicitly.
F_X(x) = \left\{\begin{array}{cl} <br /> 0 &amp; \textrm{if}~x &lt; 0 \\<br /> 1/8 &amp; \textrm{if}~~0 \le x \lt 1 \\<br /> 1/2 &amp; \textrm{if}~~1 \le x \lt 2 \\<br /> 7/8 &amp; \textrm{if}~~2 \le x \lt 3 \\<br /> 1 &amp; \textrm{if}~~3 \le x <br /> \end{array}\right.
Does this give you an idea of how you might write Y=G(X)?
 
  • #11
That should have been FY(y), not FX(x).
 
  • #12
G_{X}(y)=\begin{cases}<br /> 0 &amp; 0\leq x&lt;1/8\\<br /> 1 &amp; 1/8\leq x&lt;1/2\\<br /> 2 &amp; 1/2\leq x&lt;7/8\\<br /> 3 &amp; 7/8\leq x\end{cases}
?
 
  • #13
Cheers! :smile:
 

Similar threads

Back
Top