Deriving the canonical link for a binomial distribution

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;







up vote
3
down vote

favorite












I define an exponential dispersion family as any distribution whose PMF/PDF is
$$f(y mid boldsymboltheta) = expleftphi[ytheta - b(theta)] + c(y, phi) righttext, y in Omega$$
where $Omega$ is in the support of a random variable $Y$ in the family.



Suppose $Y_1, dots, Y_m$ are independent and binomially distributed ($n$ trials, success probability $p_i$). I've already shown that the Binomial distribution satisfies the above, with
$$beginalign
phi &= 1 \
theta_i &= logleft(dfracp_i1-p_i right) \
b(theta_i) &= nlogleft(dfrac11-p_iright) \
c(phi, y_i) &= logbinomny_itext.
endalign$$

After some work, I showed that, as a function of $theta_i$,
$$b(theta_i) = nlog(e^theta_i + 1)$$
(this is consistent with what I found at http://sfb649.wiwi.hu-berlin.de/fedc_homepage/xplore/tutorials/xlghtmlnode38.html)
and I understand that
$$mu_i = b^prime(theta_i) = n cdot dfrace^theta_ie^theta_i+1text.$$



I also understand that what we need to do is solve for $theta_i$ in the above, and the canonical link function would be $g(mu_i) = theta_i$ according to above. But one thing bothers me: when I run the above through WolframAlpha, I obtain
$$g(mu_i) = theta_i = logleft( dfracmu_in-mu_iright)text.$$
Every source I've seen says that the $n$ above should be a $1$ for the binomial canonical link function. Did I do something wrong?










share|cite|improve this question





























    up vote
    3
    down vote

    favorite












    I define an exponential dispersion family as any distribution whose PMF/PDF is
    $$f(y mid boldsymboltheta) = expleftphi[ytheta - b(theta)] + c(y, phi) righttext, y in Omega$$
    where $Omega$ is in the support of a random variable $Y$ in the family.



    Suppose $Y_1, dots, Y_m$ are independent and binomially distributed ($n$ trials, success probability $p_i$). I've already shown that the Binomial distribution satisfies the above, with
    $$beginalign
    phi &= 1 \
    theta_i &= logleft(dfracp_i1-p_i right) \
    b(theta_i) &= nlogleft(dfrac11-p_iright) \
    c(phi, y_i) &= logbinomny_itext.
    endalign$$

    After some work, I showed that, as a function of $theta_i$,
    $$b(theta_i) = nlog(e^theta_i + 1)$$
    (this is consistent with what I found at http://sfb649.wiwi.hu-berlin.de/fedc_homepage/xplore/tutorials/xlghtmlnode38.html)
    and I understand that
    $$mu_i = b^prime(theta_i) = n cdot dfrace^theta_ie^theta_i+1text.$$



    I also understand that what we need to do is solve for $theta_i$ in the above, and the canonical link function would be $g(mu_i) = theta_i$ according to above. But one thing bothers me: when I run the above through WolframAlpha, I obtain
    $$g(mu_i) = theta_i = logleft( dfracmu_in-mu_iright)text.$$
    Every source I've seen says that the $n$ above should be a $1$ for the binomial canonical link function. Did I do something wrong?










    share|cite|improve this question

























      up vote
      3
      down vote

      favorite









      up vote
      3
      down vote

      favorite











      I define an exponential dispersion family as any distribution whose PMF/PDF is
      $$f(y mid boldsymboltheta) = expleftphi[ytheta - b(theta)] + c(y, phi) righttext, y in Omega$$
      where $Omega$ is in the support of a random variable $Y$ in the family.



      Suppose $Y_1, dots, Y_m$ are independent and binomially distributed ($n$ trials, success probability $p_i$). I've already shown that the Binomial distribution satisfies the above, with
      $$beginalign
      phi &= 1 \
      theta_i &= logleft(dfracp_i1-p_i right) \
      b(theta_i) &= nlogleft(dfrac11-p_iright) \
      c(phi, y_i) &= logbinomny_itext.
      endalign$$

      After some work, I showed that, as a function of $theta_i$,
      $$b(theta_i) = nlog(e^theta_i + 1)$$
      (this is consistent with what I found at http://sfb649.wiwi.hu-berlin.de/fedc_homepage/xplore/tutorials/xlghtmlnode38.html)
      and I understand that
      $$mu_i = b^prime(theta_i) = n cdot dfrace^theta_ie^theta_i+1text.$$



      I also understand that what we need to do is solve for $theta_i$ in the above, and the canonical link function would be $g(mu_i) = theta_i$ according to above. But one thing bothers me: when I run the above through WolframAlpha, I obtain
      $$g(mu_i) = theta_i = logleft( dfracmu_in-mu_iright)text.$$
      Every source I've seen says that the $n$ above should be a $1$ for the binomial canonical link function. Did I do something wrong?










      share|cite|improve this question















      I define an exponential dispersion family as any distribution whose PMF/PDF is
      $$f(y mid boldsymboltheta) = expleftphi[ytheta - b(theta)] + c(y, phi) righttext, y in Omega$$
      where $Omega$ is in the support of a random variable $Y$ in the family.



      Suppose $Y_1, dots, Y_m$ are independent and binomially distributed ($n$ trials, success probability $p_i$). I've already shown that the Binomial distribution satisfies the above, with
      $$beginalign
      phi &= 1 \
      theta_i &= logleft(dfracp_i1-p_i right) \
      b(theta_i) &= nlogleft(dfrac11-p_iright) \
      c(phi, y_i) &= logbinomny_itext.
      endalign$$

      After some work, I showed that, as a function of $theta_i$,
      $$b(theta_i) = nlog(e^theta_i + 1)$$
      (this is consistent with what I found at http://sfb649.wiwi.hu-berlin.de/fedc_homepage/xplore/tutorials/xlghtmlnode38.html)
      and I understand that
      $$mu_i = b^prime(theta_i) = n cdot dfrace^theta_ie^theta_i+1text.$$



      I also understand that what we need to do is solve for $theta_i$ in the above, and the canonical link function would be $g(mu_i) = theta_i$ according to above. But one thing bothers me: when I run the above through WolframAlpha, I obtain
      $$g(mu_i) = theta_i = logleft( dfracmu_in-mu_iright)text.$$
      Every source I've seen says that the $n$ above should be a $1$ for the binomial canonical link function. Did I do something wrong?







      self-study mathematical-statistics generalized-linear-model exponential-family






      share|cite|improve this question















      share|cite|improve this question













      share|cite|improve this question




      share|cite|improve this question








      edited 59 mins ago

























      asked 1 hour ago









      Clarinetist

      1,0581142




      1,0581142




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          3
          down vote













          You're almost right, and it's such an easy fix:



          $$mu_i = p_i n$$ so $$log(fracmu_in - mu_i) = log(fracnp_in - np_i) = ...$$



          So, the $n$ can be a 1, as long as you swap out $mu_i$ for $p_i$.






          share|cite|improve this answer




















          • So if I'm understanding what you're saying correctly, it's this: if I wanted to write the canonical link in terms of $p_i$, it would be the logit, but if I wanted to write it in terms of $mu_i$, it would be what I have above (and in both cases, they are identical for when $n = 1$ , i.e., the Bernoulli)?
            – Clarinetist
            1 hour ago










          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: "65"
          ;
          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: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstats.stackexchange.com%2fquestions%2f369985%2fderiving-the-canonical-link-for-a-binomial-distribution%23new-answer', 'question_page');

          );

          Post as a guest






























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          3
          down vote













          You're almost right, and it's such an easy fix:



          $$mu_i = p_i n$$ so $$log(fracmu_in - mu_i) = log(fracnp_in - np_i) = ...$$



          So, the $n$ can be a 1, as long as you swap out $mu_i$ for $p_i$.






          share|cite|improve this answer




















          • So if I'm understanding what you're saying correctly, it's this: if I wanted to write the canonical link in terms of $p_i$, it would be the logit, but if I wanted to write it in terms of $mu_i$, it would be what I have above (and in both cases, they are identical for when $n = 1$ , i.e., the Bernoulli)?
            – Clarinetist
            1 hour ago














          up vote
          3
          down vote













          You're almost right, and it's such an easy fix:



          $$mu_i = p_i n$$ so $$log(fracmu_in - mu_i) = log(fracnp_in - np_i) = ...$$



          So, the $n$ can be a 1, as long as you swap out $mu_i$ for $p_i$.






          share|cite|improve this answer




















          • So if I'm understanding what you're saying correctly, it's this: if I wanted to write the canonical link in terms of $p_i$, it would be the logit, but if I wanted to write it in terms of $mu_i$, it would be what I have above (and in both cases, they are identical for when $n = 1$ , i.e., the Bernoulli)?
            – Clarinetist
            1 hour ago












          up vote
          3
          down vote










          up vote
          3
          down vote









          You're almost right, and it's such an easy fix:



          $$mu_i = p_i n$$ so $$log(fracmu_in - mu_i) = log(fracnp_in - np_i) = ...$$



          So, the $n$ can be a 1, as long as you swap out $mu_i$ for $p_i$.






          share|cite|improve this answer












          You're almost right, and it's such an easy fix:



          $$mu_i = p_i n$$ so $$log(fracmu_in - mu_i) = log(fracnp_in - np_i) = ...$$



          So, the $n$ can be a 1, as long as you swap out $mu_i$ for $p_i$.







          share|cite|improve this answer












          share|cite|improve this answer



          share|cite|improve this answer










          answered 1 hour ago









          eric_kernfeld

          2,340421




          2,340421











          • So if I'm understanding what you're saying correctly, it's this: if I wanted to write the canonical link in terms of $p_i$, it would be the logit, but if I wanted to write it in terms of $mu_i$, it would be what I have above (and in both cases, they are identical for when $n = 1$ , i.e., the Bernoulli)?
            – Clarinetist
            1 hour ago
















          • So if I'm understanding what you're saying correctly, it's this: if I wanted to write the canonical link in terms of $p_i$, it would be the logit, but if I wanted to write it in terms of $mu_i$, it would be what I have above (and in both cases, they are identical for when $n = 1$ , i.e., the Bernoulli)?
            – Clarinetist
            1 hour ago















          So if I'm understanding what you're saying correctly, it's this: if I wanted to write the canonical link in terms of $p_i$, it would be the logit, but if I wanted to write it in terms of $mu_i$, it would be what I have above (and in both cases, they are identical for when $n = 1$ , i.e., the Bernoulli)?
          – Clarinetist
          1 hour ago




          So if I'm understanding what you're saying correctly, it's this: if I wanted to write the canonical link in terms of $p_i$, it would be the logit, but if I wanted to write it in terms of $mu_i$, it would be what I have above (and in both cases, they are identical for when $n = 1$ , i.e., the Bernoulli)?
          – Clarinetist
          1 hour ago

















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstats.stackexchange.com%2fquestions%2f369985%2fderiving-the-canonical-link-for-a-binomial-distribution%23new-answer', 'question_page');

          );

          Post as a guest













































































          Comments

          Popular posts from this blog

          Long meetings (6-7 hours a day): Being “babysat” by supervisor

          Is the Concept of Multiple Fantasy Races Scientifically Flawed? [closed]

          Confectionery