Expectation:
EX=∫{ From -a product to a} xf(x) dx
= ∫ {From -a product to a} x/2a dx
= x 2/4a | {Up A, Down a}
=0
E (x 2) = ∫ {from -a product to a} (x 2) * f (x) dx.
= ∫ {From -a product to a} x 2/2adx
= x3/6a | {Up A, Down a}
=(a^2)/3
Difference:
DX=E(X^2)-(EX)^2=(a^2)/3
Extended data:
Both discrete random variables and continuous random variables are determined by the range of random variables.
Variables can only take discrete natural numbers, that is, discrete random variables. For example, if you toss 20 coins at a time, K coins face up, and K is a random variable. The value of k can only be natural number 0, 1, 2, …, 20, but not decimal number 3.5 or irrational number, so k is a discrete random variable.
If a variable can take any real number in a certain interval, that is, the value of the variable can be continuous, then this random variable is called a continuous random variable.
For example, the bus runs every 15 minutes, and the waiting time of people on the platform is a random variable. The value range of X is [0, 15], which is an interval. Theoretically, any real number 3.5, irrational number, etc. Can be taken in this interval, so this random variable is called continuous random variable.
Because the value of the random variable X depends only on the integral of the probability density function, the value of the probability density function of a single point will not affect the performance of the random variable.
More precisely, if a function and the probability density function of X have only finite or countable points with different values, or the measure is 0 (a zero measure set) relative to the whole real number axis, then this function can also be the probability density function of X.
The probability that a continuous random variable takes a value at any point is zero. As a corollary, the probability that a continuous random variable takes a value on an interval has nothing to do with whether the interval is open or closed. Note that the probability P{x=a}=0, but {x=a} is not an impossible event.
Baidu Encyclopedia-Mathematical Expectation