Numerical approximation to Beta moment generating function
$begingroup$
I have a Beta random variable $X sim text{Beta}(alpha, beta)$, and I'm interested in $mathbb{E}[e^{2X}]$.
The Beta distribution moment generating function is
$$f(t) = {displaystyle 1+sum_{k=1}^{infty }left(prod _{r=0}^{k-1}{frac {alpha +r}{alpha +beta +r}}right){frac {t^{k}}{k!}}} = {}_1F_1(alpha, alpha + beta; t)$$
So I need to compute $f(2)$. But I need to do that quickly for many pairs $(alpha, beta)$. What is an efficient method to compute this?
probability numerical-methods moment-generating-functions expected-value
$endgroup$
|
show 2 more comments
$begingroup$
I have a Beta random variable $X sim text{Beta}(alpha, beta)$, and I'm interested in $mathbb{E}[e^{2X}]$.
The Beta distribution moment generating function is
$$f(t) = {displaystyle 1+sum_{k=1}^{infty }left(prod _{r=0}^{k-1}{frac {alpha +r}{alpha +beta +r}}right){frac {t^{k}}{k!}}} = {}_1F_1(alpha, alpha + beta; t)$$
So I need to compute $f(2)$. But I need to do that quickly for many pairs $(alpha, beta)$. What is an efficient method to compute this?
probability numerical-methods moment-generating-functions expected-value
$endgroup$
$begingroup$
Do you have access to advanced mathematical software, such as Matlab, Mathematica, etc.? Or some open software, I'm sure a lot of them have the packages for computing hypergeometric functions
$endgroup$
– Yuriy S
Jan 16 at 12:04
$begingroup$
@YuriyS Well, no, that's the problem. I need to implement that is Stan, which I don't think has it inbuilt.
$endgroup$
– Todor Markov
Jan 16 at 12:07
$begingroup$
Ok, well, in general, evaluating hypergeometric functions is not a trivial task. First, you can obviously use the series definition. Another option is to find an integral representation and use some numerical quadrature. Yet another option is to find the ODE which the function obeys and solve it numerically. The choice depends on the range of the parameters and other things... Not sure about ${_1 F_1}$, you'll just have to hit the books so to speak (like NIST library of functions, or Abramowitz and Stegun for example)
$endgroup$
– Yuriy S
Jan 16 at 12:13
$begingroup$
If I remember correctly, Bessel function and also Laguerre polynomials are particular cases of this function, so there has to be plenty of sources available
$endgroup$
– Yuriy S
Jan 16 at 12:14
1
$begingroup$
just google it, you may take a look at people.maths.ox.ac.uk/porterm/papers/hypergeometric-final.pdf
$endgroup$
– BGM
Jan 17 at 7:36
|
show 2 more comments
$begingroup$
I have a Beta random variable $X sim text{Beta}(alpha, beta)$, and I'm interested in $mathbb{E}[e^{2X}]$.
The Beta distribution moment generating function is
$$f(t) = {displaystyle 1+sum_{k=1}^{infty }left(prod _{r=0}^{k-1}{frac {alpha +r}{alpha +beta +r}}right){frac {t^{k}}{k!}}} = {}_1F_1(alpha, alpha + beta; t)$$
So I need to compute $f(2)$. But I need to do that quickly for many pairs $(alpha, beta)$. What is an efficient method to compute this?
probability numerical-methods moment-generating-functions expected-value
$endgroup$
I have a Beta random variable $X sim text{Beta}(alpha, beta)$, and I'm interested in $mathbb{E}[e^{2X}]$.
The Beta distribution moment generating function is
$$f(t) = {displaystyle 1+sum_{k=1}^{infty }left(prod _{r=0}^{k-1}{frac {alpha +r}{alpha +beta +r}}right){frac {t^{k}}{k!}}} = {}_1F_1(alpha, alpha + beta; t)$$
So I need to compute $f(2)$. But I need to do that quickly for many pairs $(alpha, beta)$. What is an efficient method to compute this?
probability numerical-methods moment-generating-functions expected-value
probability numerical-methods moment-generating-functions expected-value
asked Jan 16 at 11:26
Todor MarkovTodor Markov
2,410412
2,410412
$begingroup$
Do you have access to advanced mathematical software, such as Matlab, Mathematica, etc.? Or some open software, I'm sure a lot of them have the packages for computing hypergeometric functions
$endgroup$
– Yuriy S
Jan 16 at 12:04
$begingroup$
@YuriyS Well, no, that's the problem. I need to implement that is Stan, which I don't think has it inbuilt.
$endgroup$
– Todor Markov
Jan 16 at 12:07
$begingroup$
Ok, well, in general, evaluating hypergeometric functions is not a trivial task. First, you can obviously use the series definition. Another option is to find an integral representation and use some numerical quadrature. Yet another option is to find the ODE which the function obeys and solve it numerically. The choice depends on the range of the parameters and other things... Not sure about ${_1 F_1}$, you'll just have to hit the books so to speak (like NIST library of functions, or Abramowitz and Stegun for example)
$endgroup$
– Yuriy S
Jan 16 at 12:13
$begingroup$
If I remember correctly, Bessel function and also Laguerre polynomials are particular cases of this function, so there has to be plenty of sources available
$endgroup$
– Yuriy S
Jan 16 at 12:14
1
$begingroup$
just google it, you may take a look at people.maths.ox.ac.uk/porterm/papers/hypergeometric-final.pdf
$endgroup$
– BGM
Jan 17 at 7:36
|
show 2 more comments
$begingroup$
Do you have access to advanced mathematical software, such as Matlab, Mathematica, etc.? Or some open software, I'm sure a lot of them have the packages for computing hypergeometric functions
$endgroup$
– Yuriy S
Jan 16 at 12:04
$begingroup$
@YuriyS Well, no, that's the problem. I need to implement that is Stan, which I don't think has it inbuilt.
$endgroup$
– Todor Markov
Jan 16 at 12:07
$begingroup$
Ok, well, in general, evaluating hypergeometric functions is not a trivial task. First, you can obviously use the series definition. Another option is to find an integral representation and use some numerical quadrature. Yet another option is to find the ODE which the function obeys and solve it numerically. The choice depends on the range of the parameters and other things... Not sure about ${_1 F_1}$, you'll just have to hit the books so to speak (like NIST library of functions, or Abramowitz and Stegun for example)
$endgroup$
– Yuriy S
Jan 16 at 12:13
$begingroup$
If I remember correctly, Bessel function and also Laguerre polynomials are particular cases of this function, so there has to be plenty of sources available
$endgroup$
– Yuriy S
Jan 16 at 12:14
1
$begingroup$
just google it, you may take a look at people.maths.ox.ac.uk/porterm/papers/hypergeometric-final.pdf
$endgroup$
– BGM
Jan 17 at 7:36
$begingroup$
Do you have access to advanced mathematical software, such as Matlab, Mathematica, etc.? Or some open software, I'm sure a lot of them have the packages for computing hypergeometric functions
$endgroup$
– Yuriy S
Jan 16 at 12:04
$begingroup$
Do you have access to advanced mathematical software, such as Matlab, Mathematica, etc.? Or some open software, I'm sure a lot of them have the packages for computing hypergeometric functions
$endgroup$
– Yuriy S
Jan 16 at 12:04
$begingroup$
@YuriyS Well, no, that's the problem. I need to implement that is Stan, which I don't think has it inbuilt.
$endgroup$
– Todor Markov
Jan 16 at 12:07
$begingroup$
@YuriyS Well, no, that's the problem. I need to implement that is Stan, which I don't think has it inbuilt.
$endgroup$
– Todor Markov
Jan 16 at 12:07
$begingroup$
Ok, well, in general, evaluating hypergeometric functions is not a trivial task. First, you can obviously use the series definition. Another option is to find an integral representation and use some numerical quadrature. Yet another option is to find the ODE which the function obeys and solve it numerically. The choice depends on the range of the parameters and other things... Not sure about ${_1 F_1}$, you'll just have to hit the books so to speak (like NIST library of functions, or Abramowitz and Stegun for example)
$endgroup$
– Yuriy S
Jan 16 at 12:13
$begingroup$
Ok, well, in general, evaluating hypergeometric functions is not a trivial task. First, you can obviously use the series definition. Another option is to find an integral representation and use some numerical quadrature. Yet another option is to find the ODE which the function obeys and solve it numerically. The choice depends on the range of the parameters and other things... Not sure about ${_1 F_1}$, you'll just have to hit the books so to speak (like NIST library of functions, or Abramowitz and Stegun for example)
$endgroup$
– Yuriy S
Jan 16 at 12:13
$begingroup$
If I remember correctly, Bessel function and also Laguerre polynomials are particular cases of this function, so there has to be plenty of sources available
$endgroup$
– Yuriy S
Jan 16 at 12:14
$begingroup$
If I remember correctly, Bessel function and also Laguerre polynomials are particular cases of this function, so there has to be plenty of sources available
$endgroup$
– Yuriy S
Jan 16 at 12:14
1
1
$begingroup$
just google it, you may take a look at people.maths.ox.ac.uk/porterm/papers/hypergeometric-final.pdf
$endgroup$
– BGM
Jan 17 at 7:36
$begingroup$
just google it, you may take a look at people.maths.ox.ac.uk/porterm/papers/hypergeometric-final.pdf
$endgroup$
– BGM
Jan 17 at 7:36
|
show 2 more comments
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "69"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3075621%2fnumerical-approximation-to-beta-moment-generating-function%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Mathematics Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3075621%2fnumerical-approximation-to-beta-moment-generating-function%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
$begingroup$
Do you have access to advanced mathematical software, such as Matlab, Mathematica, etc.? Or some open software, I'm sure a lot of them have the packages for computing hypergeometric functions
$endgroup$
– Yuriy S
Jan 16 at 12:04
$begingroup$
@YuriyS Well, no, that's the problem. I need to implement that is Stan, which I don't think has it inbuilt.
$endgroup$
– Todor Markov
Jan 16 at 12:07
$begingroup$
Ok, well, in general, evaluating hypergeometric functions is not a trivial task. First, you can obviously use the series definition. Another option is to find an integral representation and use some numerical quadrature. Yet another option is to find the ODE which the function obeys and solve it numerically. The choice depends on the range of the parameters and other things... Not sure about ${_1 F_1}$, you'll just have to hit the books so to speak (like NIST library of functions, or Abramowitz and Stegun for example)
$endgroup$
– Yuriy S
Jan 16 at 12:13
$begingroup$
If I remember correctly, Bessel function and also Laguerre polynomials are particular cases of this function, so there has to be plenty of sources available
$endgroup$
– Yuriy S
Jan 16 at 12:14
1
$begingroup$
just google it, you may take a look at people.maths.ox.ac.uk/porterm/papers/hypergeometric-final.pdf
$endgroup$
– BGM
Jan 17 at 7:36