Message Boards Message Boards

0
|
6000 Views
|
1 Reply
|
4 Total Likes
View groups...
Share
Share this post:

Compute E[Sin(x)] if x is normally distributed

Posted 5 years ago

When $x \sim \mathcal{N}(\mu, \sigma^2)$: $$E\left[\sin(x)\right] = \sin(\mu)\;e^{-\frac{\sigma^2}{2}}$$

Reference: Compute E(sinX) if X is normally distributed

However, when I execute:

Integrate[Sin[x] PDF[NormalDistribution[mu, sigma], x], {x, -Infinity,  Infinity}]

after a long while it just quits the kernel and does not output anything.

POSTED BY: Sandu Ursu
Posted 5 years ago

Add in Assumptions -> sigma > 0 and it should work.

Expectation[Sin[x], x \[Distributed] NormalDistribution[mu, sigma], 
  Assumptions -> sigma > 0]

also works.

POSTED BY: Jim Baldwin
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract