The formula for finding the expectation from the probability density function is

Knowing the probability density function,how to find the mathematical expectation EX of this random variable?


Substitute Eq. Uniform fraction on [a,b].


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

=∫{Product from -a to a}x/2adx.

=x^2/4a|{Upper a,Lower -a}.


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

=∫{Product from -a to a}x^2/2adx.

=x^3/6a|{Upper a,Lower -a}


In probability theory and statistics, the mathematical expectation (mean) (or average, also referred to as expectation) is the probability of each possible outcome of an experiment multiplied by the sum of its outcomes, and is one of the most fundamental mathematical features. It reflects the size of the average value taken by the random variable.

It is important to note that the expected value is not necessarily the same as the common-sense “expectation” – the “expected value” may not be equal to every outcome. The expected value is the average of the output values of the variable. The expected value is not necessarily contained in the set of output values of the variable.

The law of large numbers states that as the number of repetitions approaches infinity, the arithmetic mean of the values almost certainly converges to the expected value.

Summarized as follows:

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

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 thus k is a discrete random variable.

What is the formula for expectation?

Mathematical expectation is the probability of each possible outcome in an experiment multiplied by the sum of its results.

Calculation formula:

1. Discrete:

Discrete random variable X takes the values X1, X2, X3 ……Xn, p(X1), p(X2), p(X3)……p(Xn), For X corresponding to the probability of taking the value, can be understood as data X1, X2, X3 ……Xn appeared with high frequency f(Xi), then:

2, continuous type:

Set the probability density function of the continuous random variable X is f(x), if the integral absolute convergence, it is said to be the value of the integral < /p>

for the mathematical expectation of the random variable, denoted as E(X). That is,



Of 10 products, there are 3 first-rate, 4 second-rate, and 3 third-rate products. Take 3 of the 10 products, and find:

(1) the distribution and mathematical expectation of the number x of first-rate products out of the 3 products taken out;

(2) the probability that the number of first-rate products out of the 3 products taken out is more than the number of second-rate products.


Mathematical expectation of x E(x)=0*7/24+1*21/40+2*7/40+3*1/1/120=9/10

How do you find the expectation and distribution functions when the density function is known? Are they both integrals?

Set the density function: f(x)

Mathematical expectation: E(x)=∫(-∞,∞)xf(x)dx

Distribution function: F(x)=∫(-∞,x)f(t)dt

Both are integrals, but they are sums for discrete random variables.

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 real number axis.