Mathematics in VAE for Engineers.(WIP)


Background Knowledge

Bayesian Statistics Terminologies

Name Notation Description
Prior 𝑝(𝑧) The overall distribution of the latent variable 𝑧. For example, 𝑝(𝑧)=𝒩︀(0,𝐼)
likelihood 𝑝(𝑥|𝑧) The probability of the observed variable 𝑥 given the latent variable 𝑧. It also describes the generative process, so it is also called probabilistic decoder.
posterior 𝑝(𝑧|𝑥) The probability of the latent variable 𝑧 given the observed variable 𝑥.
Evidence 𝑝(𝑥) You can think of Evidence as how likely a generative model is to generate a particular image or how reasonable the model considers this image to be. Also called Marginal Likelihood in original VAE paper

These four distributions are related by Bayes’ theorem:

𝑝 ( 𝑧 | 𝑥 ) = 𝑝 ( 𝑥 | 𝑧 ) 𝑝 ( 𝑧 ) 𝑝 ( 𝑥 )

Research Background

Since Encoder-Decoder architecture has become super common in deep learning, we won’t discuss the application of VAE in detail. Instead, we will focus on the math behind VAE and try to restore the history background of when VAE was proposed.

Problem statement

A common misconception is that VAE was originally motivated purely by the task of generating new data. In fact, one of its central motivations was a classical problem in probabilistic modeling: when the posterior over the latent variables is intractable, how can we efficiently infer the latent variables and learn the parameters of a generative model? You might ask, why is the posterior inference problem important? Generative models seem to be much more popular. In statistics, a classical scenario is that we observed some data 𝑥, which can be huge, and we want to know what process produced them.1

Since we are interested in the posterior inference problem, we can first assume that the decoder 𝑝(𝑥|𝑧) is a neural network, while its parameters remain unknown. We denote it as 𝑝𝜃(𝑥|𝑧), where 𝜃 represents the parameters of the neural network. And, 𝑝(𝑧) as the distribution over latent space, is determined by Encoder.2 Since both encoder and decoder are something we are going to find, we can simply impose a prior distribution(e.g., a standard isotropic Gaussian) to act as a “constraint” on both models. Then according to Bayes’ theorem, we can compute the posterior 𝑝(𝑧|𝑥)=𝑝𝜃(𝑥|𝑧)𝑝(𝑧)𝑝(𝑥). The only problem is that the evidence 𝑝(𝑥)=∫𝑝𝜃(𝑥|𝑧)𝑝(𝑧)𝑑𝑧 is often intractable when the likelihood is parameterized by a nonlinear neural network, especially when the latent space is high-dimensional.

Wait, why can you just assume that the generative model 𝑝𝜃(𝑥|𝑧) is known? How about we assume that the posterior 𝑝(𝑧|𝑥) is known? Just use a neural network to fit it, then the problem is solved! Of course you can do that, but then the Bayes’ theorem would become 𝑝(𝑥|𝑧)=𝑝(𝑧|𝑥)𝑝(𝑥)𝑝(𝑧), then 𝑝(𝑥)=∫𝑝(𝑧|𝑥)𝑝(𝑥)𝑑𝑧 is still intractable. In other words, once you know side of the Bayes’ theorem, you already have a theoretical solution provided by it; we just cannot obtain its explicit form.

What if we use two neural networks to model the generative process and the posterior inference process simultaneously? This is the central idea behind VAE. We use a decoder 𝑝𝜃(𝑥|𝑧) to model how data are generated from latent variables, and an encoder 𝑞Φ(𝑧|𝑥) to approximate the intractable posterior (𝑝𝜃(𝑧|𝑥)). However, this introduces a new challenge: how can we jointly optimize the two networks when the true posterior and the marginal likelihood are intractable?

Design: VAE Derivation

Remember that we now have a Decoder 𝑝𝜃(𝑥|𝑧) and a theoretical Encoder 𝑝𝜃(𝑧|𝑥) derived from our decoder via Bayes’ theorem. Since we can’t obtain the explicit form of this theoretical Encoder, we are now using another neural network, with its parameters denoted as Φ, to approximate it. This approximated Encoder is denoted as 𝑞Φ(𝑧|𝑥).

Evidence Lower Bound (ELBO)

For simplicity’s sake, I will use 𝑞Φ to represent 𝑞Φ(𝑧|𝑥) and 𝑝𝜃 to represent 𝑝𝜃(𝑧|𝑥) in this section.

Since one of our goals is to make 𝑞Φ to be as close to 𝑝𝜃 as possible, we can simply minimize its KL divergence.

𝐷 KL ( 𝑞 Φ ‖ 𝑝 𝜃 ) = ∫ 𝑧 𝑞 Φ ⋅ log ( 𝑞 Φ 𝑝 𝜃 ) 𝑑 𝑧

And don’t forget that we still don’t know the Decoder’s parameters 𝜃 at this point. So another goal is naturally optimize our Decoder, which means to maximize the probability of generating data in our datasets 𝑝𝜃(𝑥). We will start with only KL divergence, in later steps you will see 𝑝𝜃(𝑥) emerges by itself.

Because of the definition of expected value, we can rewrite this integral as

𝐷 KL ( 𝑞 Φ ‖ 𝑝 𝜃 ) = ∫ 𝑧 𝑞 Φ ⋅ log 𝑞 Φ 𝑝 𝜃 𝑑 𝑧 = 𝔼 𝑞 Φ [ log 𝑞 Φ 𝑝 𝜃 ] = 𝔼 𝑞 Φ [ log 𝑞 Φ ] − 𝔼 𝑞 Φ [ log 𝑝 𝜃 ]

We know that 𝑝𝜃(𝑧|𝑥)=𝑝𝜃(𝑧,𝑥)𝑝𝜃(𝑥), thus

𝐷 KL ( 𝑞 Φ ‖ 𝑝 𝜃 ) = 𝔼 𝑞 Φ [ log 𝑞 Φ ] − 𝔼 𝑞 Φ [ log ( 𝑝 𝜃 ( 𝑧 , 𝑥 ) ) 𝑝 𝜃 ( 𝑥 ) ] = 𝔼 𝑞 Φ [ log 𝑞 Φ ] − 𝔼 𝑞 Φ [ log 𝑝 𝜃 ( 𝑧 , 𝑥 ) ] + 𝔼 𝑞 Φ [ log 𝑝 𝜃 ( 𝑥 ) ]

𝑝𝜃(𝑥) is not related to 𝑧, thus 𝔼𝑞Φ[log𝑝𝜃(𝑥)]=log𝑝𝜃(𝑥).

𝐷 KL ( 𝑞 Φ ‖ 𝑝 𝜃 ) = log 𝑝 𝜃 ( 𝑥 ) − 𝔼 𝑞 Φ [ log 𝑝 𝜃 ( 𝑧 , 𝑥 ) − log 𝑞 Φ ]

Here we get both variables we want to optimize in a single equation. And notice that

𝔼 𝑞 Φ [ log 𝑝 𝜃 ( 𝑧 , 𝑥 ) − log 𝑞 Φ ] = log 𝑝 𝜃 ( 𝑥 ) − 𝐷 KL ( 𝑞 Φ ‖ 𝑝 𝜃 )

meaning by maximizing 𝔼𝑞Φ[log𝑝𝜃(𝑧,𝑥)−log𝑞Φ] we can minimize the KL divergence and maximize 𝑝𝜃(𝑥) at the same time! We now call this useful term Evidence Lower Bound or ELBO for short

ELBO = 𝔼 𝑞 Φ [ log 𝑝 𝜃 ( 𝑧 , 𝑥 ) − log 𝑞 Φ ]

, since

log 𝑝 𝜃 ( 𝑥 ) = 𝐷 KL ( 𝑞 Φ ‖ 𝑝 𝜃 ) + 𝔼 𝑞 Φ [ log 𝑝 𝜃 ( 𝑧 , 𝑥 ) − log 𝑞 Φ ]

and 𝐷KL(𝑞Φ‖𝑝𝜃)≥0, thus 𝔼𝑞Φ[log𝑝𝜃(𝑧,𝑥)−log𝑞Φ] is the lower bound of log evidence log𝑝𝜃(𝑥).

Find the Gradient of ELBO

Now the issue becomes how do we maximize ELBO. A natural solution is to find its gradient, and then we can perform gradient descent to −ELBO. Let’s first try to find the gradient w.r.t4 𝜃.

∇ 𝜃 ELBO = ∇ 𝜃 ( 𝔼 𝑞 Φ ( 𝑧 | 𝑥 ) [ log 𝑝 𝜃 ( 𝑧 , 𝑥 ) − log 𝑞 Φ ( 𝑧 | 𝑥 ) ] ) = ∇ 𝜃 ( ∫ 𝑧 𝑞 Φ ( 𝑧 | 𝑥 ) [ log 𝑝 𝜃 ( 𝑧 , 𝑥 ) − log 𝑞 Φ ( 𝑧 | 𝑥 ) ] 𝑑 𝑧 ) = ∫ 𝑧 𝑞 Φ ( 𝑧 | 𝑥 ) ∇ 𝜃 [ log 𝑝 𝜃 ( 𝑧 , 𝑥 ) − log 𝑞 Φ ( 𝑧 | 𝑥 ) ] 𝑑 𝑧

Since the second term log𝑞Φ(𝑧|𝑥) is not related to 𝜃, its gradient w.r.t 𝜃 is just zero.

∇ 𝜃 ELBO = ∫ 𝑧 𝑞 Φ ( 𝑧 | 𝑥 ) ∇ 𝜃 [ log 𝑝 𝜃 ( 𝑧 , 𝑥 ) ] 𝑑 𝑧 = 𝔼 𝑞 Φ ( 𝑧 | 𝑥 ) ∇ 𝜃 [ log 𝑝 𝜃 ( 𝑧 , 𝑥 ) ]

After The Reparameterization Trick, we can perform Monte Carlo sampling to estimate the value of this expectation. The basic idea is just sampling bunch of latents 𝑧 out of the distribution 𝑞Φ(𝑧|𝑥), which can be done after The Reparameterization Trick, then calculate the average value of the gradient given those z.

𝔼 𝑞 Φ ( 𝑧 | 𝑥 ) ∇ 𝜃 [ log 𝑝 𝜃 ( 𝑧 , 𝑥 ) ] ≈ 1 𝐿 ∑ 𝑙 = 1 𝐿 ∇ 𝜃 [ log 𝑝 𝜃 ( 𝑧 , 𝑥 ) ]

Where 𝐿 means the number of Monte Carlo samples.

To sum up, so far there is nothing blocking us to find the gradient of the ELBO w.r.t 𝜃. But we won’t be that lucky when we try to find the gradient w.r.t Φ.

∇ Φ ELBO = ∇ Φ ( 𝔼 𝑞 Φ ( 𝑧 | 𝑥 ) [ log 𝑝 𝜃 ( 𝑧 , 𝑥 ) − log 𝑞 Φ ( 𝑧 | 𝑥 ) ] ) = ∇ Φ ∫ 𝑧 𝑞 Φ ( 𝑧 | 𝑥 ) [ log 𝑝 𝜃 ( 𝑧 , 𝑥 ) − log 𝑞 Φ ( 𝑧 | 𝑥 ) ] 𝑑 𝑧 = ∫ 𝑧 ∇ Φ [ 𝑞 Φ ( 𝑧 | 𝑥 ) [ log 𝑝 𝜃 ( 𝑧 , 𝑥 ) − log 𝑞 Φ ( 𝑧 | 𝑥 ) ] ] 𝑑 𝑧 = ∫ 𝑧 𝑞 Φ ( 𝑧 | 𝑥 ) ∇ Φ [ log 𝑝 𝜃 ( 𝑧 , 𝑥 ) − log 𝑞 Φ ( 𝑧 | 𝑥 ) ] 𝑑 𝑧 + ∫ 𝑧 ∇ Φ 𝑞 Φ ( 𝑧 | 𝑥 ) [ log 𝑝 𝜃 ( 𝑧 , 𝑥 ) − log 𝑞 Φ ( 𝑧 | 𝑥 ) ] 𝑑 𝑧

Once again, we can do Monte Carlo sampling to the first term since it is an expectation. But we can’t do so to the second term. That’s exactly where The Reparameterization Trick comes in.

The Reparameterization Trick

The origin of the problem is that 𝑞Φ(𝑧|𝑥), which is the distribution we’re sampling from, is related to the value we are finding gradient with respect to (Φ). So the solution here is to replace 𝑞Φ(𝑧|𝑥) with an unrelated distribution, while keeping the value of ELBO unchanged. That sounds impossible first, but a special design is applied here to make this possible.

The encoder network doesn’t directly output a latent variable 𝑧, instead, it gives you mean and variance according to 𝑥 deterministically. Later we sample an 𝑧 from the Gaussian distribution given those parameters.

We denote the mean and variance as 𝜇Φ(𝑥) and 𝜎Φ2(𝑥), thus we have

𝑞 Φ ( 𝑧 | 𝑥 ) = 𝒩︀ ( 𝜇 Φ ( 𝑥 ) , 𝜎 Φ 2 ( 𝑥 ) )

This is also true for the decoder. (In some cases, the variance is fixed.)

𝑝 𝜃 ( 𝑥 | 𝑧 ) = 𝒩︀ ( 𝜇 𝜃 ( 𝑧 ) , 𝜎 𝜃 2 ( 𝑧 ) )

We will use this feature later on.

Now we know that 𝑧 is sampled from an Gaussian distribution, thus

𝑞 Φ ( 𝑧 | 𝑥 ) = 1 𝜎 Φ ( 𝑥 ) 2 𝜋 exp ( − ( 𝑧 − 𝜇 Φ ( 𝑥 ) ) 2 2 𝜎 Φ 2 ( 𝑥 ) ) let 𝑓 ( 𝑧 ) = def log 𝑝 𝜃 ( 𝑧 , 𝑥 ) − log 𝑞 Φ ELBO = ∫ 𝑞 Φ ( 𝑧 | 𝑥 ) 𝑓 ( 𝑧 ) 𝑑 𝑧 = ∫ 1 𝜎 Φ ( 𝑥 ) 2 𝜋 exp ( − ( 𝑧 − 𝜇 Φ ( 𝑥 ) ) 2 2 𝜎 Φ 2 ( 𝑥 ) ) 𝑓 ( 𝑧 ) 𝑑 𝑧

With that in mind, now let’s define a new variable 𝜀, sampled from Standard Normal distribution 𝒩︀(0,1). Then there is the key step in The Reparameterization Trick: we can use linear transformation(denoted as 𝑔Φ(𝜀,𝑥)) to convert 𝜀 to 𝑧.

If 𝜀 ∼ 𝒩︀ ( 0 , 1 ) and 𝑧 ∼ 𝒩︀ ( 𝜇 Φ ( 𝑥 ) , 𝜎 Φ 2 ( 𝑥 ) ) Then 𝑧 = 𝑔 Φ ( 𝜀 , 𝑥 ) = 𝜇 + 𝜎 𝜀 𝑑 𝑧 = 𝜎 𝑑 𝜀

Let’s now replace all the 𝑧 with 𝜀

ELBO = ∫ 1 𝜎 2 𝜋 exp ( − ( 𝜎 𝜀 ) 2 2 𝜎 2 ) 𝑓 ( 𝜇 + 𝜎 𝜀 ) 𝜎 𝑑 𝜀 = ∫ 1 2 𝜋 exp ( − 𝜀 2 2 ) 𝑓 ( 𝜇 + 𝜎 𝜀 ) 𝑑 𝜀 = 𝔼 𝜀 ∼ 𝒩︀ ( 0 , 1 ) [ 𝑓 ( 𝜇 + 𝜎 𝜀 ) ]

At this point, the distribution used for sampling the expectation has been changed from the problematic 𝑞Φ to 𝜀, which is independent of the optimizable parameters Φ. Thus, finding gradient is not a problem anymore:

∇ 𝜃 , Φ ELBO ≈ 1 𝐿 ∑ 𝑖 = 1 𝐿 ∇ 𝜃 , Φ [ log 𝑝 𝜃 ( 𝑥 , 𝑔 Φ ( 𝜀 , 𝑥 ) ) − log 𝑞 Φ ( 𝑔 Φ ( 𝜀 , 𝑥 ) | 𝑥 ) ]

This optimization method is called Stochastic Gradient Variational Bayes or SGVB. To sum up, SGVB did 2 things:

  1. Monte Carlo estimates the expectation.
  2. Reparameterization separates the randomness from the optimizable parameters, making gradient can be propagated to Φ.

Separate the Reconstruction Term and Regularization Term

Having gone through the journey above, we are now ready to optimize the ELBO. But we can do even better.

For simplicity, I will use the letter 𝑧 below to denote 𝑔Φ(𝜀,𝑥), but please keep in mind that this is the result after reparameterization.

ELBO = 𝔼 𝜀 ∼ 𝒩︀ ( 0 , 1 ) [ log 𝑝 𝜃 ( 𝑥 , 𝑧 ) ⏟ = log ( 𝑝 𝜃 ( 𝑥 | 𝑧 ) ⋅ 𝑝 𝜃 ( 𝑧 ) ) = log 𝑝 𝜃 ( 𝑥 | 𝑧 ) + log 𝑝 𝜃 ( 𝑧 ) − log 𝑞 Φ ( 𝑧 | 𝑥 ) ] = 𝔼 𝜀 ∼ 𝒩︀ ( 0 , 1 ) [ log 𝑝 𝜃 ( 𝑥 | 𝑧 ) ] − 𝔼 𝜀 ∼ 𝒩︀ ( 0 , 1 ) [ log 𝑞 Φ ( 𝑧 | 𝑥 ) 𝑝 𝜃 ( 𝑧 ) ] ⏟ 𝐷 KL ( 𝑞 Φ ( 𝑧 | 𝑥 ) ‖ 𝑝 𝜃 ( 𝑧 ) ) ≈ 1 𝐿 ∑ 𝑖 = 1 𝐿 log 𝑝 𝜃 ( 𝑥 | 𝑧 ( 𝑖 ) ) ⏟ Reconstruction Term − 𝐷 KL ( 𝑞 Φ ( 𝑧 ( 𝑖 ) | 𝑥 ) ‖ 𝑝 𝜃 ( 𝑧 ( 𝑖 ) ) ) ⏟ Regularization Term

This way, the Reconstruction Term can keep being estimated using Monte Carlo sampling, while the KL Divergence can be computed analytically when both distributions are Gaussian.(𝑝𝜃(𝑧)=𝒩︀(0,1) because we want our latent space to be Gaussian.)

As the same trick played in The Reparameterization Trick, 𝑞Φ(𝑧|𝑥) can be represented as

𝑞 Φ ( 𝑧 | 𝑥 ) = 𝒩︀ ( 𝜇 Φ ( 𝑥 ) , 𝜎 Φ 2 ( 𝑥 ) ) = 1 𝜎 Φ ( 𝑥 ) 2 𝜋 exp ( − ( 𝑧 − 𝜇 Φ ( 𝑥 ) ) 2 2 𝜎 Φ 2 ( 𝑥 ) )

Again, for simplicity, I will use the 𝜎 and 𝜇 below to denote 𝜇Φ(𝑥) and 𝜎Φ(𝑥). Then the KL Divergence can be expanded as follows:

𝐷 KL ( 𝑞 Φ ( 𝑧 | 𝑥 ) ∥ 𝑝 𝜃 ( 𝑧 ) ) = ∫ 𝑞 Φ ( 𝑧 | 𝑥 ) log ( 𝑞 Φ ( 𝑧 | 𝑥 ) 𝑝 𝜃 ( 𝑧 ) ) d 𝑧 = ∫ 𝑞 Φ ( 𝑧 | 𝑥 ) log ( 1 𝜎 exp ( − 1 2 ( ( 𝑧 − 𝜇 ) 2 𝜎 2 − 𝑧 2 ) ) ) d 𝑧 = − 1 2 ∫ 𝑞 Φ ( 𝑧 | 𝑥 ) [ log 𝜎 2 − 𝑧 2 + 1 𝜎 2 ( 𝑧 − 𝜇 ) 2 ] d 𝑧 = − 1 2 [ log 𝜎 2 ∫ 𝑞 Φ ( 𝑧 | 𝑥 ) d 𝑧 − ∫ 𝑧 2 𝑞 Φ ( 𝑧 | 𝑥 ) d 𝑧 + 1 𝜎 2 ∫ ( 𝑧 − 𝜇 ) 2 𝑞 Φ ( 𝑧 | 𝑥 ) d 𝑧 ]

Using the properties of the Gaussian distribution:

∫ 𝑞 Φ ( 𝑧 | 𝑥 ) d 𝑧 = 1 ∫ 𝑧 2 𝑞 Φ ( 𝑧 | 𝑥 ) d 𝑧 = 𝜇 2 + 𝜎 2 ∫ ( 𝑧 − 𝜇 ) 2 𝑞 Φ ( 𝑧 | 𝑥 ) d 𝑧 = 𝜎 2

Substituting these results:

𝐷 KL ( 𝑞 Φ ( 𝑧 | 𝑥 ) ∥ 𝑝 𝜃 ( 𝑧 ) ) = − 1 2 [ log 𝜎 2 − ( 𝜇 2 + 𝜎 2 ) + 1 𝜎 2 𝜎 2 ] = − 1 2 [ log 𝜎 2 − 𝜇 2 − 𝜎 2 + 1 ] = 1 2 [ 𝜇 2 + 𝜎 2 − 1 − log 𝜎 2 ]

Substituting the closed-form KL Divergence into the ELBO:

ELBO = 𝔼 𝑞 Φ ( 𝑧 | 𝑥 ) [ log 𝑝 𝜃 ( 𝑥 | 𝑧 ) ] − 𝐷 KL ( 𝑞 Φ ( 𝑧 | 𝑥 ) ∥ 𝑝 𝜃 ( 𝑧 ) ) ≈ 1 𝐿 ∑ 𝑖 = 1 𝐿 log 𝑝 𝜃 ( 𝑥 | 𝑧 ( 𝑖 ) ) ⏟ Reconstruction Term + 1 2 [ log 𝜎 2 − 𝜇 2 − 𝜎 2 + 1 ] ⏟ Regularization Term

where 𝑧(𝑖)=𝜇+𝜎𝜀(𝑖) and 𝜀(𝑖)∼𝒩︀(0,1).

From Theory to Loss Function

As we mentioned earlier, the network gives you means and variances, thus 𝑝𝜃(𝑥|𝑧) is also Gaussian.

𝑝 𝜃 ( 𝑥 | 𝑧 ) = 𝒩︀ ( 𝜇 𝜃 ( 𝑧 ) , 𝜎 𝜃 2 ( 𝑧 ) ) = 1 𝜎 𝜃 ( 𝑧 ) 2 𝜋 exp ( − ( 𝑥 − 𝜇 𝜃 ( 𝑧 ) ) 2 2 𝜎 𝜃 2 ( 𝑧 ) ) ℒ︀ recon = − 1 𝐿 ∑ 𝑖 = 1 𝐿 log 𝑝 𝜃 ( 𝑥 | 𝑧 ( 𝑖 ) ) = 1 𝐿 ∑ 𝑖 = 1 𝐿 ( log 𝜎 𝜃 ( 𝑧 ) + 1 2 log ( 2 𝜋 ) + ( 𝑥 − 𝜇 𝜃 ( 𝑧 ) ) 2 2 𝜎 𝜃 2 ( 𝑧 ) )

In the paper’s experiment they found that the number of samples 𝐿 per data point can be set to 1 as long as the minibatch size was large enough. Thus ℒ︀recon can be further simplified as

ℒ︀ recon = log 𝜎 𝜃 ( 𝑧 ) + 1 2 log ( 2 𝜋 ) + ( 𝑥 − 𝜇 𝜃 ( 𝑧 ) ) 2 2 𝜎 𝜃 2 ( 𝑧 )

If we now substitute 𝑧=𝑔Φ(𝜀,𝑥) back and don’t consider 𝜎 for now, ℒ︀recon is proportional to (𝑥−𝜇𝜃(𝑔Φ(𝜀,𝑥)))2, which is exactly MSE loss.

For the Gaussian Decoder with a fixed unit variance, the training Loss for each data point in the end is:

ℒ︀ VAE = 1 2 ‖ 𝑥 − 𝜇 𝜃 ( 𝑔 Φ ( 𝜀 , 𝑥 ) ) ‖ 2 − 1 2 [ log 𝜎 Φ 2 ( 𝑥 ) − 𝜇 Φ 2 ( 𝑥 ) − 𝜎 Φ 2 ( 𝑥 ) + 1 ]
  1. 1For example, we observed a lot of symptoms of your body 𝑥, then you might want to know what factors 𝑧 cause these symptoms, such as disease.
  2. 2In inference perspective, if you integrate 𝑝(𝑧|𝑥)𝑝(𝑥) over all the data 𝑥, you do get the distribution of 𝑝(𝑧).
  3. 3Strictly speaking, Monte Carlo sampling is used to estimate the expectation of a distribution.
  4. 4with respect to

Comments