Finding mistake in likelihood function and likelihood











up vote
0
down vote

favorite












pmf =$e^{{(-(y-a)/b)-e^{-((y-a)/b)}}}$



liklihood function = $e^{-((sumlimits_{n=1}^{infty} y_n)-na/b)}*e^{-e^{(a/b)}*(sumlimits_{n=1}^{infty} e^{(y_n/b)}})$



log likelihood function in r = +-((sum(y)-length(y)p[1])/p[2])-exp((p[1]/p[2])(sum(exp(-y/p[2]))))
where p[1]=a and p[2]=b



I suspect that my likelihood function is incorrect because when I optim in R it gives an impossible interval.










share|cite|improve this question






















  • Please write the pmf ( which I actually think is a pdf) clearly using MathJax, mentioning the domain of $y$.
    – StubbornAtom
    Nov 17 at 9:48















up vote
0
down vote

favorite












pmf =$e^{{(-(y-a)/b)-e^{-((y-a)/b)}}}$



liklihood function = $e^{-((sumlimits_{n=1}^{infty} y_n)-na/b)}*e^{-e^{(a/b)}*(sumlimits_{n=1}^{infty} e^{(y_n/b)}})$



log likelihood function in r = +-((sum(y)-length(y)p[1])/p[2])-exp((p[1]/p[2])(sum(exp(-y/p[2]))))
where p[1]=a and p[2]=b



I suspect that my likelihood function is incorrect because when I optim in R it gives an impossible interval.










share|cite|improve this question






















  • Please write the pmf ( which I actually think is a pdf) clearly using MathJax, mentioning the domain of $y$.
    – StubbornAtom
    Nov 17 at 9:48













up vote
0
down vote

favorite









up vote
0
down vote

favorite











pmf =$e^{{(-(y-a)/b)-e^{-((y-a)/b)}}}$



liklihood function = $e^{-((sumlimits_{n=1}^{infty} y_n)-na/b)}*e^{-e^{(a/b)}*(sumlimits_{n=1}^{infty} e^{(y_n/b)}})$



log likelihood function in r = +-((sum(y)-length(y)p[1])/p[2])-exp((p[1]/p[2])(sum(exp(-y/p[2]))))
where p[1]=a and p[2]=b



I suspect that my likelihood function is incorrect because when I optim in R it gives an impossible interval.










share|cite|improve this question













pmf =$e^{{(-(y-a)/b)-e^{-((y-a)/b)}}}$



liklihood function = $e^{-((sumlimits_{n=1}^{infty} y_n)-na/b)}*e^{-e^{(a/b)}*(sumlimits_{n=1}^{infty} e^{(y_n/b)}})$



log likelihood function in r = +-((sum(y)-length(y)p[1])/p[2])-exp((p[1]/p[2])(sum(exp(-y/p[2]))))
where p[1]=a and p[2]=b



I suspect that my likelihood function is incorrect because when I optim in R it gives an impossible interval.







statistics statistical-inference






share|cite|improve this question













share|cite|improve this question











share|cite|improve this question




share|cite|improve this question










asked Nov 16 at 21:55









Extra mint

124




124












  • Please write the pmf ( which I actually think is a pdf) clearly using MathJax, mentioning the domain of $y$.
    – StubbornAtom
    Nov 17 at 9:48


















  • Please write the pmf ( which I actually think is a pdf) clearly using MathJax, mentioning the domain of $y$.
    – StubbornAtom
    Nov 17 at 9:48
















Please write the pmf ( which I actually think is a pdf) clearly using MathJax, mentioning the domain of $y$.
– StubbornAtom
Nov 17 at 9:48




Please write the pmf ( which I actually think is a pdf) clearly using MathJax, mentioning the domain of $y$.
– StubbornAtom
Nov 17 at 9:48










1 Answer
1






active

oldest

votes

















up vote
0
down vote



accepted










I think you are talking about the Gumbel distribution whose probability density function (pdf) is of the form



$$f(y,;a,b)=frac{1}{b}expleft[-frac{(y-a)}{b}-e^{-(y-a)/b}right]quad,,yinmathbb Rquad,,ainmathbb R,b>0$$



, where I assume the parameter $(a,b)$ to be unknown.



This is not a pmf but a pdf (it is a continuous distribution) and you can see that the normalising constant $b$ is missing in your equations.



If $Y_1,Y_2,ldots,Y_n$ are independent and identically distributed random variables having the above distribution, then the likelihood function given the sample $(y_1,y_2,ldots,y_n)inmathbb R^n$ is



begin{align}
L(a,b)&=prod_{i=1}^n f(y_i,;a,b)
\&=frac{1}{b^n}expleft[-frac{1}{b}sum_{i=1}^n (y_i-a)-sum_{i=1}^n e^{-(y_i-a)/b}right]quad,,ainmathbb R,b>0
end{align}



So the log-likelihood is



begin{align}
ell(a,b)&=-nln b-frac{1}{b}sum_{i=1}^n (y_i-a)-sum_{i=1}^n e^{-(y_i-a)/b}
\&=-nln b-frac{n}{b}(bar y-a)-e^{a/b}sum_{i=1}^n e^{-y_i/b} qquad[,bar y=text{ sample mean }]
end{align}






share|cite|improve this answer





















  • Thank you , I managed to estimate my a ,b now
    – Extra mint
    Nov 18 at 14:17










  • Consider 'accepting' answers to your questions if they fully address your queries.
    – StubbornAtom
    Nov 18 at 15:19











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',
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
});


}
});














 

draft saved


draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3001680%2ffinding-mistake-in-likelihood-function-and-likelihood%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








up vote
0
down vote



accepted










I think you are talking about the Gumbel distribution whose probability density function (pdf) is of the form



$$f(y,;a,b)=frac{1}{b}expleft[-frac{(y-a)}{b}-e^{-(y-a)/b}right]quad,,yinmathbb Rquad,,ainmathbb R,b>0$$



, where I assume the parameter $(a,b)$ to be unknown.



This is not a pmf but a pdf (it is a continuous distribution) and you can see that the normalising constant $b$ is missing in your equations.



If $Y_1,Y_2,ldots,Y_n$ are independent and identically distributed random variables having the above distribution, then the likelihood function given the sample $(y_1,y_2,ldots,y_n)inmathbb R^n$ is



begin{align}
L(a,b)&=prod_{i=1}^n f(y_i,;a,b)
\&=frac{1}{b^n}expleft[-frac{1}{b}sum_{i=1}^n (y_i-a)-sum_{i=1}^n e^{-(y_i-a)/b}right]quad,,ainmathbb R,b>0
end{align}



So the log-likelihood is



begin{align}
ell(a,b)&=-nln b-frac{1}{b}sum_{i=1}^n (y_i-a)-sum_{i=1}^n e^{-(y_i-a)/b}
\&=-nln b-frac{n}{b}(bar y-a)-e^{a/b}sum_{i=1}^n e^{-y_i/b} qquad[,bar y=text{ sample mean }]
end{align}






share|cite|improve this answer





















  • Thank you , I managed to estimate my a ,b now
    – Extra mint
    Nov 18 at 14:17










  • Consider 'accepting' answers to your questions if they fully address your queries.
    – StubbornAtom
    Nov 18 at 15:19















up vote
0
down vote



accepted










I think you are talking about the Gumbel distribution whose probability density function (pdf) is of the form



$$f(y,;a,b)=frac{1}{b}expleft[-frac{(y-a)}{b}-e^{-(y-a)/b}right]quad,,yinmathbb Rquad,,ainmathbb R,b>0$$



, where I assume the parameter $(a,b)$ to be unknown.



This is not a pmf but a pdf (it is a continuous distribution) and you can see that the normalising constant $b$ is missing in your equations.



If $Y_1,Y_2,ldots,Y_n$ are independent and identically distributed random variables having the above distribution, then the likelihood function given the sample $(y_1,y_2,ldots,y_n)inmathbb R^n$ is



begin{align}
L(a,b)&=prod_{i=1}^n f(y_i,;a,b)
\&=frac{1}{b^n}expleft[-frac{1}{b}sum_{i=1}^n (y_i-a)-sum_{i=1}^n e^{-(y_i-a)/b}right]quad,,ainmathbb R,b>0
end{align}



So the log-likelihood is



begin{align}
ell(a,b)&=-nln b-frac{1}{b}sum_{i=1}^n (y_i-a)-sum_{i=1}^n e^{-(y_i-a)/b}
\&=-nln b-frac{n}{b}(bar y-a)-e^{a/b}sum_{i=1}^n e^{-y_i/b} qquad[,bar y=text{ sample mean }]
end{align}






share|cite|improve this answer





















  • Thank you , I managed to estimate my a ,b now
    – Extra mint
    Nov 18 at 14:17










  • Consider 'accepting' answers to your questions if they fully address your queries.
    – StubbornAtom
    Nov 18 at 15:19













up vote
0
down vote



accepted







up vote
0
down vote



accepted






I think you are talking about the Gumbel distribution whose probability density function (pdf) is of the form



$$f(y,;a,b)=frac{1}{b}expleft[-frac{(y-a)}{b}-e^{-(y-a)/b}right]quad,,yinmathbb Rquad,,ainmathbb R,b>0$$



, where I assume the parameter $(a,b)$ to be unknown.



This is not a pmf but a pdf (it is a continuous distribution) and you can see that the normalising constant $b$ is missing in your equations.



If $Y_1,Y_2,ldots,Y_n$ are independent and identically distributed random variables having the above distribution, then the likelihood function given the sample $(y_1,y_2,ldots,y_n)inmathbb R^n$ is



begin{align}
L(a,b)&=prod_{i=1}^n f(y_i,;a,b)
\&=frac{1}{b^n}expleft[-frac{1}{b}sum_{i=1}^n (y_i-a)-sum_{i=1}^n e^{-(y_i-a)/b}right]quad,,ainmathbb R,b>0
end{align}



So the log-likelihood is



begin{align}
ell(a,b)&=-nln b-frac{1}{b}sum_{i=1}^n (y_i-a)-sum_{i=1}^n e^{-(y_i-a)/b}
\&=-nln b-frac{n}{b}(bar y-a)-e^{a/b}sum_{i=1}^n e^{-y_i/b} qquad[,bar y=text{ sample mean }]
end{align}






share|cite|improve this answer












I think you are talking about the Gumbel distribution whose probability density function (pdf) is of the form



$$f(y,;a,b)=frac{1}{b}expleft[-frac{(y-a)}{b}-e^{-(y-a)/b}right]quad,,yinmathbb Rquad,,ainmathbb R,b>0$$



, where I assume the parameter $(a,b)$ to be unknown.



This is not a pmf but a pdf (it is a continuous distribution) and you can see that the normalising constant $b$ is missing in your equations.



If $Y_1,Y_2,ldots,Y_n$ are independent and identically distributed random variables having the above distribution, then the likelihood function given the sample $(y_1,y_2,ldots,y_n)inmathbb R^n$ is



begin{align}
L(a,b)&=prod_{i=1}^n f(y_i,;a,b)
\&=frac{1}{b^n}expleft[-frac{1}{b}sum_{i=1}^n (y_i-a)-sum_{i=1}^n e^{-(y_i-a)/b}right]quad,,ainmathbb R,b>0
end{align}



So the log-likelihood is



begin{align}
ell(a,b)&=-nln b-frac{1}{b}sum_{i=1}^n (y_i-a)-sum_{i=1}^n e^{-(y_i-a)/b}
\&=-nln b-frac{n}{b}(bar y-a)-e^{a/b}sum_{i=1}^n e^{-y_i/b} qquad[,bar y=text{ sample mean }]
end{align}







share|cite|improve this answer












share|cite|improve this answer



share|cite|improve this answer










answered Nov 17 at 17:24









StubbornAtom

4,88411137




4,88411137












  • Thank you , I managed to estimate my a ,b now
    – Extra mint
    Nov 18 at 14:17










  • Consider 'accepting' answers to your questions if they fully address your queries.
    – StubbornAtom
    Nov 18 at 15:19


















  • Thank you , I managed to estimate my a ,b now
    – Extra mint
    Nov 18 at 14:17










  • Consider 'accepting' answers to your questions if they fully address your queries.
    – StubbornAtom
    Nov 18 at 15:19
















Thank you , I managed to estimate my a ,b now
– Extra mint
Nov 18 at 14:17




Thank you , I managed to estimate my a ,b now
– Extra mint
Nov 18 at 14:17












Consider 'accepting' answers to your questions if they fully address your queries.
– StubbornAtom
Nov 18 at 15:19




Consider 'accepting' answers to your questions if they fully address your queries.
– StubbornAtom
Nov 18 at 15:19


















 

draft saved


draft discarded



















































 


draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3001680%2ffinding-mistake-in-likelihood-function-and-likelihood%23new-answer', 'question_page');
}
);

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







Popular posts from this blog

How do I know what Microsoft account the skydrive app is syncing to?

Grease: Live!

When does type information flow backwards in C++?