# How to find the variance of a probability density function

### How do you find the expectation and variance of a known probability density function?

The probability density function is known, and its expectation:

The probability density function is known, and its variance:

Extension:

The probability that a continuous-type random variable will take on a value at any point is 0. As a corollary, the probability that a continuous-type random variable will take on a value at an interval is independent of whether this whether the interval is open or closed. Note that the probability P{x=a} = 0, but {X=a} is not an impossible event.

Since the value of the random variable X depends only on the integral of the probability density function, the value of the probability density function at individual points does not affect how the random variable behaves.

A function can also be a probability density function of X if there are only a finite, countably infinite number of points at which the function and the probability density function of X take different values, or if it measures 0 (is a zero-measure set) with respect to the entire axis of real numbers.

### Find the variance of the probability density function

First, find c=2 by the property that the probability density integrates to 1, and then find the variance of the random variable by the formula.

Refer to the figure below for the procedure and answer.

### Probability statistics problem: find the variance from the density function

With the given density function can be seen

X~E(2),Y~E(4), so their variance D(X)=1/4

D(Y)=1/16

Because X,Y are independent of each other, so D(X+Y)=D(X)+D(Y)=5/16

< p>Note: (1) The exponential distribution is given here, and the variance can be derived directly from the relationship between the variance of the exponential distribution and the parameters.

(2) If you can’t remember the relationship, or don’t know it’s an exponential distribution, then you can only use D(X)=E(X^2)-E^2(X) to calculate the variance. Calculating expectation is based on the definition of expectation.

### Known probability density, find the variance

1, f(x)=(1/root sign π)*e^(-x^2)

It is the probability density of a random variable obeying the normal distribution n(0,1/2), so d(x)=1/2.

2, according to the three integrals in the following picture, it is not difficult to get three equations about a,b,c, which will be United to form a system of three-dimensional equations, solve it can be (solve it yourself).

### How to find the mathematical expectation and variance of a known probability density function

Substitute the formula. Uniform distribution on [a,b], expectation = (a+b)/2, variance = [(b-a)^2]/2. Substitution is straightforward. If you don’t know the expectation and variance formulas for the uniform distribution, you can only do it step-by-step:

Expectation:

EX=∫{product from -a to a}xf(x)dx

=x^2/4a|{upper a,lower -a}

=0

E(X^2 )=∫{Accumulate from -a to a}(x^2)*f(x)dx

=x^3/6a|{Up-a,Down-a}

=(a^2)/3

Variance:

DX=E(X^2)-(EX)^2=(a^2)/3

Extended information:

Discrete random variables and continuous random variables are both determined by the range of values the random variable takes (takes).

Variables that take values that can only take discrete natural numbers are discrete random variables. For example, a toss of 20 coins, k coins face up, k is a random variable. k can only take the value of the natural numbers 0, 1, 2, …, 20, and can not take the decimal 3.5, irrational numbers, and therefore k is a discrete random variable.

If the variable can take any real number in a certain interval, i.e., the values of the variable can be continuous, this random variable is called a continuous random variable.

For example, if a bus runs every 15 minutes and a person waits for the bus at the platform for x, which is a random variable with values in the range [0,15), it is an interval within which any real number 3.5, irrational number, etc., can be taken, and the random variable is thus said to be a continuous random variable.

Since the value of the random variable X depends only on the integral of the probability density function, the value of the probability density function at individual points does not affect the performance of the random variable.

### Knowing the probability density can you find the variance

Yes, you can also find the eigenfunction from the probability density first, then find the variance, very quickly