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

Click For Summary

Discussion Overview

The discussion revolves around calculating the expected value E(X) for random variables, specifically focusing on examples involving both discrete and continuous probability distributions. Participants seek clarity on the definitions and applications of expected value in various contexts.

Discussion Character

  • Exploratory
  • Technical explanation
  • Conceptual clarification
  • Debate/contested
  • Homework-related

Main Points Raised

  • One participant provides an example of calculating E(X) for a single dice roll using the formula E(X) = sum of X*p.
  • Another participant clarifies that E(X) refers to the expected value or mean value of X, questioning if these terms are defined in the original poster's study materials.
  • A participant expresses uncertainty about how to find E(X) for a density function and how to apply the theory in general.
  • One participant challenges the clarity of the original post, questioning whether the poster is studying from a book or attempting a quiz without prior knowledge.
  • Another participant emphasizes the need for an example of a density function rather than a mass function.
  • A participant explains the expected value calculation for a single dice roll and introduces the complexity of calculating it for three rolls, detailing the probabilities for various outcomes.
  • One participant reiterates the request for an example of a density function, suggesting that terminology may differ across study materials.
  • A later reply provides a formal definition of expected value for a continuous random variable and offers an example of a uniformly distributed variable over a specific interval.
  • Another participant mentions a property of the expectation operator involving linear combinations of random variables.

Areas of Agreement / Disagreement

Participants express varying levels of understanding regarding expected value, with some seeking clarity on definitions and applications. There is no consensus on the terminology used for density versus mass functions, and multiple viewpoints on how to approach the calculation of expected value remain present.

Contextual Notes

Some participants indicate potential confusion stemming from differing definitions of density and mass functions in various study materials. The complexity of calculating expected values for multiple dice rolls is also noted, with no resolution on the best approach to take.

EdmureTully
Messages
20
Reaction score
0
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.
 
Physics news on Phys.org
EdmureTully said:
what E(X) means.

It means the "expected value of X", which also called "the mean value of X". Are those terms defined in your study materials?
 
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.
 
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?
 
I am requesting an example for a density function and not a mass function.
 
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 anyone 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.
 
EdmureTully said:
I am requesting an example for a density function and not a mass function.

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?
 
EdmureTully said:
I am requesting an example for a density function and not a mass function.
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$$
 
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.
 

Similar threads

  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 2 ·
Replies
2
Views
8K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
4
Views
1K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 15 ·
Replies
15
Views
2K
  • · Replies 32 ·
2
Replies
32
Views
3K