Parameter estimation using method of maximum likelihood. What am I doing wrong?
$begingroup$
Question from Michael Baron's Probability and Statistics for Computer Scientists, 2nd edition:
Data: 3 7 5 3 2. Assume data is produced from Geometric distribution. Estimate $p$, the geometric distribution parameter. (Geometric distribution: $P(x) = (1-p)^{x-1}p$, $x=1,2,...$)
My solution, using method of maximum likelihood: Find $M = sum_{i=1}^5 ln(P(x_i))$. Then solve for $frac{dM}{dp}=0$.
- $M = sum_{i=1}^5 ln((1-p)^{x_i - 1}p)=15ln(1-p)+ 5ln p$
- $frac{dM}{dp}=0=frac{15}{1-p}+frac{5}{p} to p=-frac{1}{2}$
This is obviously wrong, as $p$ is a probability. I did this twice, what am I doing wrong?
maximum-likelihood
$endgroup$
add a comment |
$begingroup$
Question from Michael Baron's Probability and Statistics for Computer Scientists, 2nd edition:
Data: 3 7 5 3 2. Assume data is produced from Geometric distribution. Estimate $p$, the geometric distribution parameter. (Geometric distribution: $P(x) = (1-p)^{x-1}p$, $x=1,2,...$)
My solution, using method of maximum likelihood: Find $M = sum_{i=1}^5 ln(P(x_i))$. Then solve for $frac{dM}{dp}=0$.
- $M = sum_{i=1}^5 ln((1-p)^{x_i - 1}p)=15ln(1-p)+ 5ln p$
- $frac{dM}{dp}=0=frac{15}{1-p}+frac{5}{p} to p=-frac{1}{2}$
This is obviously wrong, as $p$ is a probability. I did this twice, what am I doing wrong?
maximum-likelihood
$endgroup$
add a comment |
$begingroup$
Question from Michael Baron's Probability and Statistics for Computer Scientists, 2nd edition:
Data: 3 7 5 3 2. Assume data is produced from Geometric distribution. Estimate $p$, the geometric distribution parameter. (Geometric distribution: $P(x) = (1-p)^{x-1}p$, $x=1,2,...$)
My solution, using method of maximum likelihood: Find $M = sum_{i=1}^5 ln(P(x_i))$. Then solve for $frac{dM}{dp}=0$.
- $M = sum_{i=1}^5 ln((1-p)^{x_i - 1}p)=15ln(1-p)+ 5ln p$
- $frac{dM}{dp}=0=frac{15}{1-p}+frac{5}{p} to p=-frac{1}{2}$
This is obviously wrong, as $p$ is a probability. I did this twice, what am I doing wrong?
maximum-likelihood
$endgroup$
Question from Michael Baron's Probability and Statistics for Computer Scientists, 2nd edition:
Data: 3 7 5 3 2. Assume data is produced from Geometric distribution. Estimate $p$, the geometric distribution parameter. (Geometric distribution: $P(x) = (1-p)^{x-1}p$, $x=1,2,...$)
My solution, using method of maximum likelihood: Find $M = sum_{i=1}^5 ln(P(x_i))$. Then solve for $frac{dM}{dp}=0$.
- $M = sum_{i=1}^5 ln((1-p)^{x_i - 1}p)=15ln(1-p)+ 5ln p$
- $frac{dM}{dp}=0=frac{15}{1-p}+frac{5}{p} to p=-frac{1}{2}$
This is obviously wrong, as $p$ is a probability. I did this twice, what am I doing wrong?
maximum-likelihood
maximum-likelihood
asked Jan 8 at 9:39
an apprenticean apprentice
978
978
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
$begingroup$
From chain rule, when we differentiate, you miss out a negative sign.
It is suppose to be
$$-frac{15}{1-p}+frac5p=0$$
$endgroup$
add a comment |
$begingroup$
You may also proceed directly:
$$f(p)=prod_{i=1}^5P(x_i) = p^5(1-p)^{3+7+5+3+2-5}= p^5(1-p)^{15} stackrel{!}{rightarrow}mbox{Max for } p in (0,1)$$
You get
$$f'(p) = 0 Leftrightarrow 5(1-p)-15p = 0 Leftrightarrow boxed{p = frac{1}{4}}$$
$endgroup$
$begingroup$
Power of the $1-p$ should be 15, not 20. Is not it? So $p=1/4$.
$endgroup$
– an apprentice
Jan 8 at 11:31
$begingroup$
OOOps. Yes. Editing correspondingly. Thanks a lot.
$endgroup$
– trancelocation
Jan 8 at 11:33
add a comment |
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%2f3065976%2fparameter-estimation-using-method-of-maximum-likelihood-what-am-i-doing-wrong%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
From chain rule, when we differentiate, you miss out a negative sign.
It is suppose to be
$$-frac{15}{1-p}+frac5p=0$$
$endgroup$
add a comment |
$begingroup$
From chain rule, when we differentiate, you miss out a negative sign.
It is suppose to be
$$-frac{15}{1-p}+frac5p=0$$
$endgroup$
add a comment |
$begingroup$
From chain rule, when we differentiate, you miss out a negative sign.
It is suppose to be
$$-frac{15}{1-p}+frac5p=0$$
$endgroup$
From chain rule, when we differentiate, you miss out a negative sign.
It is suppose to be
$$-frac{15}{1-p}+frac5p=0$$
answered Jan 8 at 9:44


Siong Thye GohSiong Thye Goh
101k1466117
101k1466117
add a comment |
add a comment |
$begingroup$
You may also proceed directly:
$$f(p)=prod_{i=1}^5P(x_i) = p^5(1-p)^{3+7+5+3+2-5}= p^5(1-p)^{15} stackrel{!}{rightarrow}mbox{Max for } p in (0,1)$$
You get
$$f'(p) = 0 Leftrightarrow 5(1-p)-15p = 0 Leftrightarrow boxed{p = frac{1}{4}}$$
$endgroup$
$begingroup$
Power of the $1-p$ should be 15, not 20. Is not it? So $p=1/4$.
$endgroup$
– an apprentice
Jan 8 at 11:31
$begingroup$
OOOps. Yes. Editing correspondingly. Thanks a lot.
$endgroup$
– trancelocation
Jan 8 at 11:33
add a comment |
$begingroup$
You may also proceed directly:
$$f(p)=prod_{i=1}^5P(x_i) = p^5(1-p)^{3+7+5+3+2-5}= p^5(1-p)^{15} stackrel{!}{rightarrow}mbox{Max for } p in (0,1)$$
You get
$$f'(p) = 0 Leftrightarrow 5(1-p)-15p = 0 Leftrightarrow boxed{p = frac{1}{4}}$$
$endgroup$
$begingroup$
Power of the $1-p$ should be 15, not 20. Is not it? So $p=1/4$.
$endgroup$
– an apprentice
Jan 8 at 11:31
$begingroup$
OOOps. Yes. Editing correspondingly. Thanks a lot.
$endgroup$
– trancelocation
Jan 8 at 11:33
add a comment |
$begingroup$
You may also proceed directly:
$$f(p)=prod_{i=1}^5P(x_i) = p^5(1-p)^{3+7+5+3+2-5}= p^5(1-p)^{15} stackrel{!}{rightarrow}mbox{Max for } p in (0,1)$$
You get
$$f'(p) = 0 Leftrightarrow 5(1-p)-15p = 0 Leftrightarrow boxed{p = frac{1}{4}}$$
$endgroup$
You may also proceed directly:
$$f(p)=prod_{i=1}^5P(x_i) = p^5(1-p)^{3+7+5+3+2-5}= p^5(1-p)^{15} stackrel{!}{rightarrow}mbox{Max for } p in (0,1)$$
You get
$$f'(p) = 0 Leftrightarrow 5(1-p)-15p = 0 Leftrightarrow boxed{p = frac{1}{4}}$$
edited Jan 8 at 11:34
answered Jan 8 at 10:01
trancelocationtrancelocation
10.6k1722
10.6k1722
$begingroup$
Power of the $1-p$ should be 15, not 20. Is not it? So $p=1/4$.
$endgroup$
– an apprentice
Jan 8 at 11:31
$begingroup$
OOOps. Yes. Editing correspondingly. Thanks a lot.
$endgroup$
– trancelocation
Jan 8 at 11:33
add a comment |
$begingroup$
Power of the $1-p$ should be 15, not 20. Is not it? So $p=1/4$.
$endgroup$
– an apprentice
Jan 8 at 11:31
$begingroup$
OOOps. Yes. Editing correspondingly. Thanks a lot.
$endgroup$
– trancelocation
Jan 8 at 11:33
$begingroup$
Power of the $1-p$ should be 15, not 20. Is not it? So $p=1/4$.
$endgroup$
– an apprentice
Jan 8 at 11:31
$begingroup$
Power of the $1-p$ should be 15, not 20. Is not it? So $p=1/4$.
$endgroup$
– an apprentice
Jan 8 at 11:31
$begingroup$
OOOps. Yes. Editing correspondingly. Thanks a lot.
$endgroup$
– trancelocation
Jan 8 at 11:33
$begingroup$
OOOps. Yes. Editing correspondingly. Thanks a lot.
$endgroup$
– trancelocation
Jan 8 at 11:33
add a comment |
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%2f3065976%2fparameter-estimation-using-method-of-maximum-likelihood-what-am-i-doing-wrong%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