Question Beta Distribution ch.6 prob 48 in 7th edition Ross

  • Thread starter Thread starter mattclgn
  • Start date Start date
  • Tags Tags
    Beta Distribution
mattclgn
Messages
19
Reaction score
0

Homework Statement



Consider a sample of size 5 from a uniform random distribution (0,1) . Computer the probability that the median is in the interval (1/4, 3/4). [/B]

Homework Equations



I guess...
The Pdf of beta is
d1c8bb0654c111cd0a16d1aafd8b970a.png


and median is...I'm not sure...I would guess 1/2?[/B]

The Attempt at a Solution



okay, so I'm not even sure where to begin with this. It looks as though they are giving me a uniform problem but in a two dimensional space. Then i remembered, okay the chapter I'm dealing with is Jointly Distributed Random variables. Median is 1/2 (a + b), so 1/2.

The answer in the back of my book says that it is exactly .79297

Okay so i get that P{1/4 <x<3/4} and since sample is 5 I have to multiply that by what i get when I Integrate the density so 5 Int(x)

but I'm using one of the old ross books and I believe it said, I'm supposed to use the formula x(1-x) but I tried that and got total np= .5078. tried the regular way and it exceeded one...

eventually figured out it's a beta distribution, and that there wasn't some weird thing I was missing in uniform. But I have no clue how to go about a is 1/4 and b is 3/4

how do I arrange the pdf of this?

[/B]
 
Physics news on Phys.org
It sounds like you're not completely sure what is meant by the median or how to find the distribution of it. I want to explain those concepts to you so you can try to tackle the problem.

You have a sample of 5 random variables all distributed uniformly over (0,1). So we have X_1, X_2, X_3, X_4, X_5 \sim U(0,1)
The values of these random variables are unknown. The median is the middle value of all these X_i.

For instance, we could have X_1 = 0.5, X_2 = 0.3, X_3 = 0.9, X_4 = 0.78, X_5 = 0.001, in which case X_1 is the median because 2 values are above it and 2 values are below it. In general we don't know which X_i will be the median so we need to find a way to formulate a distribution for it.

Let Y_1, Y_2, Y_3, Y_4, Y_5 be the values of your X_i in increasing order. For the example I used above, Y_1 = X_5, Y_2 = X_3, Y_3 = X_1, Y_4 = X_4, Y_5 = X_3. So the median will be Y_3, which is what we need to find the distribution for.

Either your textbook will have the formula for this distribution or you can use this kind of approach to try to derive it on the fly:

Let g_{Y_3} (x) dx denote the probability that Y_3 has a value in a small interval, dx, around x. If our median value is in that small interval, then two of the X_i will have to be lower than it and two will have to be higher than it.

Which X_i is in the small interval, we don't know. It could be 1, 2, 3, 4 or 5. The probability that X_1 is in that interval is f(x)dx where f(x) is its distribution function (just uniform in this case). Likewise, the probability that X_2, X_3, X_4, X_5 are in that interval are the same since they are all uniform (0,1). So the probability that one of them is in that interval is the probability that X_1 or X_2 or X_3 or X_4 or X_5 is in that interval. Which is just 5f(x)dx .

Now, we know that two of our X_i have to be less than x. We have 4 random variables left to choose and we're choosing two of them. Also, the probability that a single random variable is less than x is F(x), the value of its cdf at x. This means the probability that 2 of them are less than x is {4 \choose 2}F(x)^2.

Now we have 3 of our random variables in order. The last two have to be above x. There is only one way to choose 2 things out of 2 things so no need for a multiplication factor. The probability that the remaining 2 are greater than x is \left(1 - F(x)\right)^2.

Combining the 3 we get: <br /> g_{Y_3} (x) dx \\<br /> = 5f(x){4 \choose 2}F(x)^2 \left(1 - F(x)\right)^2dx \\<br />

Now we know the distribution for the median and your question is asking what the the probability the median is between two values. You calculate it the same way you would anything else. What is the probability that a uniformly distributed random variable on (0, 1) is between 0.25 and 0.75? We just integrate the pdf from 0.25 to 0.75.
 
Last edited:
mattclgn said:

Homework Statement



Consider a sample of size 5 from a uniform random distribution (0,1) . Computer the probability that the median is in the interval (1/4, 3/4). [/B]

Homework Equations



I guess...
The Pdf of beta is
d1c8bb0654c111cd0a16d1aafd8b970a.png


and median is...I'm not sure...I would guess 1/2?[/B]

The Attempt at a Solution



okay, so I'm not even sure where to begin with this. It looks as though they are giving me a uniform problem but in a two dimensional space. Then i remembered, okay the chapter I'm dealing with is Jointly Distributed Random variables. Median is 1/2 (a + b), so 1/2.

The answer in the back of my book says that it is exactly .79297

Okay so i get that P{1/4 <x<3/4} and since sample is 5 I have to multiply that by what i get when I Integrate the density so 5 Int(x)

but I'm using one of the old ross books and I believe it said, I'm supposed to use the formula x(1-x) but I tried that and got total np= .5078. tried the regular way and it exceeded one...

eventually figured out it's a beta distribution, and that there wasn't some weird thing I was missing in uniform. But I have no clue how to go about a is 1/4 and b is 3/4

how do I arrange the pdf of this?
[/B]

For general ##\alpha## and ##\beta## the median of the distribution ##\text{Beta}(\alpha,\beta)## involves incomplete Beta functions, so cannot be expressed in elementary terms. For example, when ##\alpha=4## and ##\beta = 5##, the density function is
f(x) = 280 x^3 (1-x)^4,
and the CDF is
F(x) = 35 x^8 -160 x^7 + 280 x^6 -224 x^5 + 70 x^4 .
To find the median you need to solve the 8th degree polynomial equation ##F(x) = 1/2##.

Anyway, in this question you need to find the density ##f(x)## of the median of the independent random variables ##X_1, X_2, X_3 ,X_4, X_5##, where each ##X_i## has distribution ##U(0,1)##. So, you need to find the probability that the median lies in the short interval ##(x, x + \Delta x)##. Your textbook ought to have the appropriate formulas---or at least, a discussion of how to set up the problem---so I suggest you look carefully at the treatment therein.

Whatever you do, do NOT confuse the "median of a distribution" with the "distribution of a median", which you seemed to be doing before. They are not at all the same thing.
 
Last edited:
Ray Vickson said:
For general ##\alpha## and ##\beta## the median of the distribution ##\text{Beta}(\alpha,\beta)## involves incomplete Beta functions, so cannot be expressed in elementary terms. For example, when ##\alpha=4## and ##\beta = 5##, the density function is
f(x) = 280 x^3 (1-x)^4,
and the CDF is
F(x) = 35 x^8 -160 x^7 + 280 x^6 -224 x^5 + 70 x^4 .
To find the median you need to solve the 8th degree polynomial equation ##F(x) = 1/2##.

Anyway, in this question you need to find the density ##f(x)## of the median of the independent random variables ##X_1, X_2, X_3 ,X_4, X_5##, where each ##X_i## has distribution ##U(0,1)##. So, you need to find the probability that the median lies in the short interval ##(x, x + \Delta x)##. Your textbook ought to have the appropriate formulas---or at least, a discussion of how to set up the problem---so I suggest you look carefully at the treatment therein.

Whatever you do, do NOT confuse the "median of a distribution" with the "distribution of a median", which you seemed to be doing before. They are not at all the same thing.
Okay, I'll give the book another look. The back only gave me the end result, the exact phrasing though was "Compute the probability that the median is in the interval 1/4, 3/4"
 
It looks to me that you need to find the probability that 3,4, or 5 of the numbers are less than .75, and subtract from that the probability that 3,4 or 5 numbers are less than .25.
The first part should look like
##\sum_{i=1}^3 .75^{2+i}.25^{3-i}##
 
RUber said:
It looks to me that you need to find the probability that 3,4, or 5 of the numbers are less than .75, and subtract from that the probability that 3,4 or 5 numbers are less than .25.
The first part should look like
##\sum_{i=1}^3 .75^{2+i}.25^{3-i}##

If you mean that
\text{Answer} = \sum_{i=1}^3 0.75^{2+i}\, 0.25^{3-i} - \;\text{something positive}\\<br /> = 0.3427734375 - \; \text{something positive} &lt; 0.3427734357
then this is in error. The exact probability is > 0.79.
 
Thanks for catching that Ray, I should have paid more attention to O_o's post.
The first part should look like
Probability that 3, 4, or 5 are in upper quadrant (p1) = ##\sum_{i=3}^5 .75^{5-i}.25^{i}\pmatrix{5\\i }##
The probability that 3,4, or 5 are in the lower quadrant (p2) looks strikingly similar.
Probability that median is between .25 and .75 = 1-p1-p2.
 
RUber said:
Thanks for catching that Ray, I should have paid more attention to o_O's post.
The first part should look like
Probability that 3, 4, or 5 are in upper quadrant (p1) = ##\sum_{i=3}^5 .75^{5-i}.25^{i}\pmatrix{5\\i }##
The probability that 3,4, or 5 are in the lower quadrant (p2) looks strikingly similar.
Probability that median is between .25 and .75 = 1-p1-p2.

This type of reasoning leads to incorrect results. For example, if the outcomes are 0.3, 0.35, 0.4, 0.45 and 0.5, the median is at 0.4. Certainly, this lies between 0.25 and 0.75, but we do not have any outcomes at all >= 0.75 or <= 0.25.

I don't know what the OP's issue is; there are well-documented formulas for the distribution of the median, in the cited textbook and in hundreds of on-line sources. It is just a matter of :recognizing" the correct formula and then turning the crank.
 
Ray Vickson said:
This type of reasoning leads to incorrect results. For example, if the outcomes are 0.3, 0.35, 0.4, 0.45 and 0.5, the median is at 0.4. Certainly, this lies between 0.25 and 0.75, but we do not have any outcomes at all >= 0.75 or <= 0.25.

I don't know what the OP's issue is; there are well-documented formulas for the distribution of the median, in the cited textbook and in hundreds of on-line sources. It is just a matter of :recognizing" the correct formula and then turning the crank.
You know what, that was my bad...I got some stuff mixed up and it's actually a question about order statistics NOT Beta distribution. I took 5!/(2!2!) *(1-x)^2 x^2 and integrated over 1/4 and 3/4. it got me the correct answer as per the book 0.79. I more or less copied a similar example and reasoned it out. I'm looking at the space between all the variables on the lines. each 5 variables and two ways of arranging each on either side. multiply each side by that and i get the correct answer...i think. The why of it escapes me somewhat. So I'm multiplying by what the sides potential length will be right?

0_o was pretty close though...
 
  • #10
mattclgn said:
You know what, that was my bad...I got some stuff mixed up and it's actually a question about order statistics NOT Beta distribution. I took 5!/(2!2!) *(1-x)^2 x^2 and integrated over 1/4 and 3/4. it got me the correct answer as per the book 0.79. I more or less copied a similar example and reasoned it out. I'm looking at the space between all the variables on the lines. each 5 variables and two ways of arranging each on either side. multiply each side by that and i get the correct answer...i think. The why of it escapes me somewhat. So I'm multiplying by what the sides potential length will be right?

0_o was pretty close though...

Basically, you've got it, but just to clarify, let's look at it logically, step-by-step. If the median ##M## (= the third largest value) is in ##(x,x+dx)##, then two of the ##X_i## are ##< x##, two are ## > x## and one is in ##(x,x+dx)##. There are ##C(5,2) = 10## ways of selecting the two ##X_i## that will be ##< x##; then three ##X_i## remain. After that the number of ways of selecting the two that will be ## > x## is ##C(3,2) = C(3,1) = 3##. Thus, ##P(x < M < x + dx) = 10 \cdot 3\, F(x)^2 (1-F(x))^2 f(x) \, dx##, for a general distribution of the ##X_i## with density ##f##. Thus, in the uniform case the density of the median is
f_m(x) = 30 x^2 (1-x)^2, \; 0 \leq x \leq 1
You can check that ##\int_0^1 f_m(x) \, dx = 1##, and the answer to your question is
\text{Ans.} = \int_{1/4}^{3/4} f_m(x) \, dx = 203/256 \doteq 0.79297
 
  • #11
Okay, i think I just skipped a step and did five dividing by 2!*2!. Other than that I think I did the same thing as my answer was the same.
 
Back
Top