# Probability density function ANOVA formula

### How is the variance formula expressed?

The variance of a discrete random variable:

D(X)=E{[X-E(X)]^2}; (1)

=E(X^2)-(EX)^2; (2)

Equation (1) is a discrete representation of the variance,,if you don’t understand it, memorize equation (2)

Equation (2) states that: variance = expectation of X^2 -the square of the expectation of X.

Both X and X^2 are random variables, for a particular time the random variable is taken,

For example: the random variable X obeys the “0-1”: the probability of taking 0 is q, and the probability of taking 1 is p, p+q=1 then: for the random variable X the expectation E(X)=0*q+1*p=p Similarly for the random Expectation E(X^2)=0^2*q+1^2*p=p

So from the variance formula (2): D(X)=E(X^2)-(EX)^2=p-p^2=p(1-p)=pqWhether it’s for X or X^2, it’s all a one-time random variable, or an experiment, not some unknown function, and you have to go through the topic of what distribution the random variable is obeying, and then only after that. Exactly what distribution is obeyed, and then only can determine what properties that random variable has or what conditions can be derived.

Extended information:

Expectation of a machine variable, discrete case: if X is a discrete random variable with probability mass function p(x), then the expectation of X is defined as E[X]=

. In other words, the expectation of X is a weighted average of the possible values that X could take, each weighted by the probability that X will take that value.

Continuous case: it is also possible to define the expectation of a continuous random variable. If X is a continuous random variable with probability density function f(x), then the expectation of X is defined as E[X]=

=

=β+a/2. In other words, the expectation of a random variable uniformly distributed on (a, β) is exactly the midpoint of the interval.

### Expert help me to see how to do this Excel experiment?

1. In A1, enter the formula = (ROW (A1)-1)*0.25-3

2. In B1, enter the formula = NORMDIST (A1,0,1,0)

3. Scroll down to copy the above two formulas to the A25 and B25

4. A column as the X-axis, B column as the Y-axis to insert the “XY scatterplot”, select the type of scatterplot “with a smooth line of the scatterplot”

Confirm that the calculation of ANOVA steps:

(1) Calculate the rows and columns of squares, respectively. Row squares are similar to the group variance, is the mean of each row and the overall mean of the deviation of the sum of squares, columns of the sum of squares is the mean of each column and the overall mean of the deviation of the sum of squares.

(2) The total sum of squares is calculated similarly to one-way ANOVA as the sum of the squared deviations of each value from the overall mean.

(3) The degrees of freedom of the row’s sum of squares is the number of data in the row minus 1, and in this case the degrees of freedom are 5-1. Divide the row’s sum of squares by its degrees of freedom to get the mean squared deviation; similarly, the degrees of freedom of the column’s sum of squares is obtained by subtracting the column’s number of data by 1, and dividing the column’s sum of squares by its degrees of freedom to get the mean squared deviation of the column.

(4) The original hypothesis for “rows” is that each row from the population has the same mean value. p-value (5.42003964123073E-08) is less than significant, which provides a basis for rejecting the original hypothesis. The rows correspond to different typists. Rejection of the original hypothesis implies that there is an actual difference in the average typing speed of different typists.

(5) The column P-value (slightly less than 0.00343) is less than the significant level, which provides a sufficient basis for rejecting the original hypothesis that there is no difference in the overall mean values measured on different keyboards. By rejecting the original hypothesis, it can be justified (at the 0.01 level of significance) that different keyboards have an effect on the average typing speed.

Then there is the interval estimation of normal overall variance using excel Example. An automatic packaging machine packing laundry detergent, the weight of which obeys a normal distribution, today a random sample of 12 bags, measured weight (unit: grams) are:

1001,1004,1003,997,999,1000,1004,1000,

996,1002,998,999.

How do you estimate the variance of the packaging machine by the packaged laundry detergent has variance?

1, to calculate the variance (i.e., unbiased, point estimate of the square of the standard deviation, the formula n-1) variance 6.931818182n=122, assuming the level of probability to find the confidence interval 0.95 level α = 0.025df = 11 cardinalities = 21.92 α = 0.975df = 11 cardinalities = 3.816 and then calculate the (df * S2n-1) / corresponding to the X2 value of df and α 3.47919.9820.95 confidence 3.479<α2 (2 is squared) 〈19.9820.99 confidence region α=0.00526.757α=0.9952.6032.8529.2930.99 confidence region: 2.85<α2 (2 is squared) 〈29.2933… Conclusion For the experimental sample, the confidence interval for an overall variance of 0.95 is 3.479—–19.982, making such an inference, the probability of being correct is 0.95 and the probability of being incorrect is 0.05. (Or) for the experimental sample, the confidence taking area for an overall variance of 0.99 is 2.85—–29.293, making such an inference, the probability of being correct is 0.99 and the probability of being incorrect is 0.01. EXCEL in the use of hypothesis testing I. Overall parameter testing Excel in the overall parameter testing can be carried out using the relevant function. The following is illustrated with an example. [Example 5-12] A town last year, the average monthly cost of living income per person in the household 275 yuan. According to the sample survey, this year the town’s average monthly cost of living income per person in 50 households is as follows: 367322294273237398327298276246311355240275296324382229264288235271291319360226262286309352337222260284304343217259283303200253281301329212257281303332 Is the average monthly cost-of-living income per person in the town’s households significantly higher this year compared to last year (α = 0.05)? Solution: Set the town’s average monthly cost of living income per person in each household this year, expressed in Y, the overall average, the following assumptions can be set: H0: = 275; H1: & gt; 275. analyze the steps are as follows: 1. input data. In cell A2:A51 store the data of variable Y, variable name “Y” in cell A1. 2. Calculate the t-test statistics. In any empty cell, enter the following formula: = (AVERAGE (Y) – 275) / (STDEV (Y) / SQRT (COUNT (Y))) 3. Calculate the t one-sided critical value. In another empty cell, enter the following formula: = TINV (2 * 0.05,COUNT (Y) – 1) 4. Make a judgment based on the results of the above calculations. Second, non-parametric test in the non-parametric test, Excel is easier to achieve the sign test, not easy to achieve the rank and test and travel test, but also can use Excel for some auxiliary operations to improve efficiency. The following is an example to illustrate the application of Excel in a single sample occasion sign test. Analysis steps are as follows.1. Input data. As shown in Figure 5-3, A2: A21 enter the number of products, A1 enter the column sign “number of products”. 2. Calculate n +. In cell C2 enter the formula “= COUNTIF (A2: A21,” “& gt; 160”) “can be, the function is expressed in statistics A2: A21 cell is greater than 160 in the number of data points. 3. Calculate n-. In cell C3 enter the formula “= COUNTIF (A2: A21,” “& lt; 160”) “. 4. Calculate n. In cell C4 enter the formula “= C2 + C3”. 5. Calculate the critical value of the rejection domain. Binomial distribution critical value of the distribution function available in Excel. In cell C5 enter the formula “= CRITBINOM (C4, 0.5, 1-0.1/2) +1” can be. Where the first parameter stores n; the second parameter is the probability of success in a test, according to the binomial distribution critical value table, fixed at 0.5; the third parameter is the critical value of the probability guarantee, for one-sided test, it is equal to 1-α, for two-sided test, it is equal to 1-α/2. Because CRITBINOM return is to make the cumulative binomial distribution of the probability of greater than or equal to 1-α ( or 1-α/2), the minimum value should be added to the above formula according to the sign test.6. Judgment. According to the above calculated data can be judged. A little messy, seriously look at and then with the online source and auxiliary books do not rush will be resolved, I hope to be able to help you ~ ~ hope to adopt huh?