What is a confidence interval in statistics. Confidence interval

Confidence intervals.

The calculation of the confidence interval is based on the mean error of the corresponding parameter. Confidence interval shows the limits with probability (1-a) the true value of the estimated parameter is. Here a is the level of significance, (1-a) is also called the confidence level.

In the first chapter, we showed that, for example, for the arithmetic mean, the true population mean in about 95% of cases lies within 2 mean errors of the mean. Thus, the boundaries of the 95% confidence interval for the mean will be doubled from the sample mean. average error average, i.e. we multiply the mean error of the mean by some factor depending on the confidence level. For the mean and the difference between the means, the Student's coefficient is taken (the critical value of the Student's test), for the share and the difference of the shares, the critical value of the criterion z. The product of the coefficient by the mean error can be called the marginal error this parameter, i.e. the maximum that we can get when evaluating it.

Confidence interval for arithmetic mean : .

Here is the sample mean;

Average error of the arithmetic mean;

s - sample standard deviation;

n

f = n-1 (Student's coefficient).

Confidence interval for difference of arithmetic means :

Here is the difference of the sample means;

- the average error of the difference of the arithmetic means;

s 1, s 2 - sample means square deviations;

n 1, n 2

Critical value of the Student's criterion for a given significance level a and the number of degrees of freedom f = n 1 + n 2-2 (Student's coefficient).

Confidence interval for share :

.

Here d is the sample rate;

- average share error;

n- sample size (size of the group);

Confidence interval for difference of shares :

Here is the difference of the sample shares;

- the average error of the difference of the arithmetic means;

n 1, n 2- volumes of samples (number of groups);

The critical value of the criterion z at a given level of significance a (,,).

Calculating the confidence intervals for the difference in indicators, we, firstly, directly see the possible values ​​of the effect, and not just its point estimate. Secondly, we can draw a conclusion about the acceptance or refutation of the null hypothesis and, thirdly, we can draw a conclusion about the power of the criterion.

When testing hypotheses using confidence intervals, the following rule must be followed:

If the 100 (1-a) -percent confidence interval of the difference of means does not contain zero, then the differences are statistically significant at the significance level a; on the contrary, if this interval contains zero, then the differences are not statistically significant.

Indeed, if this interval contains zero, then, it means that the compared indicator can be either more or less in one of the groups, in comparison with the other, i.e. the observed differences are accidental.

By the place where zero is within the confidence interval, one can judge the power of the criterion. If zero is close to the lower or upper border of the interval, then perhaps with a larger number of compared groups, the differences would reach statistical significance... If zero is close to the middle of the interval, then, it means that the increase and decrease in the indicator in the experimental group are equally probable, and, probably, there are really no differences.

Examples:

To compare the operational lethality with the use of two different types of anesthesia: 61 people were operated on with the use of the first type of anesthesia, 8 died, with the use of the second - 67 people, 10 died.

d 1 = 8/61 = 0.131; d 2 = 10/67 = 0.149; d1-d2 = - 0.018.

The difference in lethality of the compared methods will be in the interval (-0.018 - 0.122; -0.018 + 0.122) or (-0.14; 0.104) with a probability of 100 (1-a) = 95%. The interval contains zero, i.e. the hypothesis of the same mortality in two different types anesthesia cannot be denied.

Thus, mortality can and will decrease to 14% and increase to 10.4% with a probability of 95%, i.e. zero is located approximately in the middle of the interval, so it can be argued that, most likely, these two methods do not really differ in lethality.

The example considered earlier compared the average tap time during the tapping test in four groups students differing in exam grade. Let us calculate the confidence intervals for the average pressing time for students who passed the exam at 2 and 5 and the confidence interval for the difference between these averages.

We find the Student's coefficients according to the Student's distribution tables (see Appendix): for the first group: = t (0.05; 48) = 2.011; for the second group: = t (0.05; 61) = 2.000. Thus, the confidence intervals for the first group: = (162.19-2.011 * 2.18; 162.19 + 2.011 * 2.18) = (157.8; 166.6), for the second group (156.55- 2.000 * 1.88; 156.55 + 2.000 * 1.88) = (152.8; 160.3). So, for those who passed the exam for 2, the average pressing time lies in the range from 157.8 ms to 166.6 ms with a probability of 95%, for those who passed the exam for 5 - from 152.8 ms to 160.3 ms with a probability of 95%.

You can also test the null hypothesis using confidence intervals for means, and not just for the difference in means. For example, as in our case, if the confidence intervals for the means overlap, then the null hypothesis cannot be rejected. In order to reject a hypothesis at the chosen level of significance, the corresponding confidence intervals should not overlap.

Let's find the confidence interval for the difference in the average pressing time in the groups who passed the exam by 2 and 5. The difference in the mean: 162.19 - 156.55 = 5.64. Student's coefficient: = t (0.05; 49 + 62-2) = t (0.05; 109) = 1.982. Group standard deviations will be equal to:; ... We calculate the average error of the difference between the means:. Confidence interval: = (5.64-1.982 * 2.87; 5.64 + 1.982 * 2.87) = (-0.044; 11.33).

So, the difference in the average pressing time in the groups that passed the exam at 2 and 5 will be in the range from -0.044 ms to 11.33 ms. This interval includes zero, i.e. the average pressing time for those who passed the exam perfectly may increase and decrease in comparison with those who did not pass the test satisfactorily, i.e. the null hypothesis cannot be rejected. But zero is very close to the lower border, the pressing time is much more likely to decrease in the case of those who successfully passed it. Thus, we can conclude that there are still differences in the average pressing time between those who passed on 2 and 5, we just could not find them with a given change in the average time, the spread of the average time and sample volumes.



The power of a test is the probability of rejecting an incorrect null hypothesis, i.e. find differences where they really are.

The power of the test is determined based on the level of significance, the magnitude of the differences between the groups, the spread of values ​​in the groups and the size of the samples.

For Student's test and analysis of variance, you can use sensitivity diagrams.

The power of the criterion can be used in the preliminary determination of the required number of groups.

The confidence interval shows the limits with given probability the true value of the parameter being evaluated is found.

Confidence intervals can be used to test statistical hypotheses and draw conclusions about the sensitivity of the criteria.

LITERATURE.

Glantz S. - Chapter 6.7.

Rebrova O.Yu. - p. 112-114, p. 171-173, p. 234-238.

Sidorenko E.V. - p. 32-33.

Questions for self-examination of students.

1. What is the cardinality of a test?

2. In what cases is it necessary to assess the power of the criteria?

3. Methods for calculating power.

6. How to test a statistical hypothesis using a confidence interval?

7. What can you say about the power of the test when calculating the confidence interval?

Tasks.

Any sample gives only an approximate idea of the general population, and all sample statistical characteristics (mean, mode, variance ...) are some approximation or say the estimate of general parameters, which in most cases cannot be calculated due to the unavailability of the general population (Figure 20).

Figure 20. Sampling error

But you can specify the interval in which the true (general) value of the statistical characteristic lies with a certain degree of probability. This interval is called d Confidence interval (CI).

So the general average with a probability of 95% lies within

from to, (20)

where t table value Student criterion for α = 0.05 and f= n-1

99% CI can be found, in this case t selected for α =0,01.

What is the practical significance of the confidence interval?

    A wide confidence interval indicates that the sample mean does not accurately reflect the general mean. This is usually due to an insufficient sample size, or to its heterogeneity, i.e. high variance. Both give a large error of the mean and, accordingly, a wider CI. And this is the basis for returning to the planning stage of the study.

    CI upper and lower limits assess whether results will be clinically significant

Let us dwell in somewhat more detail on the question of the statistical and clinical significance of the results of the study of group properties. Recall that the task of statistics is to detect at least any differences in populations, based on sample data. It is the clinician's job to identify any (not all) differences that will aid diagnosis or treatment. And not always statistical conclusions are the basis for clinical conclusions. Thus, a statistically significant decrease in hemoglobin by 3 g / l is not a cause for concern. And, conversely, if some problem in the human body does not have a massive character at the level of the entire population, this is not a reason not to deal with this problem.

We will consider this provision at example.

The researchers wondered if boys who had some infectious disease were lagging behind their peers. For this purpose, a sample study was carried out, in which 10 boys who had undergone this disease took part. The results are shown in Table 23.

Table 23. Statistical processing results

lower limit

upper limit

Standards (cm)

middle

It follows from these calculations that the selective average height of 10-year-old boys who have undergone a certain infectious disease is close to the norm (132.5 cm). However, the lower limit of the confidence interval (126.6 cm) indicates that there is a 95% probability that the true average height of these children corresponds to the concept of "short height", i.e. these children are stunted.

In this example, the results of the CI calculations are clinically significant.

And others. All of them are estimates of their theoretical analogs, which could have been obtained if not a sample, but the general population were available. But alas, the general population is very expensive and often inaccessible.

Understanding interval grading

Any sample estimate has some scatter, since is a random variable depending on the values ​​in a particular sample. Therefore, for more reliable statistical conclusions, one should know not only the point estimate, but also the interval, which with a high probability γ (gamma) covers the estimated indicator θ (theta).

Formally, these are two such values ​​(statistics) T 1 (X) and T 2 (X), what T 1< T 2 for which at a given level of probability γ the condition is met:

In short, with the probability γ or more, the true figure is between the points T 1 (X) and T 2 (X) which are called the lower and upper bounds confidence interval.

One of the conditions for constructing confidence intervals is its maximum narrowness, i.e. it should be as short as possible. Desire is quite natural, because the researcher tries to more accurately localize the finding of the desired parameter.

It follows that the confidence interval should cover the maximum distribution probabilities. and the assessment itself is in the center.

That is, the probability of deviation (of the true indicator from the assessment) upward is equal to the probability of deviation downward. It should also be noted that for asymmetric distributions, the interval on the right is not is equal to the interval left.

The figure above clearly shows that the greater the confidence level, the wider the interval - a direct relationship.

This was a small introduction to the theory of interval estimation of unknown parameters. Let's move on to finding the confidence limits for mathematical expectation.

Confidence interval for expected value

If the original data are distributed over, then the average will be a normal value. This follows from the rule that a linear combination of normal quantities also has normal distribution... Therefore, to calculate the probabilities, we could use the mathematical apparatus of the normal distribution law.

However, this requires knowing two parameters - expectation and variance, which are usually not known. You can, of course, use estimates instead of parameters (arithmetic mean and), but then the distribution of the mean will not be entirely normal, it will be slightly flattened downward. This fact was cleverly noted by citizen William Gosset of Ireland, who published his discovery in the March 1908 issue of Biometrica. For conspiracy purposes, Gosset signed himself as Student. This is how the Student's t-distribution appeared.

However, the normal distribution of data used by K. Gauss when analyzing the errors of astronomical observations is extremely rare in earthly life and it is rather difficult to establish this (for high precision about 2 thousand observations are needed). Therefore, it is best to discard the normality assumption and use methods that are independent of the distribution of the original data.

The question arises: what is the distribution of the arithmetic mean if it is calculated from the data of an unknown distribution? The answer is given by the well-known in probability theory Central limit theorem(TSPT). In mathematics, there are several variants of it (over the years, the formulations have been refined), but all of them, roughly speaking, boil down to the statement that the sum of a large number of independent random variables obeys the normal distribution law.

When calculating the arithmetic mean, the sum of random variables is used. Hence, it turns out that the arithmetic mean has a normal distribution, in which the mean is the mean of the original data, and the variance is.

Smart people know how to prove the CLT, but we will be convinced of this with the help of an experiment conducted in Excel. Let's simulate a sample of 50 uniformly distributed random variables (using Excel functions A CASE BETWEEN). Then we will make 1000 such samples and calculate the arithmetic mean for each. Let's look at their distribution.

It is seen that the distribution of the mean is close to the normal law. If the volume of samples and their number are made even larger, then the similarity will be even better.

Now that we have personally convinced of the validity of the CLT, we can, using, calculate the confidence intervals for the arithmetic mean, which, with a given probability, cover the true mean or mathematical expectation.

To establish the upper and lower bounds, you need to know the parameters of the normal distribution. As a rule, they are not there, therefore, estimates are used: arithmetic mean and sample variance... Again, this method gives a good approximation only for large samples. When the samples are small, it is often recommended to use the Student's t distribution. Do not believe it! The Student's distribution for the mean occurs only when the original data have a normal distribution, that is, almost never. Therefore, it is better to immediately set the minimum bar for the amount of required data and use asymptotically correct methods. They say that 30 observations are enough. Take 50 - you can't go wrong.

T 1.2- lower and upper limits of the confidence interval

- sample arithmetic mean

s 0- sample standard deviation (unbiased)

n - sample size

γ - confidence level (usually 0.9, 0.95 or 0.99)

c γ = Φ -1 ((1 + γ) / 2) Is the inverse of the standard normal distribution function. In simple terms, this is the number of standard errors from the arithmetic mean to the lower or upper bound (the indicated three probabilities correspond to the values ​​1.64, 1.96 and 2.58).

The essence of the formula is that the arithmetic mean is taken and then a certain amount is deposited from it ( with γ) standard errors ( s 0 / √n). Everything is known, take it and count it.

Before the mass use of a personal computer to obtain the values ​​of the normal distribution function and its inverse, they used. They are still used now, but it is more efficient to turn to ready-made Excel formulas. All elements from the formula above (, and) can be easily calculated in Excel. But there is also a ready-made formula for calculating the confidence interval - TRUST.NORM... Its syntax is as follows.

TRUST.NORM (alpha; standard_dev; size)

alpha- the level of significance or confidence level, which in the above notation is equal to 1 - γ, i.e. probability that the mathematicalthe expectation will be outside the confidence interval. At a confidence level of 0.95, alpha is 0.05, etc.

standard_dev Is the standard deviation of the sample data. You don't need to calculate the standard error, Excel will divide it by the root of n.

the size- sample size (n).

The result of the CONFIDENCE.NORM function is the second term from the formula for calculating the confidence interval, i.e. half-interval. Accordingly, the lower and upper points are the mean ± the obtained value.

So one can build universal algorithm calculation of confidence intervals for the arithmetic mean, which does not depend on the distribution of the original data. The price for universality is its asymptoticity, i.e. the need to use relatively large samples. However, in the century modern technologies to collect the right amount data is usually not difficult.

Testing Statistical Hypotheses Using Confidence Intervals

(module 111)

One of the main tasks solved in statistics is. Its essence is briefly as follows. It is suggested, for example, that the expected value of the general population is equal to some value. Then the distribution of sample averages is plotted, which can be observed with a given expectation. Next, they look where the real average is located in this conditional distribution. If she goes beyond allowable limits, then the appearance of such an average is very unlikely, and with a single repetition of the experiment, it is almost impossible, which contradicts the hypothesis put forward, which is successfully rejected. If the mean does not go beyond the critical level, then the hypothesis is not rejected (but also not proven!).

So, using the confidence intervals, in our case for the expectation, you can also test some hypotheses. It's very easy to do. Suppose the arithmetic mean over a certain sample is equal to 100. The hypothesis is tested that the expectation is equal, say, 90. the average was equal to 100?

To answer this question, you will additionally need information about the standard deviation and the sample size. Let's say the standard deviation is 30, and the number of observations is 64 (to easily extract the root). Then the standard error of the mean is 30/8 or 3.75. To calculate the 95% confidence interval, it will be necessary to postpone two standard errors (more precisely, 1.96 each) on both sides of the mean. The confidence interval will be approximately 100 ± 7.5, or 92.5 to 107.5.

Further, the reasoning is as follows. If the tested value falls within the confidence interval, then it does not contradict the hypothesis, since fits within the limits of random fluctuations (with a probability of 95%). If the point being checked is outside the confidence interval, then the probability of such an event is very small, at least below the acceptable level. Hence, the hypothesis is rejected as contradicting the observed data. In our case, the hypothesis about expectation is outside the confidence interval (the tested value of 90 is not included in the interval 100 ± 7.5), so it should be rejected. Answering the primitive question above, one should say: no, it cannot, in any case, this happens extremely rarely. At the same time, they often indicate the specific probability of erroneous rejection of the hypothesis (p-level), and not the specified level, according to which the confidence interval was built, but more on that another time.

As you can see, it is not difficult to construct a confidence interval for the mean (or mathematical expectation). The main thing is to grasp the essence, and then the matter will go. In practice, in most cases, a 95% confidence interval is used, which is approximately two standard errors wide on either side of the mean.

That's all for now. All the best!

CONFIDENCE INTERVALS FOR FREQUENCIES AND LOADS

© 2008

National Institute of Public Health, Oslo, Norway

The article describes and discusses the calculation of confidence intervals for frequencies and fractions by the methods of Wald, Wilson, Clopper - Pearson, using the angular transformation and by the Wald method with the Agresti - Cole correction. The presented material gives general information on the methods of calculating confidence intervals for frequencies and fractions and is intended to arouse the interest of the readers of the journal not only in the use of confidence intervals when presenting the results of their own research, but also in reading specialized literature before starting work on future publications.

Keywords : confidence interval, frequency, proportion

In one of the previous publications, the description of qualitative data was briefly mentioned and it was reported that their interval estimate is preferable to the point estimate for describing the frequency of occurrence of the studied characteristic in the general population. Indeed, since studies are carried out using sample data, the projection of the results onto the general population must contain an element of inaccuracy in the sample estimate. The confidence interval is a measure of the accuracy of an estimated parameter. Interestingly, in some books on basic statistics for medical professionals, the topic of confidence intervals for frequencies is completely ignored. In this article, we will consider several methods for calculating confidence intervals for frequencies, implying such characteristics of the sample as non-repetition and representativeness, as well as the independence of observations from each other. Frequency in this article is understood not as an absolute number, which shows how many times a given value occurs in the aggregate, but as a relative value that determines the proportion of research participants in whom the trait under study occurs.

In biomedical research, 95% confidence intervals are most commonly used. This confidence interval is the area that the true proportion falls within 95% of the time. In other words, we can say with 95% confidence that the true value of the frequency of occurrence of a trait in the general population will be within the 95% confidence interval.

Most statistics manuals for medical researchers report that the frequency error is calculated using the formula

where p is the frequency of occurrence of the trait in the sample (value from 0 to 1). Most Russian scientific articles indicate the value of the frequency of occurrence of a trait in the sample (p), as well as its error (s) in the form of p ± s. It is more expedient, however, to present a 95% confidence interval for the frequency of occurrence of a trait in the general population, which will include values ​​from

before.

In some manuals, it is recommended for small samples to replace the value of 1.96 with the t value for N - 1 degrees of freedom, where N is the number of observations in the sample. The value of t is found from tables for the t-distribution, which are available in almost all textbooks on statistics. The use of the t distribution for Wald's method does not provide visible advantages over other methods discussed below, and therefore is not encouraged by some authors.

The above method for calculating confidence intervals for frequencies or fractions is named after Wald in honor of Abraham Wald (1902-1950), since its widespread use began after the publication of Wald and Wolfowitz in 1939. However, the method itself was proposed by Pierre Simon Laplace (1749–1827) back in 1812.

Wald's method is very popular, but its use is associated with significant problems. The method is not recommended for small sample sizes, as well as in cases where the frequency of occurrence of a feature tends to 0 or 1 (0% or 100%) and is simply impossible for frequencies 0 and 1. In addition, the approximation of the normal distribution, which is used to calculate the error , “Does not work” in cases where n · p< 5 или n · (1 – p) < 5 . Более консервативные статистики считают, что n · p и n · (1 – p) должны быть не менее 10 . Более детальное рассмотрение метода Вальда показало, что полученные с его помощью доверительные интервалы в большинстве случаев слишком узки, то есть их применение ошибочно создает слишком оптимистичную картину, особенно при удалении частоты встречаемости признака от 0,5, или 50 % . К тому же при приближении частоты к 0 или 1 доверительный интревал может принимать отрицательные значения или превышать 1, что выглядит абсурдно для частот. Многие авторы совершенно справедливо не рекомендуют применять данный метод не только в уже упомянутых случаях, но и тогда, когда частота встречаемости признака менее 25 % или более 75 % . Таким образом, несмотря на простоту расчетов, метод Вальда может применяться лишь в очень ограниченном числе случаев. Зарубежные исследователи более категоричны в своих выводах и однозначно рекомендуют не применять этот метод для небольших выборок , а ведь именно с такими выборками часто приходится иметь дело исследователям-медикам.

Since the new variable is normally distributed, the lower and upper bounds of the 95% confidence interval for the variable φ will be φ-1.96 and φ + 1.96left ">

Instead of 1.96 for small samples, it is recommended to substitute t for N - 1 degrees of freedom. This method does not give negative values ​​and allows more accurate estimation of confidence intervals for frequencies than Wald's method. In addition, it is described in many domestic reference books on medical statistics, which, however, did not lead to its widespread use in medical research. Calculating confidence intervals using an angular transformation is not recommended for frequencies approaching 0 or 1.

This is where the description of methods for assessing confidence intervals in most books on the basics of statistics for medical researchers usually ends, and this problem is typical not only for domestic, but also for foreign literature. Both methods are based on the central limit theorem, which assumes a large sample.

Taking into account the disadvantages of estimating confidence intervals using the above methods, Clopper and Pearson proposed in 1934 a method for calculating the so-called exact confidence interval, taking into account the binomial distribution of the trait under study. This method is available in many online calculators, but the confidence intervals obtained in this way are in most cases too wide. At the same time, this method is recommended to be used in cases where a conservative assessment is required. The degree of conservatism of the method increases with decreasing sample size, especially when N< 15 . описывает применение функции биномиального распределения для анализа качественных данных с использованием MS Excel, в том числе и для определения доверительных интервалов, однако расчет последних для частот в электронных таблицах не «затабулирован» в удобном для пользователя виде, а потому, вероятно, и не используется большинством исследователей.

According to many statisticians, the most optimal estimate of the confidence intervals for frequencies is carried out by the Wilson method, proposed back in 1927, but practically not used in domestic biomedical research. This method not only makes it possible to estimate the confidence intervals for both very small and very high frequencies, but is also applicable for a small number of observations. V general view the confidence interval according to the Wilson formula has the form of



where takes a value of 1.96 when calculating the 95% confidence interval, N is the number of observations, and p is the frequency of occurrence of a feature in the sample. This method is available in online calculators, so its application is not problematic. and do not recommend using this method for n p< 4 или n · (1 – p) < 4 по причине слишком грубого приближения распределения р к нормальному в такой ситуации, однако зарубежные статистики считают метод Уилсона применимым и для малых выборок .

It is believed that, in addition to the Wilson method, the Wald Agresti-Cole corrected method also provides an optimal estimate of the confidence interval for frequencies. Correction according to Agresti - Cole is a replacement in Wald's formula of the frequency of occurrence of a trait in the sample (p) by p`, in the calculation of which 2 is added to the numerator, and 4 is added to the denominator, that is, p` = (X + 2) / (N + 4), where X is the number of study participants who have the trait under study, and N is the sample size. This modification leads to results very similar to the results of the Wilson formula, except for cases where the event rate approaches 0% or 100%, and the sample is small. In addition to the above-mentioned methods for calculating confidence intervals for frequencies, continuity corrections were proposed for both the Wald method and the Wilson method for small samples, but studies have shown that their use is impractical.

Let us consider the application of the above methods for calculating confidence intervals using two examples. In the first case, we study a large sample of 1,000 randomly selected study participants, of whom 450 have the trait under study (it can be a risk factor, outcome, or any other trait), which is 0.45, or 45%. In the second case, the study is carried out using a small sample, say, only 20 people, and the studied trait is present in only 1 participant in the study (5%). Confidence intervals according to Wald method, Wald method with Agresti-Cole correction, and Wilson method were calculated using an online calculator developed by Jeff Sauro (http: // www. / Wald. Htm). Continuity-corrected Wilson confidence intervals were calculated using a calculator proposed by Wassar Stats: Web Site for Statistical Computation (http: // faculty.vassar.edu / lowry / prop1.html). Calculations using the angular Fisher transformation were performed "manually" using critical t for 19 and 999 degrees of freedom, respectively. The calculation results are presented in the table for both examples.

Confidence intervals calculated by six different ways for the two examples described in the text

Confidence interval calculation method

P = 0.0500, or 5%

95% CI for X = 450, N = 1000, P = 0.4500, or 45%

–0,0455–0,2541

Wald with Agresti-Cole correction

<,0001–0,2541

Wilson with continuity correction

Clopper - Pearson "exact method"

Angular transformation

<0,0001–0,1967

As can be seen from the table, for the first example, the confidence interval calculated by the "generally accepted" Wald method goes into the negative region, which cannot be the case for frequencies. Unfortunately, such incidents are not uncommon in Russian literature. The traditional way of representing data in terms of frequency and its errors partially masks this problem. For example, if the frequency of occurrence of a trait (in percent) is presented as 2.1 ± 1.4, then this is not as "painful for the eyes" as 2.1% (95% CI: -0.7; 4.9), although and means the same. The Wald method with Agresti - Cole correction and calculation using the angular transformation give a lower bound tending to zero. Continuity-corrected Wilson's method and "exact method" give wider confidence intervals than Wilson's method. For the second example, all methods give approximately the same confidence intervals (differences appear only in thousandths), which is not surprising, since the frequency of occurrence of the event in this example does not differ much from 50%, and the sample size is quite large.

For readers interested in this problem, we can recommend the works of R. G. Newcombe and Brown, Cai and Dasgupta, which show the pros and cons of using 7 and 10 different methods for calculating confidence intervals, respectively. From domestic manuals, it is recommended to book and, which, in addition to a detailed description of the theory, presents the methods of Wald, Wilson, as well as a method for calculating confidence intervals taking into account the binomial frequency distribution. In addition to free online calculators (http: // www. / Wald. Htm and http: // faculty. Vassar. Edu / lowry / prop1.html), confidence intervals for frequencies (and more!) Can be calculated using the CIA program ( Confidence Intervals Analysis), which can be downloaded from http: // www. medschool. soton. ac. uk / cia /.

The next article will look at one-dimensional ways to compare quality data.

Bibliography

Banerji A. Medical statistics in plain language: an introductory course / A. Banerji. - M.: Practical Medicine, 2007 .-- 287 p. Medical statistics /. - M.: Medical Information Agency, 2007 .-- 475 p. Glantz S. Biomedical statistics / S. Glants. - M.: Practice, 1998. Data types, distribution checking and descriptive statistics / // Human Ecology - 2008. - No. 1. - P. 52–58. Zhizhin K. S... Medical statistics: textbook /. - Rostov n / a: Phoenix, 2007 .-- 160 p. Applied Medical Statistics /,. - SPb. : Folio, 2003 .-- 428 p. Lakin G. F... Biometrics /. - M.: Higher school, 1990 .-- 350 p. Medic V. A... Mathematical statistics in medicine /,. - M.: Finance and statistics, 2007 .-- 798 p. Mathematical statistics in clinical research /,. - M.: GEOTAR-MED, 2001 .-- 256 p. Yunkerov V. AND... Medical and statistical processing of medical research data /,. - SPb. : VmedA, 2002 .-- 266 p. Agresti A. Approximate is better than exact for interval estimation of binomial proportions / A. Agresti, B. Coull // American statistician. - 1998. - N 52. - S. 119-126. Altman D. Statistics with confidence // D. Altman, D. Machin, T. Bryant, M. J. Gardner. - London: BMJ Books, 2000 .-- 240 p. Brown L. D. Interval estimation for a binomial proportion / L. D. Brown, T. T. Cai, A. Dasgupta // Statistical science. - 2001. - N 2. - P. 101-133. Clopper C. J. The use of confidence or fiducial limits illustrated in the case of the binomial / C. J. Clopper, E. S. Pearson // Biometrika. - 1934. - N 26. - P. 404-413. Garcia-Perez M. A... On the confidence interval for the binomial parameter / M. A. Garcia-Perez // Quality and quantity. - 2005. - N 39. - P. 467–481. Motulsky H. Intuitive biostatistics // H. Motulsky. - Oxford: Oxford University Press, 1995 .-- 386 p. Newcombe R. G. Two-Sided Confidence Intervals for the Single Proportion: Comparison of Seven Methods / R. G. Newcombe // Statistics in Medicine. - 1998. - N. 17. - P. 857-872. Sauro J. Estimating completion rates from small samples using binomial confidence intervals: comparisons and recommendations / J. Sauro, J. R. Lewis // Proceedings of the human factors and ergonomics society annual meeting. - Orlando, FL, 2005. Wald A. Confidence limits for continuous distribution functions // A. Wald, J. Wolfovitz // Annals of Mathematical Statistics. - 1939. - N 10. - P. 105-118. Wilson E. B... Probable inference, the law of succession, and statistical inference / E. B. Wilson // Journal of American Statistical Association. - 1927. - N 22. - P. 209-212.

CONFIDENCE INTERVALS FOR PROPORTIONS

A. M. Grjibovski

National Institute of Public Health, Oslo, Norway

The article presents several methods for calculations confidence intervals for binomial proportions, namely, Wald, Wilson, arcsine, Agresti-Coull and exact Clopper-Pearson methods. The paper gives only general introduction to the problem of confidence interval estimation of a binomial proportion and its aim is not only to stimulate the readers to use confidence intervals when presenting results of own empirical research, but also to encourage them to consult statistics books prior to analysing own data and preparing manuscripts.

Key words: confidence interval, proportion

Contact Information:

Senior Adviser, National Institute of Public Health, Oslo, Norway

In the previous subsections, we considered the question of estimating an unknown parameter a one number. This estimate is called "point". In a number of tasks, it is required not only to find for the parameter a a suitable numerical value, but also evaluate its accuracy and reliability. You want to know what errors a parameter replacement can lead to a its point estimate a and with what degree of confidence can we expect these errors to stay within known limits?

Problems of this kind are especially relevant for a small number of observations, when the point estimate and in to a large extent, it is accidental and the approximate replacement of a by a can lead to serious errors.

To give an idea of ​​the accuracy and reliability of the assessment a,

in mathematical statistics so-called confidence intervals and confidence probabilities are used.

Let for the parameter a from experience unbiased estimate a. We want to evaluate the possible error in this case. Let us assign some sufficiently large probability p (for example, p = 0.9, 0.95 or 0.99) such that an event with probability p can be considered practically reliable, and we find such a value s for which

Then the range of practically possible values ​​of the error arising when replacing a on a, will be ± s; large in absolute value errors will appear only with a small probability a = 1 - p. Let's rewrite (14.3.1) as:

Equality (14.3.2) means that with probability p the unknown value of the parameter a falls within the interval

In this case, one circumstance should be noted. Earlier, we have repeatedly considered the probability of a random variable falling into a given non-random interval. Here the situation is different: the quantity a not accidental, but the interval / p is random. Randomly its position on the abscissa axis, determined by its center a; the length of the interval 2s is also random in general, since the value of s is calculated, as a rule, from experimental data. Therefore, in this case, it would be better to interpret the value of p not as the probability of "hitting" the point a into the interval / p, but as the probability that the random interval / p will cover the point a(fig. 14.3.1).

Rice. 14.3.1

The probability p is usually called confidence level, and the interval / p is confidence interval. Interval boundaries If. a x = a- s and a 2 = a + but called confidence limits.

Let us give one more interpretation of the concept of a confidence interval: it can be considered as an interval of parameter values a, compatible with experimental data and not contradicting them. Indeed, if we agree to consider an event with probability a = 1-p practically impossible, then those values ​​of the parameter a for which a - a> s, must be recognized as contradicting the experimental data, and those for which | a - a a t na 2.

Let for the parameter a there is an unbiased estimate a. If we knew the distribution law of the quantity a, the problem of finding the confidence interval would be very simple: it would be enough to find such a value of s for which

The difficulty is that the distribution law of the estimate a depends on the distribution law of the quantity X and, therefore, on its unknown parameters (in particular, on the parameter itself a).

To get around this difficulty, the following rough approximation can be applied: replace the unknown parameters in the expression for s with their point estimates. With a relatively large number of experiments NS(about 20 ... 30) this technique usually gives results satisfactory in terms of accuracy.

As an example, consider the problem of the confidence interval for the mathematical expectation.

Let it be produced NS X, whose characteristics are the mathematical expectation T and variance D- unknown. For these parameters, the following estimates were obtained:

It is required to construct the confidence interval / p, corresponding to the confidence probability p, for the mathematical expectation T magnitudes X.

When solving this problem, we will use the fact that the quantity T represents the amount NS independent identically distributed random variables X h and according to the central limit theorem for sufficiently large NS its distribution law is close to normal. In practice, even with a relatively small number of terms (about 10 ... 20), the distribution law of the sum can be considered approximately normal. We will proceed from the fact that the quantity T distributed according to the normal law. The characteristics of this law - mathematical expectation and variance - are equal, respectively T and

(see chapter 13 subsection 13.3). Suppose that the quantity D we know and find such a value Ep for which

Applying formula (6.3.5) of Chapter 6, we express the probability on the left-hand side of (14.3.5) in terms of the normal distribution function

where is the standard deviation of the estimate T.

From the equation

we find the value of Sp:

where arg Ф * (х) is the inverse function of Ф * (NS), those. such a value of the argument for which the normal distribution function is equal to NS.

Dispersion D, through which the value is expressed a 1P, we do not know exactly; as its approximate value, you can use the estimate D(14.3.4) and put approximately:

Thus, the problem of constructing a confidence interval has been approximately solved, which is equal to:

where gp is defined by formula (14.3.7).

In order to avoid inverse interpolation in the tables of the function Ф * (л) when calculating s p, it is convenient to draw up a special table (Table 14.3.1), where the values ​​of the quantity

depending on the p. The quantity (p determines for the normal law the number of standard deviations that must be set aside to the right and left of the center of scattering in order for the probability of hitting the resulting area to be equal to p.

Through the value of 7 p, the confidence interval is expressed as:

Table 14.3.1

Example 1. Conducted 20 experiments on the value X; the results are shown in table. 14.3.2.

Table 14.3.2

It is required to find an estimate of for the mathematical expectation of the quantity X and build a confidence interval corresponding to a confidence level of p = 0.8.

Solution. We have:

Having chosen as the origin l: = 10, according to the third formula (14.2.14) we find the unbiased estimate D :

According to the table. 14.3,1 find

Confidence limits:

Confidence interval:

Parameter values T, lying in this interval are consistent with the experimental data given in table. 14.3.2.

The confidence interval for the variance can be constructed in a similar way.

Let it be produced NS independent experiments on a random variable X with unknown parameters from and A, and for the variance D the unbiased estimate is obtained:

It is required to roughly construct a confidence interval for the variance.

From formula (14.3.11) it is seen that the quantity D represents

the sum NS random variables of the form. These quantities are not

independent, since any of them includes the quantity T, dependent on everyone else. However, it can be shown that with increasing NS the distribution law of their sum is also close to normal. Practically at NS= 20 ... 30 it can already be considered normal.

Let us assume that this is so, and find the characteristics of this law: mathematical expectation and variance. Since the score D- unbiased, then M [D] = D.

Calculating variance D D is associated with relatively complex calculations, so we give its expression without output:

where q 4 is the fourth central moment of the quantity X.

To use this expression, you need to substitute in it the values ​​\ u200b \ u200b4 and D(at least approximate). Instead of D you can use his estimate D. In principle, the fourth central moment can also be replaced by an estimate, for example, by a value of the form:

but such a replacement will give an extremely low accuracy, since in general, with a limited number of experiments, high-order moments are determined with large errors. However, in practice it often happens that the form of the distribution law of the quantity X known in advance: only its parameters are unknown. Then you can try to express q 4 in terms of D.

Let us take the most frequent case when the quantity X distributed according to the normal law. Then its fourth central moment is expressed in terms of variance (see Chapter 6 Subsection 6.2);

and formula (14.3.12) gives or

Replacing in (14.3.14) the unknown D his assessment D, we get: whence

The moment c 4 can be expressed in terms of D also in some other cases, when the distribution of the quantity X is not normal, but its appearance is known. For example, for the law of uniform density (see Chapter 5) we have:

where (a, P) is the interval at which the law is set.

Hence,

By the formula (14.3.12) we get: from where we find approximately

In cases where the form of the distribution law for 26 is unknown, it is still recommended to use formula (14.3.16) when roughly estimating the value of a /), unless there are special reasons to believe that this law is very different from the normal one (it has a noticeable positive or negative kurtosis) ...

If the approximate value of a /) is obtained in one way or another, then it is possible to construct a confidence interval for the variance in the same way as we built it for the mathematical expectation:

where the value, depending on the given probability p, is found according to the table. 14.3.1.

Example 2. Find an approximately 80% confidence interval for the variance of a random variable X under the conditions of Example 1, if it is known that the quantity X distributed according to a law close to normal.

Solution. The value remains the same as in table. 14.3.1:

According to the formula (14.3.16)

Using the formula (14.3.18), we find the confidence interval:

The corresponding interval of mean values square deviation: (0,21; 0,29).

14.4. Exact methods for constructing confidence intervals for the parameters of a random variable distributed according to the normal law

In the previous subsection, we looked at roughly approximate methods for constructing confidence intervals for expectation and variance. Here we will give an idea of ​​the exact methods for solving the same problem. We emphasize that in order to accurately find the confidence intervals, it is absolutely necessary to know in advance the form of the distribution law of the quantity X, while for the application of approximate methods this is not necessary.

The idea behind accurate methods for constructing confidence intervals is as follows. Any confidence interval is found from the condition expressing the probability of the fulfillment of certain inequalities, which include the estimate of interest to us a. Estimation distribution law a in the general case depends on the unknown parameters of the quantity X. However, sometimes it is possible to pass in inequalities from a random variable a to some other function of observed values X n X 2, ..., X p. whose distribution law does not depend on unknown parameters, but depends only on the number of experiments and on the form of the distribution law for the quantity X. Random variables of this kind play an important role in mathematical statistics; they have been studied in most detail for the case of the normal distribution of the quantity X.

For example, it was proved that for a normal distribution of the quantity X random value

obeys the so-called Student distribution law with NS- 1 degrees of freedom; the density of this law has the form

where Г (х) is the known gamma function:

It was also proved that the random variable

has a "distribution% 2" with NS- 1 degrees of freedom (see Chapter 7), the density of which is expressed by the formula

Without dwelling on the conclusions of distributions (14.4.2) and (14.4.4), we show how they can be applied when constructing confidence intervals for the parameters ty D.

Let it be produced NS independent experiments on a random variable X, distributed according to the normal law with unknown parameters thio. For these parameters, the estimates were obtained

It is required to construct confidence intervals for both parameters, corresponding to the confidence probability p.

Let us first construct the confidence interval for the mathematical expectation. Naturally, this interval is taken symmetric with respect to T; denote by s p half the length of the interval. The quantity s p must be chosen so that the condition

Let's try to pass on the left-hand side of equality (14.4.5) from the random variable T to a random variable T, distributed according to Student's law. To do this, we multiply both sides of the inequality | m-w? |

by a positive value: or, using the notation (14.4.1),

Let us find a number / p such that the value / p is found from the condition

It is seen from formula (14.4.2) that (1) is an even function, therefore (14.4.8) gives

Equality (14.4.9) determines the value of / p depending on p. If you have at your disposal a table of values ​​of the integral

then the value of / p can be found by reverse interpolation in the table. However, it is more convenient to compile a table of / p values ​​in advance. Such a table is given in the appendix (Table 5). This table shows the values ​​depending on the confidence probability p and the number of degrees of freedom NS- 1. Having determined / p according to the table. 5 and assuming

we will find half the width of the confidence interval / p and the interval itself

Example 1. Made 5 independent experiments on a random variable X, normally distributed with unknown parameters T and about. The results of the experiments are shown in table. 14.4.1.

Table 14.4.1

Find a grade T for the mathematical expectation and construct for it a 90% confidence interval / p (i.e., the interval corresponding to the confidence probability p = 0.9).

Solution. We have:

According to table 5 applications for NS - 1 = 4 and p = 0.9 we find where

The confidence interval will be

Example 2. For the conditions of example 1 of subsection 14.3, assuming the value X distributed normally, find the exact confidence interval.

Solution. According to table 5, we find applications for NS - 1 = 19ir =

0.8 / p = 1.328; from here

Comparing with the solution of example 1 of subsection 14.3 (e p = 0.072), we are convinced that the discrepancy is very insignificant. If we keep the accuracy to the second decimal place, then the confidence intervals found by exact and approximate methods coincide:

Let's move on to constructing the confidence interval for the variance. Consider the unbiased variance estimate

and express the random variable D through the value V(14.4.3), having a distribution x 2 (14.4.4):

Knowing the distribution law of the quantity V, one can find the interval / (1, in which it falls with a given probability p.

Distribution law k n _ x (v) quantity I 7 has the form shown in Fig. 14.4.1.

Rice. 14.4.1

The question arises: how to choose the interval / p? If the distribution law of the quantity V was symmetric (like the normal law or the Student's distribution), it would be natural to take the interval / p symmetric with respect to the mathematical expectation. In this case, the law k n _ x (v) asymmetrical. Let us agree to choose the interval / p so that the probabilities of the output of the quantity V outside the interval to the right and to the left (shaded areas in Fig. 14.4.1) were the same and equal

To construct an interval / p with this property, we will use table. 4 appendices: it lists numbers y) such that

for the value V, having x 2 -distribution with r degrees of freedom. In our case r = n- 1. Let us fix r = n- 1 and find in the corresponding line of the table. 4 two meanings x 2 - one corresponding to probability the other - probabilities Let us denote these

meaning at 2 and xl? The interval has at 2, his left, and y ~ right end.

Now let us find the required confidence interval / | for the variance with boundaries D, and D 2, which covers the point D with probability p:

Let us construct such an interval / (, = (?> B A), which covers the point D if and only if the quantity V falls into the interval / p. Let us show that the interval

satisfies this condition. Indeed, the inequalities are equivalent to inequalities

and these inequalities are satisfied with probability p. Thus, the confidence interval for the variance is found and is expressed by the formula (14.4.13).

Example 3. Find the confidence interval for the variance under the conditions of example 2 in subsection 14.3, if it is known that the value X distributed normally.

Solution. We have ... According to table 4 of the appendix

we find at r = n - 1 = 19

Using the formula (14.4.13), we find the confidence interval for the variance

Corresponding interval for standard deviation: (0.21; 0.32). This interval only slightly exceeds the interval (0.21; 0.29) obtained in example 2 of subsection 14.3 by the approximate method.

  • Figure 14.3.1 considers a confidence interval that is symmetric about a. In general, as we will see later, this is optional.