1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

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

  1. Feb 8, 2015 #1
    1. The problem statement, all variables and given/known data

    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).

    2. Relevant equations

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

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

    3. 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?

  2. jcsd
  3. Feb 8, 2015 #2


    User Avatar

    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 [itex](0,1)[/itex]. So we have [tex] X_1, X_2, X_3, X_4, X_5 \sim U(0,1)[/tex]
    The values of these random variables are unknown. The median is the middle value of all these [itex] X_i [/itex].

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

    Let [itex] Y_1, Y_2, Y_3, Y_4, Y_5 [/itex] be the values of your [itex]X_i[/itex] in increasing order. For the example I used above, [itex] Y_1 = X_5, Y_2 = X_3, Y_3 = X_1, Y_4 = X_4, Y_5 = X_3[/itex]. So the median will be [itex] Y_3 [/itex], 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 [itex] g_{Y_3} (x) dx [/itex] denote the probability that [itex] Y_3 [/itex] has a value in a small interval, [itex] dx [/itex], around [itex]x[/itex]. If our median value is in that small interval, then two of the [itex]X_i[/itex] will have to be lower than it and two will have to be higher than it.

    Which [itex]X_i[/itex] is in the small interval, we don't know. It could be 1, 2, 3, 4 or 5. The probability that [itex]X_1[/itex] is in that interval is [itex]f(x)dx[/itex] where [itex]f(x)[/itex] is its distribution function (just uniform in this case). Likewise, the probability that [itex] X_2, X_3, X_4, X_5[/itex] 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 [itex]X_1[/itex] or [itex]X_2[/itex] or [itex]X_3[/itex] or [itex]X_4[/itex] or [itex]X_5[/itex] is in that interval. Which is just [itex]5f(x)dx[/itex] .

    Now, we know that two of our [itex]X_i[/itex] have to be less than [itex]x[/itex]. 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 [itex]F(x)[/itex], the value of its cdf at [itex]x[/itex]. This means the probability that 2 of them are less than x is [itex] {4 \choose 2}F(x)^2[/itex].

    Now we have 3 of our random variables in order. The last two have to be above [itex]x[/itex]. 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 [itex]x[/itex] is [itex]\left(1 - F(x)\right)^2[/itex].

    Combining the 3 we get: [tex]
    g_{Y_3} (x) dx \\
    = 5f(x){4 \choose 2}F(x)^2 \left(1 - F(x)\right)^2dx \\

    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: Feb 8, 2015
  4. Feb 8, 2015 #3

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    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
    [tex] f(x) = 280 x^3 (1-x)^4, [/tex]
    and the CDF is
    [tex] F(x) = 35 x^8 -160 x^7 + 280 x^6 -224 x^5 + 70 x^4 . [/tex]
    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: Feb 8, 2015
  5. Feb 17, 2015 #4
    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"
  6. Feb 17, 2015 #5


    User Avatar
    Homework Helper

    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}##
  7. Feb 18, 2015 #6

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    If you mean that
    [tex] \text{Answer} = \sum_{i=1}^3 0.75^{2+i}\, 0.25^{3-i} - \;\text{something positive}\\
    = 0.3427734375 - \; \text{something positive} < 0.3427734357[/tex]
    then this is in error. The exact probability is > 0.79.
  8. Feb 18, 2015 #7


    User Avatar
    Homework Helper

    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.
  9. Feb 19, 2015 #8

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    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.
  10. Feb 19, 2015 #9

    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...
  11. Feb 20, 2015 #10

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    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
    [tex] f_m(x) = 30 x^2 (1-x)^2, \; 0 \leq x \leq 1[/tex]
    You can check that ##\int_0^1 f_m(x) \, dx = 1##, and the answer to your question is
    [tex] \text{Ans.} = \int_{1/4}^{3/4} f_m(x) \, dx = 203/256 \doteq 0.79297 [/tex]
  12. Feb 21, 2015 #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.
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted

Similar Discussions: Question Beta Distribution ch.6 prob 48 in 7th edition Ross
  1. Beta distribution (Replies: 4)