Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion for answer to Question 6 #6

Open
nathanagmon opened this issue Jul 1, 2022 · 0 comments
Open

Suggestion for answer to Question 6 #6

nathanagmon opened this issue Jul 1, 2022 · 0 comments

Comments

@nathanagmon
Copy link

nathanagmon commented Jul 1, 2022

Similar to generating functions, another useful trick for calculating moments of various distributions is to use Feynman's integral trick (differentiating under the integral sign). The main idea is to introduce a fictitious parameter and rewrite the integrand as some derivative with respect to this parameter. (Note that this trick can also be used when evaluating expectation values for discrete distributions). Let me illustrate this for moments of the Gaussian distribution, which appear in the primer. Consider the integral

In order to evaluate the above expression, we introduce a parameter in the probability density function

Notice that this integral can be rewritten as

This is just a Gaussian integral, and so we find

Finally, we recover the desired result by setting the parameter to 1,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant