For this problem itself, mathematics expects EX = (2+4)/2 = 3; Variance DX=(4-2)? / 12= 1/3
Extended data
evenly distribution
In probability theory and statistics, uniform distribution is also called rectangular distribution, which is a symmetrical probability distribution, and the distribution probability on the interval of the same length is equally possible. A uniform distribution is defined by two parameters, a and b, which are the minimum and maximum values on the number axis, usually abbreviated as U(a, b).
Expected value of mathematics
In probability theory and mathematical statistics, mathematical expectation (or simply mean, or expectation) is the sum of the possible results multiplied by the results in each experiment, which is one of the most basic mathematical characteristics. It reflects the average value of random variables.
discrepancy
Variance is a measure of dispersion when probability theory and statistical variance measure random variables or a set of data. Variance in probability theory is used to measure the deviation between random variables and their mathematical expectations (that is, the mean value). The variance (sample variance) in statistics is the average value of the square of the difference between each sample value and the average value of all sample values. In many practical problems, it is of great significance to study variance or deviation.
References:
Baidu Encyclopedia-Uniform Distribution