Skip to main content

Welcome to a Grasp lesson

Create a free account to keep studying and create your own study path.

Lesson 16

Exponential Family Form of Normal and Gamma Distributions

Recommended resources

Introduction

Welcome back! In the last lesson, you mastered the process of converting discrete distributions—specifically the Binomial and Poisson—into the standard exponential family form. You saw how this algebraic exercise revealed the origin of their canonical link functions (logit and log) and that for both, the dispersion parameter was simply 1.

Today, we will extend this crucial skill to two important continuous distributions: Normal and Gamma. The key difference is that for these distributions, the dispersion parameter plays a significant role and is not fixed at 1. This concept is fundamental to understanding how Generalized Linear Models (GLMs) handle variance that changes with the mean.

By the end of this lesson, you will be able to convert the probability density functions (PDFs) of the Normal and Gamma distributions into the exponential family form and confidently identify all their components, including a non-trivial dispersion parameter.


Recalling the Exponential Family Form

As a quick refresher, a distribution is in the exponential family if its PDF or PMF can be written as:

The components are:

  • : The natural parameter, related to the mean.
  • : The dispersion parameter, related to the variance or scale.
  • : A function of the dispersion parameter. We'll see this is often just itself.
  • : The cumulant function, which helps determine the mean and variance.
  • : A function of the data and dispersion, acting as a normalizing constant.

Our strategy remains the same: take the PDF, get everything inside an exp() function, and algebraically rearrange it to match this target structure.


Worked Example 1: The Normal Distribution

Let's begin with the familiar bell curve. The Normal distribution is the foundation of standard linear regression, and seeing it in this new context helps bridge the gap to GLMs.

The PDF for a Normal distribution with mean and variance is:

Our task is to manipulate this into the exponential family form. The process involves some algebraic steps like expanding squares and grouping terms. To see this done clearly, step-by-step, the following video is an excellent guide.

GLM Exponential Family, Example with Normal distribution finding functions a, b, and c

This video, 'GLM Exponential Family, Example with Normal distribution', walks through the complete derivation. It's a great way to see the algebra in action.

Please watch from 02:26 to 09:48. The presenter starts with the Normal PDF and methodically works through the algebra to match the exponential family form, then clearly identifies each component.

Summary of the Derivation and Components

As shown in the video, the algebraic manipulation leads to this form:

Now, we can match this to our target structure and identify each component.

  • Natural Parameter (): The term multiplying inside the main fraction is .

  • Dispersion Parameter (): The variance serves as the dispersion parameter.

  • Function : The denominator of the main fraction is , which is just .

  • Cumulant Function (): The term subtracted from in the numerator is . Since , we have:

  • Function : The remaining terms make up .

The lecture notes from Purdue University's statistics department provide a concise summary of this same result, which can be useful as a quick reference.

[PDF] Generalized Linear Models (GLMs) - Purdue Department of Statistics

For a quick written summary, please review the 'Generalized Linear Models (GLMs)' notes from Purdue University.

In the PDF, find the section titled 'Normal Distribution' (it's on page/slide 8). Notice how it presents the final exponential form and lists the same components we just identified.


Worked Example 2: The Gamma Distribution

The Gamma distribution is common for modeling right-skewed, strictly positive continuous data, such as insurance claims or waiting times. Its derivation is algebraically more involved than the Normal distribution's.

The Gamma PDF is often parameterized with a shape parameter and a rate parameter :

Here, is the gamma function.

Let's convert this into the exponential family form.

Step 1: Get everything into an exp() function.
We use the fact that .

Step 2: Rearrange to match the target form.
This is the trickiest part. We need to create the structure . The key insight is to define the dispersion parameter in terms of the shape parameter , and the natural parameter in terms of the rate parameter .

Let's define our parameters as follows:

  • Natural parameter:
  • Dispersion parameter:

With these definitions, we can't directly form . Let's use a different, more standard set of definitions from GLM theory:

This choice may seem arbitrary, but it leads to a clean separation of terms. With and , we can substitute these back into the log-likelihood expression. The algebra is dense, but it results in:

While you are not expected to derive this from scratch on the exam, you are expected to be able to identify the components from the final form.

Let's identify the components from this expression:

  • Natural Parameter (): Defined as .
  • Dispersion Parameter (): Defined as .
  • Function : The denominator of the main fraction is simply .
  • Cumulant Function (): The term subtracted in the numerator is .
  • Function : All the leftover terms.

The video below attempts this derivation. While its notation and algebraic steps can be a bit difficult to follow, watching it can give you an appreciation for the process. Focus on the final identification of the components rather than the intermediate steps.

Gamma Distribution: Member of the Exp Family

The video 'Gamma Distribution: Member of the Exp Family' walks through a derivation for the Gamma distribution. The algebra is complex, so focus on the outcome.

Watch from 00:00 to 07:08. Pay attention to how the presenter manipulates the log-likelihood to isolate terms and eventually identifies the components. Note that the final form may look slightly different due to different algebraic choices, but the core relationships are the same.


Why Does This Matter? Mean and Variance

A beautiful property of the exponential family is that you can derive the mean and variance of the distribution directly from the and functions:

  • Mean: (the first derivative of )
  • Variance: (the second derivative of times )

Let's check this for the Normal distribution:

  • . Since , . Correct.
  • . . So . Correct.

This powerful result is why the function is so important in GLMs. For your exam, knowing these derivative relationships can be a quick way to check your work.


Conclusion

In this lesson, we built on our previous work by converting the continuous Normal and Gamma distributions into the exponential family form. Crucially, this introduced the concept of a non-trivial dispersion parameter .

Key Takeaways:

  • The process of converting a PDF to the exponential family form involves manipulating it to match the structure .
  • For the Normal() distribution:
    • Natural Parameter:
    • Dispersion Parameter:
    • Cumulant Function:
  • For the Gamma() distribution (shape/rate):
    • Natural Parameter:
    • Dispersion Parameter:
    • Cumulant Function:
  • The mean and variance of any exponential family distribution are given by and .

In our next lesson, we will tackle the last distribution for this topic: the Negative Binomial. We'll then consolidate this knowledge by learning how to choose the right distribution for a given dataset based on its characteristics, a key skill for your exam.