Compute the maximum likelihood estimator for $θ$.
$begingroup$
Let $X_1, X_2, . . . , X_n$ be a random sample from a Bernoulli distribution with parameter $θ$. Compute the maximum likelihood estimator for $θ$.
In my opinion this is the correct way to solve it:
$L(Theta)=theta_1*(1-theta_1)*...theta_n*(1-theta_n)=theta^n*(1-theta)^n$
$l(Theta)=n*ln(theta)+n*ln(1-theta)$
$l'(theta)=frac{n}{theta}-frac{n}{1-theta}=0$, $theta=frac{1}{2}$
For the official solution it should be $frac{sum_{i=1}^nX_i}{n}$, why MLE is incorrect, where should I put the $x$ that in my solution is not present?
statistics
$endgroup$
add a comment |
$begingroup$
Let $X_1, X_2, . . . , X_n$ be a random sample from a Bernoulli distribution with parameter $θ$. Compute the maximum likelihood estimator for $θ$.
In my opinion this is the correct way to solve it:
$L(Theta)=theta_1*(1-theta_1)*...theta_n*(1-theta_n)=theta^n*(1-theta)^n$
$l(Theta)=n*ln(theta)+n*ln(1-theta)$
$l'(theta)=frac{n}{theta}-frac{n}{1-theta}=0$, $theta=frac{1}{2}$
For the official solution it should be $frac{sum_{i=1}^nX_i}{n}$, why MLE is incorrect, where should I put the $x$ that in my solution is not present?
statistics
$endgroup$
1
$begingroup$
bernoulli has no pdf, calculating max with derivatives is here not possible
$endgroup$
– Joey Doey
Jan 25 at 14:52
1
$begingroup$
Your likelihood formula is wrong - your formula doesn't depend on the data that you see, only $n$. When you use the correct formula you can differentiate the log likelihood to get the MLE.
$endgroup$
– Alex
Jan 25 at 15:28
$begingroup$
@Alex what do you mean?
$endgroup$
– Luke Marci
Jan 25 at 15:31
1
$begingroup$
The likelihood should depend on the data you see. E.g. suppose you just had $n = 1$ and observed $X_1 = x_1$. If that was a success ($x_1 = 1$) then the likelihood would be $theta$, and if it was a failure ($x_1 = 0$) then the likelihood would be $(1 - theta)$. In the first case the MLE would be $hat{theta} = 1$ and in the second case the MLE would be $hat{theta} = 0$.
$endgroup$
– Alex
Jan 25 at 15:36
add a comment |
$begingroup$
Let $X_1, X_2, . . . , X_n$ be a random sample from a Bernoulli distribution with parameter $θ$. Compute the maximum likelihood estimator for $θ$.
In my opinion this is the correct way to solve it:
$L(Theta)=theta_1*(1-theta_1)*...theta_n*(1-theta_n)=theta^n*(1-theta)^n$
$l(Theta)=n*ln(theta)+n*ln(1-theta)$
$l'(theta)=frac{n}{theta}-frac{n}{1-theta}=0$, $theta=frac{1}{2}$
For the official solution it should be $frac{sum_{i=1}^nX_i}{n}$, why MLE is incorrect, where should I put the $x$ that in my solution is not present?
statistics
$endgroup$
Let $X_1, X_2, . . . , X_n$ be a random sample from a Bernoulli distribution with parameter $θ$. Compute the maximum likelihood estimator for $θ$.
In my opinion this is the correct way to solve it:
$L(Theta)=theta_1*(1-theta_1)*...theta_n*(1-theta_n)=theta^n*(1-theta)^n$
$l(Theta)=n*ln(theta)+n*ln(1-theta)$
$l'(theta)=frac{n}{theta}-frac{n}{1-theta}=0$, $theta=frac{1}{2}$
For the official solution it should be $frac{sum_{i=1}^nX_i}{n}$, why MLE is incorrect, where should I put the $x$ that in my solution is not present?
statistics
statistics
asked Jan 25 at 14:49
Luke MarciLuke Marci
856
856
1
$begingroup$
bernoulli has no pdf, calculating max with derivatives is here not possible
$endgroup$
– Joey Doey
Jan 25 at 14:52
1
$begingroup$
Your likelihood formula is wrong - your formula doesn't depend on the data that you see, only $n$. When you use the correct formula you can differentiate the log likelihood to get the MLE.
$endgroup$
– Alex
Jan 25 at 15:28
$begingroup$
@Alex what do you mean?
$endgroup$
– Luke Marci
Jan 25 at 15:31
1
$begingroup$
The likelihood should depend on the data you see. E.g. suppose you just had $n = 1$ and observed $X_1 = x_1$. If that was a success ($x_1 = 1$) then the likelihood would be $theta$, and if it was a failure ($x_1 = 0$) then the likelihood would be $(1 - theta)$. In the first case the MLE would be $hat{theta} = 1$ and in the second case the MLE would be $hat{theta} = 0$.
$endgroup$
– Alex
Jan 25 at 15:36
add a comment |
1
$begingroup$
bernoulli has no pdf, calculating max with derivatives is here not possible
$endgroup$
– Joey Doey
Jan 25 at 14:52
1
$begingroup$
Your likelihood formula is wrong - your formula doesn't depend on the data that you see, only $n$. When you use the correct formula you can differentiate the log likelihood to get the MLE.
$endgroup$
– Alex
Jan 25 at 15:28
$begingroup$
@Alex what do you mean?
$endgroup$
– Luke Marci
Jan 25 at 15:31
1
$begingroup$
The likelihood should depend on the data you see. E.g. suppose you just had $n = 1$ and observed $X_1 = x_1$. If that was a success ($x_1 = 1$) then the likelihood would be $theta$, and if it was a failure ($x_1 = 0$) then the likelihood would be $(1 - theta)$. In the first case the MLE would be $hat{theta} = 1$ and in the second case the MLE would be $hat{theta} = 0$.
$endgroup$
– Alex
Jan 25 at 15:36
1
1
$begingroup$
bernoulli has no pdf, calculating max with derivatives is here not possible
$endgroup$
– Joey Doey
Jan 25 at 14:52
$begingroup$
bernoulli has no pdf, calculating max with derivatives is here not possible
$endgroup$
– Joey Doey
Jan 25 at 14:52
1
1
$begingroup$
Your likelihood formula is wrong - your formula doesn't depend on the data that you see, only $n$. When you use the correct formula you can differentiate the log likelihood to get the MLE.
$endgroup$
– Alex
Jan 25 at 15:28
$begingroup$
Your likelihood formula is wrong - your formula doesn't depend on the data that you see, only $n$. When you use the correct formula you can differentiate the log likelihood to get the MLE.
$endgroup$
– Alex
Jan 25 at 15:28
$begingroup$
@Alex what do you mean?
$endgroup$
– Luke Marci
Jan 25 at 15:31
$begingroup$
@Alex what do you mean?
$endgroup$
– Luke Marci
Jan 25 at 15:31
1
1
$begingroup$
The likelihood should depend on the data you see. E.g. suppose you just had $n = 1$ and observed $X_1 = x_1$. If that was a success ($x_1 = 1$) then the likelihood would be $theta$, and if it was a failure ($x_1 = 0$) then the likelihood would be $(1 - theta)$. In the first case the MLE would be $hat{theta} = 1$ and in the second case the MLE would be $hat{theta} = 0$.
$endgroup$
– Alex
Jan 25 at 15:36
$begingroup$
The likelihood should depend on the data you see. E.g. suppose you just had $n = 1$ and observed $X_1 = x_1$. If that was a success ($x_1 = 1$) then the likelihood would be $theta$, and if it was a failure ($x_1 = 0$) then the likelihood would be $(1 - theta)$. In the first case the MLE would be $hat{theta} = 1$ and in the second case the MLE would be $hat{theta} = 0$.
$endgroup$
– Alex
Jan 25 at 15:36
add a comment |
1 Answer
1
active
oldest
votes
$begingroup$
The likelihood function for Bernoulli can be written as follows:
$$
L(theta)=begin{cases}theta, & X_1=1cr 1-theta, & X_1=0end{cases}times begin{cases}theta, & X_2=1cr 1-theta, & X_2=0end{cases}times cdotstimesbegin{cases}theta, & X_n=1cr 1-theta, & X_n=0end{cases}
$$
Note that $sum_{i=1}^n X_i=noverline X$ calculates the number of units in a sample, and $n-noverline X$ calculates the number of zeros. In the above product, $theta$ is multiplied as many times as there are units in the sample. And $1-theta$ is multiplied as many times as there are zeros in the sample. So
$$
L(theta) = theta^{noverline X}cdot (1-theta)^{n-noverline X}.
$$
Starting from here you can calculate MLE with derivatives.
$endgroup$
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%2f3087174%2fcompute-the-maximum-likelihood-estimator-for-%25ce%25b8%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
The likelihood function for Bernoulli can be written as follows:
$$
L(theta)=begin{cases}theta, & X_1=1cr 1-theta, & X_1=0end{cases}times begin{cases}theta, & X_2=1cr 1-theta, & X_2=0end{cases}times cdotstimesbegin{cases}theta, & X_n=1cr 1-theta, & X_n=0end{cases}
$$
Note that $sum_{i=1}^n X_i=noverline X$ calculates the number of units in a sample, and $n-noverline X$ calculates the number of zeros. In the above product, $theta$ is multiplied as many times as there are units in the sample. And $1-theta$ is multiplied as many times as there are zeros in the sample. So
$$
L(theta) = theta^{noverline X}cdot (1-theta)^{n-noverline X}.
$$
Starting from here you can calculate MLE with derivatives.
$endgroup$
add a comment |
$begingroup$
The likelihood function for Bernoulli can be written as follows:
$$
L(theta)=begin{cases}theta, & X_1=1cr 1-theta, & X_1=0end{cases}times begin{cases}theta, & X_2=1cr 1-theta, & X_2=0end{cases}times cdotstimesbegin{cases}theta, & X_n=1cr 1-theta, & X_n=0end{cases}
$$
Note that $sum_{i=1}^n X_i=noverline X$ calculates the number of units in a sample, and $n-noverline X$ calculates the number of zeros. In the above product, $theta$ is multiplied as many times as there are units in the sample. And $1-theta$ is multiplied as many times as there are zeros in the sample. So
$$
L(theta) = theta^{noverline X}cdot (1-theta)^{n-noverline X}.
$$
Starting from here you can calculate MLE with derivatives.
$endgroup$
add a comment |
$begingroup$
The likelihood function for Bernoulli can be written as follows:
$$
L(theta)=begin{cases}theta, & X_1=1cr 1-theta, & X_1=0end{cases}times begin{cases}theta, & X_2=1cr 1-theta, & X_2=0end{cases}times cdotstimesbegin{cases}theta, & X_n=1cr 1-theta, & X_n=0end{cases}
$$
Note that $sum_{i=1}^n X_i=noverline X$ calculates the number of units in a sample, and $n-noverline X$ calculates the number of zeros. In the above product, $theta$ is multiplied as many times as there are units in the sample. And $1-theta$ is multiplied as many times as there are zeros in the sample. So
$$
L(theta) = theta^{noverline X}cdot (1-theta)^{n-noverline X}.
$$
Starting from here you can calculate MLE with derivatives.
$endgroup$
The likelihood function for Bernoulli can be written as follows:
$$
L(theta)=begin{cases}theta, & X_1=1cr 1-theta, & X_1=0end{cases}times begin{cases}theta, & X_2=1cr 1-theta, & X_2=0end{cases}times cdotstimesbegin{cases}theta, & X_n=1cr 1-theta, & X_n=0end{cases}
$$
Note that $sum_{i=1}^n X_i=noverline X$ calculates the number of units in a sample, and $n-noverline X$ calculates the number of zeros. In the above product, $theta$ is multiplied as many times as there are units in the sample. And $1-theta$ is multiplied as many times as there are zeros in the sample. So
$$
L(theta) = theta^{noverline X}cdot (1-theta)^{n-noverline X}.
$$
Starting from here you can calculate MLE with derivatives.
answered Jan 26 at 3:47
NChNCh
6,8753825
6,8753825
add a comment |
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%2f3087174%2fcompute-the-maximum-likelihood-estimator-for-%25ce%25b8%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
1
$begingroup$
bernoulli has no pdf, calculating max with derivatives is here not possible
$endgroup$
– Joey Doey
Jan 25 at 14:52
1
$begingroup$
Your likelihood formula is wrong - your formula doesn't depend on the data that you see, only $n$. When you use the correct formula you can differentiate the log likelihood to get the MLE.
$endgroup$
– Alex
Jan 25 at 15:28
$begingroup$
@Alex what do you mean?
$endgroup$
– Luke Marci
Jan 25 at 15:31
1
$begingroup$
The likelihood should depend on the data you see. E.g. suppose you just had $n = 1$ and observed $X_1 = x_1$. If that was a success ($x_1 = 1$) then the likelihood would be $theta$, and if it was a failure ($x_1 = 0$) then the likelihood would be $(1 - theta)$. In the first case the MLE would be $hat{theta} = 1$ and in the second case the MLE would be $hat{theta} = 0$.
$endgroup$
– Alex
Jan 25 at 15:36