Expectation of probability density function

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
3 replies · 2K views
songoku
Messages
2,514
Reaction score
395
E(X) of probability density function f(x) is [itex]\int x f(x) dx[/itex]

E(X2) of probability density function f(x) is [itex]\int x^2 f(x) dx[/itex]

Can I generalize it to E(g(x)) of probability density function f(x) = [itex]\int g(x). f(x) dx[/itex] ?

I tried to find E(5 + 10X) from pdf. I did two ways:
1. I found E(X) then using linear combination of random variable, E (5 + 10X) = 5 + 10 E(X)

2. Using integration, [itex]\int (5 + 10x) f(x) dx[/itex]

I got two different answers. Which one is correct and why?

Thanks
 
on Phys.org
songoku said:
E(X) of probability density function f(x) is [itex]\int x f(x) dx[/itex]

E(X2) of probability density function f(x) is [itex]\int x^2 f(x) dx[/itex]

Can I generalize it to E(g(x)) of probability density function f(x) = [itex]\int g(x). f(x) dx[/itex] ?

I tried to find E(5 + 10X) from pdf. I did two ways:
1. I found E(X) then using linear combination of random variable, E (5 + 10X) = 5 + 10 E(X)

2. Using integration, [itex]\int (5 + 10x) f(x) dx[/itex]

I got two different answers. Which one is correct and why?

Thanks

They are both correct. You must have made a mistake integrating.
 
songoku said:
E(X) of probability density function f(x) is [itex]\int x f(x) dx[/itex]

E(X2) of probability density function f(x) is [itex]\int x^2 f(x) dx[/itex]

Can I generalize it to E(g(x)) of probability density function f(x) = [itex]\int g(x). f(x) dx[/itex] ?

Yes. In fact, you could take that to be the definition of the expected value of some function ##g(x)##. Then, ##E(x)## and ##E(x^2)## are specific cases of ##g(x)##.
 
I re-checked so many times and apparently the mistake was I wrote the question wrongly o:)

Thank you so much perok
 
  • Like
Likes   Reactions: Klystron