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!

How do we calculate the expected value E(X) for a density function?

  1. Jul 22, 2013 #1
    Give me an example like:

    X: random variable representing the sum of 1 dice roll

    p: probability of getting a dice result

    E(X) = sum of X*p = 1(1/6) + 2(1/6) + 3(1/6) + 4(1/6) + 5(1/6) +6(1/6)

    BONUS POINT:

    what would be the E(X) for 3 dice rolls?

    Sorry, I am really dumb. I am trying to understand exactly what E(X) means.
     
  2. jcsd
  3. Jul 22, 2013 #2

    Stephen Tashi

    User Avatar
    Science Advisor

    It means the "expected value of X", which also called "the mean value of X". Are those terms defined in your study materials?
     
  4. Jul 22, 2013 #3
    I just don't really know how to find the E(X) of a density function and how to apply the theory for any case.
     
  5. Jul 23, 2013 #4

    Stephen Tashi

    User Avatar
    Science Advisor

    Your situation isn't clear. Are you studying a book? Or are you trying to take some sort of quiz without having ever studied a book on probability theory or statistics? Your post which begins "Give me an example like" isn't even clear. Are you saying that someone gave you an example like that? Are you requesting another example?
     
  6. Jul 23, 2013 #5
    I am requesting an example for a density function and not a mass function.
     
  7. Jul 23, 2013 #6

    HallsofIvy

    User Avatar
    Staff Emeritus
    Science Advisor

    The problem, as you stated it, tells you all of that. For a single dice roll, there are 6 possible outcomes, all equally likely so the "density function" is f(1)= 1/6, f(2)= 1/6, f(3)= 1/6, f(4)= 1/6, f(5)= 1/6, f(6)= 1/6. The "mass function" (also called "cumulative probability function") is F(1)= 1/6, F(2)= 2/6= 1/3, f(3)= 3/6= 1/3, f(4)= 4/6= 2/3, f(5)= 5/6, f(6)= 6/6= 1.

    E(x), the "expected value", is the sum of each value times it probability: 1(1/6)+ 2(1/6)+ 3(1/6)+ 4(1/6)+ 5(1/6)+ 6(1/6)= (1/6)(1+ 2+ 3+ 4+ 5+ 6)= (1/6)(21)= 3.5.

    Of course, the calculations for three rolls are much harder. The lowest possible sum of three rolls is 1+ 1+ 1= 3 and that will occur only if all three rolls are 1. The probabability of that is (1/6)(1/6)(1/6)= 1/216. You can get a total of 4 with 2+ 1+ 1- that is 2 on die 1, and 1 on the other 2. Since the probability of any one number is 1/6, the probability of "2, 1, 1" is also (1/6)(1/6)(1/6)= 1/216. But we can also get 4 with 1+ 2+ 1- 1 on die 1, 2 on die 2, and 1 on die 3, or 1+ 1+2- 1 on dice 1 and 2, 2 on die 3. The probability of each of those is each 1/216 but the probability of a total of 4 in any of those ways is 1/216+ 1/216+ 1/216= 3/216= 1/72. And for a total of 5, it gets worse! 1+ 1+ 3, 1+ 3+ 1, 3+ 1+ 1, 2+ 2+ 1, 2+ 1+ 2, 1+ 2+ 2, etc.
     
  8. Jul 23, 2013 #7

    Stephen Tashi

    User Avatar
    Science Advisor

    In many books the term "density function" is often used for both discrete and continuous random variables, but perhaps your study materials use "mass function" exclusively for discrete random variables and you are asking for an example of computing [itex] E(X) [/itex] for a continuous random variable. Is that your question?
     
  9. Jul 23, 2013 #8

    jbunniii

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    The expected value for a real-valued random variable which has a density function ##p## is defined as
    $$E[X] = \int_{-\infty}^{\infty} x p(x) dx$$
    For example, if ##X## is uniformly distributed over the interval ##[2,4]##, then we have
    $$p(x) = \begin{cases}
    \frac{1}{2} & \text{ if }2 \leq x \leq 4 \\
    0 & \text{ otherwise} \\
    \end{cases}$$
    and therefore
    $$E[X] = \int_{2}^{4} \frac{1}{2} x dx = 3$$
     
  10. Jul 23, 2013 #9

    chiro

    User Avatar
    Science Advisor

    Also recall that the expectation operator has the following property:

    E[aX+bY] = aE[X] + bE[Y] for constants a,b and random variables X and Y.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: How do we calculate the expected value E(X) for a density function?
Loading...