Home Prosthetics and implantation One-way analysis of variance. Factor and variance analysis in Excel with automated calculations

One-way analysis of variance. Factor and variance analysis in Excel with automated calculations

Exercise . 1st year students were surveyed to identify the activities to which they devote their free time. Check whether the distribution of students' verbal and nonverbal preferences differs.

Solution carried out using a calculator.
Finding group averages:

NP 1P 2
1 12 17
2 18 19
3 23 25
4 10 7
5 15 17
x avg 15.6 17

Let's denote p - the number of levels of the factor (p=2). The number of dimensions at each level is the same and equal to q=5.
The last row contains group means for each factor level.
The overall average can be obtained as the arithmetic mean of the group averages:
(1)
The spread of group averages of the percentage of failure relative to the overall average is influenced by both changes in the level of the factor under consideration and random factors.
In order to take into account the influence of this factor, the total sample variance is divided into two parts, the first of which is called factor S 2 f, and the second is called residual S 2 rest.
In order to take these components into account, we first calculate total amount squared deviations option from the general average:

and the factor sum of squared deviations of group averages from the overall average, which characterizes the influence of this factor:

The last expression is obtained by replacing each option in the expression R with the total group mean for a given factor.
The residual sum of squared deviations is obtained as the difference:
R rest = R total - R f
To determine the total sample variance, it is necessary to divide R total by the number of measurements pq:

and to obtain the unbiased total sample variance, this expression must be multiplied by pq/(pq-1):

Accordingly, for an unbiased factor sample variance:

where p-1 is the number of degrees of freedom of the unbiased factor sample variance.
In order to assess the influence of a factor on changes in the parameter under consideration, the value is calculated:

Since the ratio of two sample variances S 2 f and S 2 rest is distributed according to the Fisher-Snedecor law, the resulting value of f obs is compared with the value of the distribution function

at the critical point f cr corresponding to the selected significance level a.
If f obs >f cr, then the factor has a significant impact and should be taken into account, otherwise it has an insignificant effect that can be neglected.
To calculate Rob and Rf the following formulas can also be used:
(4)
(5)
We find the general average using formula (1):
To calculate Rtot using formula (4), we draw up a table of 2 squares: option:
NP 2 1P 2 2
1 144 289
2 324 361
3 529 625
4 100 49
5 225 289
1322 1613

The overall average is calculated using formula (1):

Rtot = 1322 + 1613 - 5 2 16.3 2 = 278.1
We find R f using formula (5):
R f = 5(15.6 2 + 17 2) - 2 16.3 2 = 4.9
We get R rest: R rest = R total - R f = 278.1 - 4.9 = 273.2
We determine the factor and residual variances:


If the average values random variable, calculated from individual samples are the same, then the estimates of the factor and residual variances are unbiased estimates general variance and differ insignificantly.
Then a comparison of estimates of these variances using the Fisher criterion should show that there is no reason to reject the null hypothesis about the equality of factor and residual variances.
The factor dispersion estimate is less than the residual dispersion estimate, so we can immediately assert the validity of the null hypothesis about the equality of mathematical expectations across the sample layers.
In other words, in this example, the factor Ф does not have a significant effect on the random variable.
Let's check the null hypothesis H 0: equality of mean values ​​of x.
Find f obs.

For the significance level α=0.05, degrees of freedom numbers 1 and 8, we find fcr from the Fisher-Snedecor distribution table.
f cr (0.05; 1; 8) = 5.32
Due to the fact that f observed< f кр, нулевую гипотезу о существенном влиянии фактора на результаты экспериментов отклоняем.
In other words, the distribution of students' verbal and nonverbal preferences differs.

Exercise. The plant has four lines for the production of facing tiles. From each line, 10 tiles were randomly selected during a shift and their thickness (mm) was measured. Deviations from the nominal size are given in the table. It is required to establish at a significance level of a = 0.05 that there is a dependence of the production of high-quality tiles on the production line (factor A).

Exercise. At a significance level of a = 0.05, investigate the effect of paint color on the service life of the coating.

Example No. 1. 13 tests were carried out, of which 4 were at the first factor level, 4 at the second, 3 at the third and 2 at the fourth. Using the analysis of variance method at a significance level of 0.05, test the null hypothesis about the equality of group means. The samples are assumed to be drawn from normal populations with equal variances. The test results are shown in the table.

Solution:
Finding group averages:

NP 1P 2P 3P 4
1 1.38 1.41 1.32 1.31
2 1.38 1.42 1.33 1.33
3 1.42 1.44 1.34 -
4 1.42 1.45 - -
5.6 5.72 3.99 2.64
x avg 1.4 1.43 1.33 1.32

Let's denote p - the number of levels of the factor (p=4). The number of dimensions at each level is: 4,4,3,2
The last row contains group means for each factor level.
The overall average is calculated using the formula:

To calculate Stotal using formula (4), we draw up a table of 2 squares: option:

NP 2 1P 2 2P 2 3P 2 4
1 1.9 1.99 1.74 1.72
2 1.9 2.02 1.77 1.77
3 2.02 2.07 1.8 -
4 2.02 2.1 - -
7.84 8.18 5.31 3.49

The total sum of squared deviations is found using the formula:


We find S f using the formula:


We get S rest: S rest = S total - S f = 0.0293 - 0.0263 = 0.003
We determine the factor dispersion:

and residual variance:

If the average values ​​of a random variable calculated for individual samples are the same, then the estimates of the factor and residual variances are unbiased estimates of the general variance and do not differ significantly.
Then a comparison of estimates of these variances using the Fisher criterion should show that there is no reason to reject the null hypothesis about the equality of factor and residual variances.
The estimate of the factor dispersion is greater than the estimate of the residual dispersion, so we can immediately assert that the null hypothesis about the equality of mathematical expectations across the sample layers is not true.
In other words, in this example, the factor Ф has a significant influence on the random variable.
Let's check the null hypothesis H 0: equality of mean values ​​of x.
Find f obs.

For the significance level α=0.05, degrees of freedom numbers 3 and 12, we find fcr from the Fisher-Snedecor distribution table.
f cr (0.05; 3; 12) = 3.49
Due to the fact that f observed > f cr, we accept the null hypothesis about the significant influence of the factor on the results of the experiments (we reject the null hypothesis about the equality of group means). In other words, the group means as a whole differ significantly.

Example No. 2. The school has 5 sixth grades. The psychologist is tasked with determining whether the average level of situational anxiety is the same in the classes. For this purpose they were given in the table. Check the significance level α=0.05, the assumption that the average situational anxiety in classes does not differ.

Example No. 3. To study the value of X, 4 tests were carried out at each of the five levels of factor F. The test results are shown in the table. Find out whether the influence of factor F on the value of X is significant. Take α = 0.05. The samples are assumed to be drawn from normal populations with equal variances.

Example No. 4. Let us assume that three groups of 10 students each participated in the pedagogical experiment. Applied in groups various methods training: in the first - traditional (F 1), in the second - based on computer technology (F 2), in the third - a method that widely uses tasks for independent work(F 3). Knowledge was assessed using a ten-point system.
It is required to process the obtained exam data and make a conclusion about whether the influence of the teaching method is significant, taking α = 0.05 as the significance level.
The exam results are given in the table, F j is the level of factor x ij - the assessment of the i-th student using the F j method.

Factor level

Example No. 5. The results of competitive variety testing of crops are shown (yield in centimeters per hectare). Each variety was tested in four plots. Using analysis of variance, study the effect of variety on yield. Establish the significance of the influence of the factor (the share of intergroup variation in the total variation) and the significance of the experimental results at a significance level of 0.05.
Productivity in variety testing plots

Variety Productivity by replicates c. from ha
1 2 3 4
1
2
3
42,4
52,5
52,3
37,4
50,1
53,0
40,7
53,8
51,4
38,2
50,7
53,6

The use of statistics in this note will be illustrated with a cross-cutting example. Let's say you are the production manager at Perfect Parachute. The parachutes are made from synthetic fibers supplied by four different suppliers. One of the main characteristics of a parachute is its strength. You need to ensure that all fibers supplied are of the same strength. To answer this question, an experimental design should be designed to measure the strength of parachutes woven from synthetic fibers. different suppliers. The information obtained from this experiment will determine which supplier provides the most durable parachutes.

Many applications involve experiments that consider multiple groups or levels of a single factor. Some factors, such as ceramic firing temperature, may have multiple numerical levels (i.e. 300°, 350°, 400° and 450°). Other factors, such as the location of items in a supermarket, may have categorical levels (eg, first supplier, second supplier, third supplier, fourth supplier). Single-factor experiments in which experimental units are randomly assigned to groups or factor levels are called completely randomized.

UsageF-criteria for assessing differences between several mathematical expectations

If the numerical measurements of a factor in groups are continuous and some additional conditions, to compare the mathematical expectations of several groups, it is used analysis of variance(ANOVA - An alysis o f Va riance). Analysis of variance using completely randomized designs is called a one-way ANOVA procedure. In some ways, the term analysis of variance is a misnomer because it compares differences between the expected values ​​of groups rather than between variances. However, the comparison of mathematical expectations is carried out precisely on the basis of an analysis of data variation. In the ANOVA procedure, the total variation in the measurement results is divided into between-groups and within-groups (Fig. 1). Within-group variation is explained by experimental error, and between-group variation is explained by the effects of experimental conditions. Symbol With denotes the number of groups.

Rice. 1. Partitioning Variation in a Completely Randomized Experiment

Download the note in or format, examples in format

Let's pretend that With groups are extracted from independent populations that have a normal distribution and equal variance. The null hypothesis is that mathematical expectations populations are the same: H 0: μ 1 = μ 2 = ... = μ s. The alternative hypothesis states that not all mathematical expectations are the same: H 1: not all μ j are the same j= 1, 2, …, s).

In Fig. Figure 2 presents the true null hypothesis about the mathematical expectations of the five compared groups, provided that the populations have a normal distribution and the same variance. Five general populations associated with at different levels factors are identical. Consequently, they are superimposed on one another, having the same mathematical expectation, variation and shape.

Rice. 2. Five general populations have the same mathematical expectation: μ 1 = μ 2 = μ 3 = μ 4 = μ 5

On the other hand, suppose that in fact the null hypothesis is false, with the fourth level having the highest expected value, the first level having a slightly lower expected value, and the remaining levels having the same and even lower expected values ​​(Figure 3). Note that, with the exception of the expected values, all five populations are identical (that is, they have the same variability and shape).

Rice. 3. The effect of the experimental conditions is observed: μ 4 > μ 1 > μ 2 = μ 3 = μ 5

When testing the hypothesis about the equality of mathematical expectations of several general populations, the total variation is divided into two parts: intergroup variation, due to differences between groups, and intragroup variation, due to differences between elements belonging to the same group. The total variation is expressed by the total sum of squares (SST – sum of squares total). Since the null hypothesis is that the mathematical expectations of all With groups are equal to each other, the total variation is equal to the sum of squared differences between individual observations and the overall average (average of averages), calculated for all samples. Full variation:

Where - general average, X ij - i-e observation in j-group or level, n j- number of observations in j th group, n - total observations in all groups (i.e. n = n 1 + n 2 + … + n c), With- number of groups or levels studied.

Between-group variation, usually called the between-group sum of squares (SSA - sum of squares among groups), is equal to the sum of squares of the differences between the sample mean of each group j and overall average , multiplied by the volume of the corresponding group n j:

Where With- number of groups or levels studied, n j- number of observations in j th group, j- average value j th group, - overall average.

Within-group variation, usually called the within-group sum of squares (SSW - sum of squares withing groups), is equal to the sum of squares of the differences between the elements of each group and the sample mean of this group j:

Where Xij - i th element j th group, j- average value j th group.

Since they are compared With factor levels, the intergroup sum of squares has s – 1 degrees of freedom. Each of With levels has n j – 1 degrees of freedom, so the intragroup sum of squares has n- With degrees of freedom, and

In addition, the total sum of squares has n – 1 degrees of freedom, since each observation Xij is compared with the overall average calculated over all n observations. If each of these sums is divided by the corresponding number of degrees of freedom, three types of dispersion arise: intergroup(mean square among - MSA), intragroup(mean square within - MSW) and full(mean square total - MST):

Despite the fact that the main purpose of analysis of variance is to compare mathematical expectations With groups to reveal the effect of experimental conditions, its name is due to the fact that the main tool is analysis of variances different types. If the null hypothesis is true, and between the mathematical expectations With groups there are no significant differences, all three variances - MSA, MSW and MST - are variance estimates σ 2 inherent in the analyzed data. Thus, to test the null hypothesis H 0: μ 1 = μ 2 = ... = μ s and alternative hypothesis H 1: not all μ j are the same j = 1, 2, …, With), it is necessary to calculate statistics F-criterion, which is the ratio of two variances, MSA and MSW. Test F-statistics in one-way analysis of variance

Statistics F-subject to criteria F-distribution with s – 1 degrees of freedom in the numerator M.S.A. And n – s degrees of freedom in the denominator M.S.W.. For a given significance level α, the null hypothesis is rejected if the calculated F FU, inherent F-distribution with s – 1 n – s degrees of freedom in the denominator. Thus, as shown in Fig. 4, decisive rule formulated as follows: null hypothesis H 0 rejected if F>FU; otherwise it is not rejected.

Rice. 4. Critical area of ​​analysis of variance when testing a hypothesis H 0

If the null hypothesis H 0 is true, calculated F-statistics is close to 1, since its numerator and denominator are estimates of the same quantity - the dispersion σ 2 inherent in the analyzed data. If the null hypothesis H 0 is false (and there is a significant difference between the mathematical expectations of different groups), calculated F-statistic will be much larger than one because its numerator, MSA, estimates, in addition to the natural variability of the data, the effect of the experimental conditions or the difference between groups, while the denominator MSW estimates only the natural variability of the data. Thus, the ANOVA procedure is F-criterion in which, at a given significance level α, the null hypothesis is rejected if the calculated F-statistics are greater than the upper critical value FU, inherent F-distribution with s – 1 degrees of freedom in the numerator and n – s degrees of freedom in the denominator, as shown in Fig. 4.

To illustrate one-way analysis of variance, let's return to the scenario outlined at the beginning of the note. The purpose of the experiment is to determine whether parachutes woven from synthetic fibers obtained from different suppliers have the same strength. Each group has five parachutes. Groups are divided by to suppliers - Supplier 1, Supplier 2, Supplier 3 and Supplier 4. The strength of parachutes is measured using a special device that tests the fabric to tear on both sides. The force required to break a parachute is measured on a special scale. The higher the breaking force, the stronger the parachute. Excel allows you to analyze F-statistics in one click. Go through the menu DataData analysis, and select the line One-way ANOVA, fill out the window that opens (Fig. 5). The experimental results (breaking strength), some descriptive statistics and the results of one-way analysis of variance are presented in Fig. 6.

Rice. 5. Window One-Way Analysis of Variance Analysis Package Excel

Rice. 6. Strength indicators of parachutes woven from synthetic fibers obtained from different suppliers, descriptive statistics and results of one-way analysis of variance

Analysis of Figure 6 shows that there is some difference between the sample means. The average strength of fibers obtained from the first supplier is 19.52, from the second - 24.26, from the third - 22.84 and from the fourth - 21.16. Is this difference statistically significant? The distribution of rupture force is demonstrated in the scatter plot (Fig. 7). It clearly shows differences both between and within groups. If each group were larger in size, a stem-and-leaf diagram, box plot, or bell plot could be used to analyze them.

Rice. 7. Diagram of strength dispersion for parachutes woven from synthetic fibers obtained from four suppliers.

The null hypothesis states that there are no significant differences between the average strength scores: H 0: μ 1 = μ 2 = μ 3 = μ 4. An alternative hypothesis is that there is at least one supplier whose average fiber strength differs from the others: H 1: not all μ j are the same ( j = 1, 2, …, With).

Overall average (see Fig. 6) = AVERAGE(D12:D15) = 21.945; to determine, you can also average all 20 original numbers: = AVERAGE(A3:D7). Variance values ​​are calculated Analysis package and are reflected in the plate Analysis of variance(see Fig. 6): SSA = 63.286, SSW = 97.504, SST = 160.790 (see column SS tables Analysis of variance Figure 6). The averages are calculated by dividing these sums of squares by the appropriate number of degrees of freedom. Because the With= 4, a n= 20, we obtain the following values ​​of degrees of freedom; for SSA: s – 1= 3; for SSW: n–c= 16; for SST: n – 1= 19 (see column df). Thus: MSA = SSA / ( s – 1)= 21.095; MSW = SSW / ( n–c) = 6.094; MST = SST / ( n – 1) = 8.463 (see column MS). F-statistics = MSA / MSW = 3.462 (see column F).

Upper critical value FU, characteristic of F-distribution, determined by the formula =F.OBR(0.95;3;16) = 3.239. Parameters of the function =F.OBR(): α = 0.05, the numerator has three degrees of freedom, and the denominator has 16. Thus, the calculated F-statistic equal to 3.462 exceeds the upper critical value FU= 3.239, the null hypothesis is rejected (Fig. 8).

Rice. 8. Critical region of analysis of variance at a significance level of 0.05 if the numerator has three degrees of freedom and the denominator is -16

R-value, i.e. the probability that if the null hypothesis is true F-statistics not less than 3.46, equal to 0.041 or 4.1% (see column p-value tables Analysis of variance Figure 6). Since this value does not exceed the significance level α = 5%, the null hypothesis is rejected. Moreover, R-value indicates that the probability of detecting such or a greater difference between the mathematical expectations of the general populations, provided that in fact they are the same, is equal to 4.1%.

So. There is a difference between the four sample means. The null hypothesis was that all mathematical expectations of the four populations are equal. Under these conditions, a measure of the total variability (i.e. total SST variation) of the strength of all parachutes is calculated by summing the squared differences between each observation X ij and overall average . The total variation was then separated into two components (see Fig. 1). The first component was the between-group variation in SSA and the second was the within-group variation in SSW.

What explains the variability in the data? In other words, why are all observations not the same? One reason is that different companies supply fibers of different strengths. This partly explains why the groups have different mathematical expectations: the stronger the effect of the experimental conditions, the greater the difference between the mathematical expectations of the groups. Another reason for data variability is the natural variability of any process, in in this case- production of parachutes. Even if all fibers were purchased from the same supplier, their strength would not be the same, all other things being equal. Because this effect occurs within each group, it is called within-group variation.

Differences between sample means are called intergroup variation SSA. Part of the within-group variation, as already indicated, is explained by the affiliation of the data different groups. However, even if the groups were exactly the same (i.e., the null hypothesis was true), between-group variation would still exist. The reason for this is the natural variability of the parachute manufacturing process. Because the samples are different, their sample means differ from each other. Therefore, if the null hypothesis is true, both between- and within-group variability represent an estimate of population variability. If the null hypothesis is false, the between-groups hypothesis will be greater. It is this fact that underlies F-criteria for comparing differences between the mathematical expectations of several groups.

After performing a one-way ANOVA and finding a significant difference between firms, it remains unknown which supplier is significantly different from the others. We only know that the mathematical expectations of the general populations are not equal. In other words, at least one of the mathematical expectations is significantly different from the others. To determine which supplier is different from the others, you can use Tukey procedure, using pairwise comparisons between suppliers. This procedure was developed by John Tukey. Subsequently, he and K. Kramer independently modified this procedure for situations in which sample sizes differ from each other.

Multiple comparison: Tukey-Kramer procedure

In our scenario, one-way analysis of variance was used to compare the strength of parachutes. Having found significant differences between the mathematical expectations of the four groups, it is necessary to determine which groups differ from each other. Although there are several ways to solve this problem, we will only describe the Tukey-Kramer multiple comparison procedure. This method is an example of post hoc comparison procedures because the hypothesis being tested is formulated after data analysis. The Tukey-Kramer procedure allows all pairs of groups to be compared simultaneously. At the first stage, the differences are calculated Xj -Xj, Where j ≠j, between mathematical expectations s(s – 1)/2 groups. Critical scope Tukey-Kramer procedure is calculated by the formula:

Where Q U- the upper critical value of the studentized range distribution, which has With degrees of freedom in the numerator and n - With degrees of freedom in the denominator.

If the sample sizes are not the same, the critical range is calculated for each pair of mathematical expectations separately. At the last stage, each of s(s – 1)/2 pairs of mathematical expectations are compared with the corresponding critical range. Elements of a pair are considered significantly different if the difference modulus | X j -Xj| between them exceeds the critical range.

Let us apply the Tukey-Kramer procedure to the problem of the strength of parachutes. Since the parachute company has four suppliers, there are 4(4 – 1)/2 = 6 pairs of suppliers to check (Figure 9).

Rice. 9. Pairwise comparisons of sample means

Since all groups have the same volume (i.e. all n j = n j), it is enough to calculate only one critical range. To do this, according to the table ANOVA(Fig. 6) we determine the value MSW = 6.094. Then we find the value Q U at α = 0.05, With= 4 (number of degrees of freedom in the numerator) and n- With= 20 – 4 = 16 (the number of degrees of freedom in the denominator). Unfortunately, I did not find the corresponding function in Excel, so I used the table (Fig. 10).

Rice. 10. Critical value of the studentized range Q U

We get:

Since only 4.74 > 4.47 (see bottom table of Fig. 9), a statistically significant difference exists between the first and second supplier. All other pairs have sample means that do not allow us to talk about their differences. Consequently, the average strength of parachutes woven from fibers purchased from the first supplier is significantly less than that of the second.

Necessary conditions for one-way analysis of variance

When solving the problem of the strength of parachutes, we did not check whether the conditions under which it is possible to use a one-factor F-criterion. How do you know if you can use one-factor F-criterion when analyzing specific experimental data? Single factor F-criterion can be applied only if three basic assumptions are met: the experimental data must be random and independent, have a normal distribution, and their variances must be equal.

First guess - randomness and data independence- must always be performed, since the correctness of any experiment depends on the randomness of the choice and/or the randomization process. To avoid biasing the results, it is necessary that data be extracted from With general populations randomly and independently of each other. Similarly, the data should be randomly distributed across With levels of the factor we are interested in (experimental groups). Violation of these conditions can seriously distort the results of the analysis of variance.

Second guess - normality- means that the data is extracted from normally distributed populations. As for t-criteria, one-way analysis of variance based on F-criteria is relatively little sensitive to violation of this condition. If the distribution does not deviate too significantly from normal, the significance level F-criterion changes little, especially if the sample size is large enough. If the condition of normality of distribution is seriously violated, it should be applied.

Third guess - homogeneity of variance- means that the variances of each population are equal to each other (i.e. σ 1 2 = σ 2 2 = ... = σ j 2). This assumption allows one to decide whether to separate or pool within-group variances. If the group sizes are the same, the condition of homogeneity of variance has little effect on the conclusions obtained using F-criteria. However, if the sample sizes are unequal, violation of the equality of variances condition can seriously distort the results of the analysis of variance. Therefore, efforts should be made to ensure that sample sizes are equal. One of the methods for checking the assumption of homogeneity of variance is the criterion Levene described below.

If, of all three conditions, only the condition of homogeneity of variance is violated, a procedure similar to t-criterion using separate variance (for more details, see). However, if assumptions about normal distribution and the homogeneity of variance is violated at the same time, it is necessary to normalize the data and reduce the differences between the variances or apply a nonparametric procedure.

Levene's test for testing homogeneity of variance

Although F-the criterion is relatively resistant to violations of the condition of equality of variances in groups; a gross violation of this assumption significantly affects the level of significance and power of the criterion. Perhaps one of the most powerful is the criterion Levene. To check equality of variances With general populations, we will test the following hypotheses:

Н 0: σ 1 2 = σ 2 2 = … = σj 2

H 1: Not all σ j 2 are the same ( j = 1, 2, …, With)

The modified Levene's test is based on the proposition that if variability is equal across groups, analysis of variance can be used to test the null hypothesis of equality of variances absolute values differences between observations and group medians. So, you should first calculate the absolute values ​​of the differences between observations and medians in each group, and then perform a one-way analysis of variance on the resulting absolute values ​​of the differences. To illustrate Levene's criterion, let's return to the scenario outlined at the beginning of the note. Using the data presented in Fig. 6, we will conduct a similar analysis, but in relation to the modules of differences in the initial data and medians for each sample separately (Fig. 11).

Analysis of variance

1. Concept of analysis of variance

Analysis of variance is an analysis of the variability of a trait under the influence of any controlled variable factors. In foreign literature, analysis of variance is often referred to as ANOVA, which is translated as analysis of variability (Analysis of Variance).

ANOVA problem consists in isolating variability of a different kind from the general variability of a trait:

a) variability due to the action of each of the independent variables under study;

b) variability due to the interaction of the independent variables being studied;

c) random variability due to all other unknown variables.

Variability due to the action of the variables under study and their interaction is correlated with random variability. An indicator of this relationship is Fisher's F test.

The formula for calculating the F criterion includes estimates of variances, that is, the distribution parameters of the attribute, therefore the F criterion is a parametric criterion.

The more the variability of a trait is due to the variables (factors) under study or their interaction, the higher empirical criterion values.

Zero the hypothesis in the analysis of variance will state that the average values ​​of the studied effective characteristic are the same in all gradations.

Alternative the hypothesis will state that the average values ​​of the resulting characteristic in different gradations of the factor under study are different.

Analysis of variance allows us to state a change in a characteristic, but does not indicate direction these changes.

Let's begin our consideration of variance analysis with the simplest case, when we study the action of only one variable (one factor).

2. One-way analysis of variance for unrelated samples

2.1. Purpose of the method

The method of one-factor analysis of variance is used in cases where changes in an effective characteristic are studied under the influence of changing conditions or gradations of a factor. In this version of the method, the influence of each of the gradations of the factor is different samples of subjects. There must be at least three gradations of the factor. (There may be two gradations, but in this case we will not be able to establish nonlinear dependencies and it seems more reasonable to use simpler ones).

A nonparametric version of this type of analysis is the Kruskal-Wallis H test.

Hypotheses

H 0: Differences between factor grades (different conditions) are no greater than random differences within each group.

H 1: Differences between factor grades (different conditions) are greater than random differences within each group.

2.2. Limitations of One-Way Analysis of Variance for Unrelated Samples

1. One-way analysis of variance requires at least three gradations of the factor and at least two subjects in each gradation.

2. The resulting characteristic must be normally distributed in the sample under study.

True, it is usually not indicated whether we are talking about the distribution of the characteristic in the entire surveyed sample or in that part of it that makes up the dispersion complex.

3. An example of solving a problem using the method of one-way analysis of variance for unrelated samples using the example:

Three different groups of six subjects were given lists of ten words. The words were presented to the first group at a low speed - 1 word per 5 seconds, to the second group at an average speed - 1 word per 2 seconds, and to the third group at a high speed - 1 word per second. Reproduction performance was predicted to depend on the speed of word presentation. The results are presented in Table. 1.

Number of words reproduced Table 1

Subject No.

low speed

average speed

high speed

total amount

H 0: Differences in word production span between groups are no more pronounced than random differences inside each group.

H1: Differences in word production volume between groups are more pronounced than random differences inside each group. Using the experimental values ​​presented in Table. 1, we will establish some values ​​that will be necessary to calculate the F criterion.

The calculation of the main quantities for one-way analysis of variance is presented in the table:

table 2

Table 3

Sequence of operations in one-way analysis of variance for unrelated samples

Often found in this and subsequent tables, the designation SS is an abbreviation for “sum of squares.” This abbreviation is most often used in translated sources.

SS fact means the variability of the characteristic due to the action of the factor under study;

SS generally- general variability of the trait;

S C.A.-variability due to unaccounted factors, “random” or “residual” variability.

MS- “mean square”, or the mathematical expectation of the sum of squares, the average value of the corresponding SS.

df - the number of degrees of freedom, which, when considering nonparametric criteria, we denoted by a Greek letter v.

Conclusion: H 0 is rejected. H 1 is accepted. Differences in word recall between groups were greater than random differences within each group (α=0.05). So, the speed of presentation of words affects the volume of their reproduction.

An example of solving the problem in Excel is presented below:

Initial data:

Using the command: Tools->Data Analysis->One-way ANOVA, we get the following results:

One-factor variance model looks like

Where Xjj- the value of the variable under study obtained on g-level factor (r = 1, 2,..., T) soooo serial number (j- 1,2,..., P);/y - effect due to the influence of the i-th level of the factor; e^. - random component, or disturbance caused by the influence of uncontrollable factors, i.e. variation of a variable within an individual level.

Under factor level refers to some measure or condition of it, for example, the amount of fertilizer applied, the type of metal melting or the batch number of parts, etc.

Basic premises of analysis of variance.

1. Mathematical expectation of disturbance ? (/ - is equal to zero for any i, those.

  • 2. The disturbances are mutually independent.
  • 3. The dispersion of the disturbance (or variable Xy) is constant for any ij> those.

4. The disturbance e# (or the variable Xy) has a normal distribution law N( 0; a 2).

The influence of factor levels can be like fixed, or systematic(model I), and random(model II).

Suppose, for example, it is necessary to find out whether there are significant differences between batches of products in terms of some quality indicator, i.e. check the influence on the quality of one factor - a batch of products. If we include all batches of raw materials in the study, then the influence of the level of such a factor is systematic (model I), and the conclusions obtained are applicable only to those individual batches that were involved in the study; if we include only a randomly selected part of the parties, then the influence of the factor is random (model II). In multifactor complexes, a mixed model III is possible, in which some factors have random levels, while others have fixed levels.

Let's consider this task in more detail. Let there be T batches of products. Selected from each batch accordingly p L, p 2 ,p t products (for simplicity we assume that u = n 2 =... = p t = p). We present the values ​​of the quality indicator of these products in the form of an observation matrix


It is necessary to check the significance of the influence of product batches on their quality.

If we assume that the elements of the rows of the observation matrix are numerical values ​​(realizations) of random variables X t , X 2 ,..., X t, expressing the quality of products and having a normal distribution law with mathematical expectations, respectively a v a 2, ..., a t and identical variances a 2, then this task comes down to testing null hypothesis #0: a v = a 2l = ... = A t, carried out in analysis of variance.

Let us denote averaging over some index with an asterisk (or dot) instead of an index, then average quality of products of the ith batch, or group average for the ith level of the factor, takes the form

A overall average -

Let us consider the sum of squared deviations of observations from the overall average x„:

or Q= Q, + Q 2+ ?>з Last term

since the sum of deviations of the values ​​of a variable from its average, i.e. ? 1.g y - x) is equal to zero. ) =x

The first term can be written in the form

As a result, we obtain the following identity:

etc. _

Where Q = Y, X [ x ij _ x„, I 2 - general, or full, sum of squared deviations; 7=1

Q, -n^)

New on the site

>

Most popular