CHAPTER 6  SAMPLING DISTRIBUTION AND CONFIDENCE INTERVALS

표본분포(標本分布), 신뢰구간(信賴區間)

You will recall from Section 1.1 that inferential statistics are defined as those in which conclusions about a large set of data, called the population, are made from a subset of the data, called the sample. Inferential statistical methods use the results of a sample statistic to draw conclusions about a population parameter by using just a single sample. Drawing conclusions about a whole thing based on looking at only a (possibly fairly) small part does not seem intuitively correct to many people and brings to mind the old joke about what would happen if a group of scientists examined different parts of the same large elephant in the dark. 장님-꼬끼리 우화 예: The "intuition" leads many to be dismissive of statistics and to wrongly claim that when you look at a sample, you "only" learn about that subset of data. 모집단과 표본의 관계:

In this chapter, you will learn the following:

- The concept of a sampling distribution  표본분포의 개념

- The concept of a confidence interval 신뢰구간의 개념

- How to obtain confidence interval estimates for the mean and the proportion

평균과 비율에 대한 신뢰구간 추정치의 계산

These concepts, the first step toward learning about inferential statistics, explain and illustrate how a small part of the whole can allow you to make plausible inferences about the whole.

6.1 Sampling Distribution 표본분포

Concept: The distribution of a sample statistic, such as the mean, for all possible samples of a given size [eqn: n].

Example: Sampling distribution of the mean, sampling distribution of the proportion.

Interpretation: Consider a population that includes 1,000 items. The sampling distribution of the mean for samples of 15 items consists of the mean of every single different sample of 15 items from the population.  Imagine the distribution of all the means that could possibly occur: Some means would be smaller than most, some would be larger than most, and many would have similar values.

모집단 (크기 1,000)에서 표본크기 15로 이루어진 표본들에 대한 평균의 표본분포를 알아보자.

Calculating the means for all the samples would be an involved and time-consuming task. Actually, you do not have to develop specific sapling distributions yourself, because statisticians have extensively studied sampling distribution for the mean and for the proportion. These well-known sampling distributions are used extensively, starting in this Chapter and continuing through Chapter 9, as a basis for inferential statistics.

Sampling Distribution of the Mean and the Central Limit Theorem

표본평균의 표본분포와 중심극한정리(中心極限定理)

The mean is the most widely used measure in statistics. Recall that the mean has one great weakness: an individual extreme value can distort the mean.

Through several insights - including the observation that the probability of getting such a distorted mean is relatively low, whereas the probability of getting a mean similar to many other sample means is much greater - statisticians have developed the central limit theorem, which states that regardless of the shape of the distribution of the individual values in the population:

As the sample size gets large enough, the sampling distribution of the mean can be approximated by a normal distribution. 표본 크기가 충분하다면 표본평균의 분포는 정규분포에 접근.

As a general rule, statisticians have found that for many population distributions, a sample size of at least 30 is "large enough."  However, you may be able to apply the central limit theorem for even smaller sample sizes if the distribution is known to be approximately bell-shaped.

The following figure shows the sampling distribution of the mean for three different populations. For each population, the sampling distribution of the sample mean is shown for all samples of [eqn: n=2,``n=5,``]and [eqn: n=30].

(A)Normal Population    (B)Uniform Population    (C) Exponential Population

[eqn: X]

Sampling Distribution of [eqn: bar X]

[eqn: n=2]

[eqn: bar X]

[eqn: n=5]

[eqn: bar X]

[eqn: n=30]

[eqn: bar X]

예: 모집단{1,2,3,4,5}에서 [eqn: n=2]로 복원추출을 할 경우 표본평균들의 표본분포는? 비복원의 경우는?

평균이 [eqn: mu]이고, 분산이 [eqn: sigma ^{2}]인 모집단으로부터 표본자료 [eqn: X _{1,} X _{2,} ...X _{n}]가 추출. 표본평균 [eqn: E(bar{X})]는 모집단 분포와 상관없이 [eqn: n]이 충분히 크면, 근사적으로 [eqn: N`( mu ,`` sigma ^{2} /n)]의 분포를 따른다. 결국, 모집단의 분포모양과는 무관하게 표본크기가 증가할수록 표본평균의 분포는 정규분포를 따르게 됨을 알 수 있다.

Observations, such as those just made from using this figure, allow you to state the following relationships between the normal distribution and the sampling distribution of the mean:

- For most population distributions, regardless of shape, the sampling distribution of the mean is approximately normally distributed, if samples of at least 30 observations are selected.

- If the population distribution is fairly symmetrical, the sampling distribution of the mean is approximately normal, if samples of at least 15 observations are selected.

- If the population is normally distributed, the sampling distribution of the mean is normally distributed, regardless of the sample size.

Sampling Distribution of the Proportion  비율의 표본분포

Recall that a binomial distribution can be used to determine probabilities for categorical variables that have only two categories, traditionally labeled "success" and "failure."  As a general rule, the normal distribution can be used to approximate the binomial distribution when the average number of successes and the average number of failures are each at least 5.

최소한 [eqn: np>5, ``n(1-p)>5]인 경우, 정규근사치 이용가능.

6.2 Sampling Error and Confidence Intervals 표본오차(標本誤差)와 신뢰구간(信賴區間)

Taking one sample and obtaining the results of a sample statistic, such as the mean, creates a point estimate of the population parameter. The single estimate will almost certainly not be the same if a different sample is selected. For example, the results generated from the 20 different samples of size 10 from chemical viscosity data for 120 batches with the population mean, [eqn: mu=14.978] and the population standard deviation, [eqn: sigma=1.003], are presented in <Table 6.1>.

<표 6.1> [eqn: mu =14.978,```` sigma =1.003], [eqn: N=120]인 모집단에서 [eqn: n=10]인 표본들을 20개 추출한 결과:

Sample	Mean Standard Deviation Minimum Median Maximum Range
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20	14.69 0.858 13.4 14.60 16.1 2.7 15.31 0.590 14.5 15.30 16.3 1.8 14.65 0.824 13.3 14.65 16.0 2.7 14.91 1.049 13.7 14.85 16.9 3.2 14.78 0.847 13.7 14.65 16.5 2.8 14.63 1.145 12.6 14.35 16.6 4.0 14.61 1.034 12.8 14.90 16.4 3.6 15.04 1.422 13.6 14.70 18.6 5.0 15.34 1.055 13.7 15.65 16.8 3.1 15.37 0.572 14.3 15.30 16.2 1.9 15.23 0.864 14.2 15.10 16.9 2.7 15.16 0.749 14.4 14.95 16.9 2.5 15.12 0.840 14.0 15.15 16.6 2.6 14.86 0.696 14.2 14.75 16.5 2.3 15.68 0.750 14.4 15.45 17.0 2.6 15.13 0.699 14.0 15.15 16.3 2.3 14.47 0.715 13.3 14.60 15.3 2.0 15.25 0.985 13.8 15.15 16.8 3.0 14.72 0.888 13.3 14.50 16.0 2.7 15.40 0.968 14.3 15.15 17.6 3.3

From these results, note the following:  이러한 결과로부터 다음을 알 수 있다:

- The sample statistics differ from sample to sample. The sample means vary from 14.47 to 15.68, the sample standard deviations vary from 0.572 to 1.422, the sample medians vary from 14.35 to 15.65, etc.

- Some of the sample means are higher than the population mean of 14.978, and some of the sample means are lower than the population mean.

- Some of the sample standard deviations are higher than the population standard deviation of 1.003, and some of the sample standard deviations are lower than the population standard deviation.

- The variation in the sample range from sample to sample is much more than the variation in the sample standard deviation.

You should note that sample statistics almost always vary from sample to sample. This expected variations is called the sampling error.

표본통계량들은 각 표본마다 다르므로, 이러한 예상되는 변동을 표본오차라고 한다.

Sampling Error 표본추출오차

Concept: The variation that occurs due to selecting a single sample from the population.

Example: In polls, the plus-or-minus margin of the results; as in "42%, plus or minus 3%, said they were likely to vote for the incumbent."

Interpretation: The size of the sampling error is primarily based on the variation in the population itself and on the size of the sample selected. Larger samples will have less sampling error, but will be more costly to obtain.

표본오차의 크기는 모집단 자체의 변동과 표본크기에 의존.

In practice, only one point estimate (that is, one sample) is used as the basis for estimating a population parameter. To account for the differences among the point estimates from each of the samples, statisticians have developed the concept of a confidence interval estimate which indicates the likelihood that a stated interval with a lower and upper limit properly estimates the parameter. 점 추정과 구간추정

Confidence Interval Estimate 신뢰구간 추정

Concept: An estimate of a population parameter stated as a range between a lower and upper limit with a specific degree of certainty.

Interpretation: All that you need to know to develop a confidence interval estimate is the sample statistic used to estimate the population parameter and the sampling distribution for the sample statistic. This is always true regardless of the population parameter being estimated. 표본통계량과 그것의 표본분포를 알아야 한다.

Because you are developing an interval using one sample and not precisely determining a value, there is no way that you can be 100% certain that your interval correctly estimates the population parameter as illustrated by the Problem 1 on next page. However, by setting the level of certainty to a value below 100%, you can use the interval estimate to obtain plausible inferences about the population with that given degree of certainty.

There is a trade-off between the level of confidence and the width of the interval. 신뢰수준과 신뢰구간의 폭은 상충관계:  For a given sample size, if you want more confidence that your interval will be correct, you will have a wider interval and therefore a less- precise estimate. Given this trade-off, what level of certainty should you use? Expresses as a percentage, the most common level of certainty used is 95%.

Because of this factor, the degree of certainty, or confidence, must always be stated when reporting an interval estimate. When you hear an "interval estimate with 95% confidence," or simply, a "95% confidence interval estimate," you can conclude that if all possible samples of the same size [eqn: n] were selected, 95% of them would include the population parameter somewhere within the interval and 5% would not.

95% 신뢰구간 추정.

표본크기 [eqn: n]인 가능한 모든 표본 추출 시, 그들 중 95%는 그 구간 내에 모수를 포함한다.

Problem 1. You seek to develop 95% confidence interval estimates for the mean from 20 samples of [eqn: n=10] for the chemistry viscosity data for [eqn: N=120].

Unlike the real-life problems, the population mean, [eqn: mu=14.978] and the population standard deviation, [eqn: sigma=1.003], are already known.  빈 칸을 모두 계산하라. [eqn: mu SIM bar{X} ±Z _{alpha /2} {sigma } over {sqrt {n}}]공식을 이용하여:

95%의 신뢰수준 하에서 [eqn: z _{alpha /2} =1.96]이다.

Sample	[eqn: mu=14.978] [eqn: sigma=1.003] 95% Confidence Mean Std. Dev. Lower limit Upper limit
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20	14.69 0.858 14.0683 15.3117 15.31 0.590 14.65 0.824 14.91 1.049 14.78 0.847 14.63 1.145 14.61 1.034 15.04 1.422 15.34 1.055 15.37 0.572 15.23 0.864 15.16 0.749 15.12 0.840 14.86 0.696 15.68 0.750 15.0583 16.3017 15.13 0.699 14.47 0.715 15.25 0.985 14.72 0.888 15.40 0.968

From the results, you can conclude the following:

- For sample 1, the sample mean is 14.69, the sample standard deviation is 0.858, and the interval estimate for the population mean is 14.0683 to 15.3117. This allows you to conclude with 95% certainty that the population mean is between 14.0683 and 15.3117. This is a correct estimate, because the population mean of 14.978 is included within this interval.

첫 번째 표본의 경우:[eqn: Z SIM 14.69±1.96 {1.003} over {sqrt {10}} =14.69±1.96(0.3172)=14.69±0.6217]

하한=14.0683,  상한=15.3117 이다.

- For sample 15, the sample mean is 15.68, the sample standard deviation is 0.750, and the interval estimate for the population mean is 15.0583 to 16.3017. This is an incorrect estimate, because the population mean of 14.978 is not included within this interval.

6.3 Confidence Interval Estimate for the Mean Using the [eqn: t] Distribution ([eqn: sigma] Unknown)

[eqn: t]분포 이용한 신뢰구간 추정문제

The most common confidence interval estimate involves estimating the mean of a population. In virtually all cases, the population mean is estimated from sample data in which only the sample mean and sample standard deviation - and not the population standard deviation - are available. To sidestep this complication, statisticians have developed the [eqn: t] distribution.

대부분의 현실 세계에서는 모집단의 표준편차는 알려져 있지 않다. 이 경우에는 [eqn: t]분포를 이용한다.

[eqn: t] Distribution

Concept: The sampling distribution that allows you to develop a confidence interval estimate of the mean using the sample standard deviation.

Interpretation: The [eqn: t] distribution assumes that the variable being studied is normally distributed. 표본크기가 충분하고 모집단의 비대칭정도가 심하지 않다면 [eqn: t]를 이용하지 않아도 된다. In practice, however, as long as the sample size is large enough and the population is not very skewed, the [eqn: t] distribution can be used  to estimate the population mean when the population standard deviation [eqn: sigma] is unknown. You should be concerned about the validity of the confidence interval primarily when dealing with a small sample size and a skewed population distribution. The assumption of normality in the population can be assessed by evaluating the shape of the sample data using a histogram, box-and-whisker plot, or normal probability plot.

표본자료의 형태를 히스토그램 등을 이용하여 평가하면 모집단의 정규성 가정을 조사할 수 있다.

Problem 1. You seek to determine the average increase in tuition costs for both in-state and out-of-state students attending public universities during a one-year period for a sample of 67 universities. 역내외 대학생의 수업료 평균 변화를 알아보고자 한다.

Changes in Tuition for In-State Students for a sample of 67 Universities

638  176  617  116  876  609  1442  303  604  274  642  462  572  676  274  359  1522  1202  490  243  236  448  434  210  1324  291  454  280  836  1048  1021  116  364  534  353  730  658  918  0  79  1010  312  861  625  794  308  738  802  1006  312  262  1750  144  1100  711  189  616  70  1001  354  1121  394  220  303  792  642  494

Changes in Tuition for Out-of-State Students for a sample of 67 Universities

1730  1660  890  703  1038  1975  3353  1627  1413  2171  1802  1868  700  1665  721  677  1426  1380  1892  784  750  1702  434  912  1718  743  1747  1568  0  1308  1270  116  994  1194  1015  1082  738  1452  1300  1124  1008  672  2333  1157  2012  1058  1754  1246  996  690  2694  2380  518  1600  71  1489  747  843  3273  2473  1497  2051  847  265  1533  1204  776

The confidence interval estimate of an population mean prepared in Microsoft Excel for the average change in tuition costs for in-state students and the average change in tuition costs for out-of-state students is as follows:

Confidence Interval Estimate for the Mean
Data	In-Sate	Out-of-State
Sample Standard Deviation	378.8789	670.5598
Sample Mean	587.4925	1320.4328
Sample Size	67	67
Confidence Level	95%	95%
Intermediate Calculations
Standard Error of the Mean	46.2874	81.9219
Degrees of Freedom	66	66
t Value	1.9966	1.9966
Interval Half Width	92.4158	163.5624
Confidence Interval	In-State	Out-of-State
Interval Lower Limit	495.0767	1156.8704
Interval Upper Limit	679.9084	1483.9952

To evaluate the assumption of normality necessary to use these estimates, you develop box-and-whisker plots for the in-state and the out-of-state tuition increase .

Box-and-Whisker Plot for Tuition Study Data. 아래 여백에 Box-and-Whisker 그림을 나타내 보자.

Note that the box-and-whisker plots contain a long tail on the right, indicating right-skewness due to some large changes in tuition. However, you can also observe that for both of the box-of-whisker plots, the values in the box between the first and third quartiles are symmetric. Given the relatively large sample size, you can conclude that any departure from the normality assumption will not seriously affect the validity of the confidence interval estimate. Based on the results, with 95% confidence you can conclude that the average change in tuition costs for in-state students is between 495.08 and 679.91 and between 1156.87 and 1484.00 for out-of-state students. You conclude that tuition costs have increased by different amounts for the two groups of students.

You include the new symbol [eqn: t sub n-1], which represents the critical value of the [eqn: t] distribution with [eqn: n-1] degrees of freedom for an area of [eqn: alpha/2] in the upper tail, to write the formula for the confidence interval for the mean in cases in which the population standard deviation, [eqn: sigma], is unknown. For the symbol [eqn: t sub n-1]: [eqn: alpha] is equivalent to 1 minus the confidence percentage. For 95% confidence, [eqn: alpha] is 0.05(=1-0.95), so the upper tail area is 0.025.

Using these symbols creates the following equation:   [eqn: bar X +- t sub n-1 S over sqrt {n}]

or expressed as a range  [eqn: bar X - t sub n-1 S over sqrt {n} <= mu <= bar X + t sub n-1 S over sqrt {n}]

For the Problem 1, [eqn: bar X = 587.4925] and [eqn: S=378.8789], and because the sample size is 67, there is 66 degrees of freedom. Given 95% confidence, [eqn: alpha] is 0.05, and the area in the upper tail of the [eqn: t] distribution is 0.025 (=0.05/2).  Using the Appendix Table, the critical value for the row with 66 degrees of freedom and the column with an area of 0.025 is 1.9966. Substituting these values yields the following result:

[eqn: bar X +- t sub n-1 S over sqrt {n} = 587.4925 +-(1.9966) 378.8789 over sqrt {67} = 587.4925+-92.4158]	[eqn: 495.08 <=mu <= 679.91]

The interval is estimated to be between 495.08 and 679.91 with 95% confidence.

6.4 Confidence Interval Estimation for the Proportion 표본비율 신뢰구간추정

A confidence interval estimate for a categorical variable can be developed to estimate the proportion of successes in a given category. Instead of using the sample mean to estimate the population mean, you use the sample proportion of successes, equal to the number of successes divided by the sample size, to estimate the population proportion. The sample statistic [eqn: p] follows a binomial distribution which can be approximated by the normal distribution for most studies.

For a given sample size, confidence intervals for proportions are wider than those for numerical variables. With continuous variables, the measurement on each respondent contributes more information than for a categorical variable. In other words, a categorical variable with only two possible values is a very crude measure compared with a continuous variable, so each observation contributes only a little information about the parameter being estimated.

Problem 1. You want to estimate the proportion of newspapers that are printed in which a nonconforming attribute is present (such as excessive rub-off, improper page setup, missing pages, or duplicate pages). You select a random sample of 200 newspapers and discover that 35 contain some type of nonconformance. 신문인쇄 불량률 조사. 200중 35개

Based on the 95% confidence interval estimate prepared in Microsoft Excel for the percentage of nonconforming newspapers, you estimate that between 12.2% and 22.8% of the newspapers printed have some type of nonconformance.

Confidence Interval Estimate for the Proportion
Data
Sample Size	200
Number of Successes	35
Confidence Level	95%
Intermediate Calculations
Sample Proportion	0.1750
Z Value	-1.9600
Standard Error of the Proportion	0.0269
Interval Half Width	0.0527
Confidence Interval
Interval Lower Limit	0.1223
Interval Upper Limit	0.2277

You take the new symbol [eqn: p](sample proportion of success), and  the symbol [eqn: pi] for the population proportion, to assemble the equation for the confidence interval estimate for the proportion:

[eqn: p±Z sqrt {{p(1-P)} over {n}}] or expressed as a range  [eqn: p-Z sqrt {{p(1-p)} over {n}} <= pi <= p+Z sqrt {{p(1-P)} over {n}}]

For the Problem 1, [eqn: n=200], and [eqn: p=35/200=0.175]. For a 95% level of confidence, the lower tail area of 0.025 provides a [eqn: Z] value from the normal distribution of -1.96, and the upper tail area of 0.025 provides a [eqn: Z] value from the normal distribution of +1.96. Substituting these values yields the following result:  [eqn: p±Z sqrt {{p(1-p)} over {n}} =0.175±(1.96) sqrt {{(0.175)(0.825)} over {200}} =0.175±(1.96)(0.0269)# `````````````````````````````````````````````````````````````=0.175±0.053`````````````` THEREFORE `````0.122 <= pi <= 0.228]

The proportion of nonconforming newspapers is estimated to be between 12.2% and 22.8%.

CHAPTER 7 FUNDAMENTALS OF HYPOTHESIS TESTING 가설검정(假說檢定) 기초

Science progresses by first stating tentative explanations, or hypotheses, about natural phenomena and then by proving (or disproving) those explanations through investigation and testing. This scientific method has been adapted by statisticians to an inferential method called hypothesis testing that seeks to evaluate a claim made about the value of a population parameter by using a sample statistic.

가설검정의 목적은 모수에 대한 추정에 있는 것이 아니라 수집된 표본정보가 모수에 대하여 설정된 어떤 가설에 부합하는지의 여부를 가리는 것이다.

7.1 The Null and Alternative Hypotheses 귀무(歸無)/대립(對立)가설

Unlike the broader hypothesis testing of science, statistical hypothesis testing always involves evaluating a claim made about the value of a population parameter. This claim is stated as a pair of statements: the null hypothesis and the alternative hypothesis.

Null hypothesis 귀무(영)가설

Concept: The statement that a population parameter is equal to a specific value, or that the population parameters from two or more groups are equal.

Example: "The population mean time to answer customer complaints was 4 minutes in 2003," "the average height for women is the same as the average height for men," etc.

Interpretation: The null hypothesis always expresses an equality, either between a population parameter and a specific value or between two or more population parameters, and is always paired with another statement, the alternative hypothesis.  You use the symbol [eqn: H sub 0] to identify the null hypothesis and write a null hypothesis using an equal sign and the symbol for the population parameter, as in [eqn: H sub 0 `:` mu = 4] or [eqn: H sub 0 `:` mu sub 1 = mu sub 2], etc. 귀무가설에는 항상 등호.

A null hypothesis is considered true until evidence indicates otherwise. If you can conclude that the null hypothesis is false, then the alternative hypothesis must be true.

Alternative hypothesis 대립(연구)가설.  귀무가설과 여집합 관계

Concept: The statement paired with a null hypothesis that is mutually exclusive to the null hypothesis.

Example: "The population mean time to answer customer complaints was not 4 minutes in 2003," "the average height for women is not the same as the average height for men," etc.

Interpretation: The alternative hypothesis is typically the idea you are studying about your data.  The alternative hypothesis always expresses an inequality, either between a population parameter and a specific value or between two or more population parameters and is always paired with the null hypothesis. You use the symbol [eqn: H sub 1] to identify the alternative hypothesis and write an alternative hypothesis using either a not-equal sign or a less than or greater than sign, along with the symbol for the population parameter, as in [eqn: H sub 1`:` mu!=2] or [eqn: H sub 1 `:` mu sub 1 != mu sub 2], etc.

The alternative hypothesis represents the conclusion reached by rejecting the null hypothesis. You reject the null hypothesis if evidence from the sample statistic indicates that the null hypothesis is unlikely to be true. However, if you cannot reject the null hypothesis, you cannot claim to have proven the null hypothesis. Failure to reject the null hypothesis means (only) that you have failed to prove the alternative hypothesis.

대립가설을 지지할 만한 통계적 증거를 확인. 대립가설과 상반되는 귀무가설을 세우고 귀무가설의 모순을 밝힘으로써 대립가설을 지지하는 형태로 가설검정을 실시.

7.2 Hypothesis Testing Issues

In hypothesis testing, you use the sample statistic to estimate the population parameter named in the null hypothesis. For example, to evaluate the null hypothesis "the population mean time to answer customer complaints was 4 minutes in 2003," you would use the sample mean time to estimate the population mean time. As Chapter 6 establishes, a sample statistic is unlikely to be identical to its corresponding population parameter, and in that chapter you learned to apply sampling distributions to develop an interval estimate for the parameter based on the statistic.

If the sample statistic is not the same as the population parameter, as it almost never is, the issue of whether to reject the null hypothesis involves deciding how dissimilar the sample statistic is to its corresponding population parameter.

Without rigorous procedure that includes a clear operational definition of dissimilarity, you would find it hard to decide on a consistent basis whether a null hypothesis is false and, therefore, whether to reject or not reject the null hypothesis. Statistical hypothesis-testing methods process as the probability of obtaining a given sample statistic, if the null hypothesis were true through the use of a test statistic and a risk factor.

Test Statistic 검정통계량.  가설검정을 위해 사용되는 통계량. 표본평균 -> 모평균

Concept: The value based on the sample statistic and the sampling distribution for the sample statistic.

Example: If you are testing whether the mean of a population was equal to a specific value, the sample statistic is the sample mean. The test statistic is based on the difference between the sample mean and the value of the population mean stated in the null hypothesis. The test statistic follows a statistical distribution called the [eqn: t] distribution.

If you are testing whether the mean of population one is equal to the mean of population two, the sample statistic is the difference between the mean in sample one and the mean in sample two. 두 모평균 동일성 여부 검정.  The test statistic is based on the difference between the mean in sample one and the mean in sample two. This test statistic also follows the [eqn: t] distribution.

Interpretation: The sampling distribution of the test statistic is divided into two regions, a region of rejection (also known as the critical region) and a region of nonrejection. If the test statistic falls into the region of nonrejection, the null hypothesis is not rejected. 기각역(棄却域).

The region of rejection contains the values of the test statistic that are unlikely to occur if the null hypothesis is true. If the null hypothesis is false, these values are likely to occur. Therefore, if you observe a value of the test statistic that falls into the rejection region, the null hypothesis is rejected, because that value is unlikely if the null hypothesis is true.

귀무가설을 기각할 수 있는 검정통계량 값의 범위

To make a decision concerning the null hypothesis, you first determine the critical value of the test statistic that separates the nonrejection region from the rejection region. You determine and deciding on the risk you are willing to take of rejecting the null hypothesis when it is true.

region of

region of               nonrejection            region of

rejection                                       rejection

[eqn: mu sub 1 = mu sub 2]                          [eqn: bar X sub 1 - bar X sub 2]

critical value                   critical value

Practical Significance Versus Statistical Significance  실제 유의성과 통계적 유의성

Another issue in hypothesis testing concerns the distinction between a statistically significant difference and a practically significant difference. Given a large enough sample size, it is always possible to detect a statistically significant difference. This is because no two things in nature are exactly equal. So, with a large enough sample size, you can always detect the natural difference between two populations. You need to aware of the real-world practical implications of the statistical significance.

7.3 Decision-Making Risks 의사결정 오류

In hypothesis testing, you always face the possibility that either you will wrongly reject the null hypotheses or wrongly not reject the null hypothesis. These possibilities are labeled type I and type II errors, respectively. 부분적인 정보를 근거로 모수에 대한 결론을 내리므로 오류 가능성이 항상 존재한다.

Type I Error  제1종의 과오(過誤), 오류  사실인 귀무가설을 기각하는 오류

Concept: The error that occurs if the null hypothesis [eqn: H sub 0] is rejected when in fact it is true and should not be rejected.

Interpretation: The risk, or probability, of a type I error occurring is identified by the Greek lowercase alpha, [eqn: alpha]. 제1종 오류 발생확률=[eqn: alpha], 유의수준 Alpha is also known as the level of significance of the statistical test. Traditionally, you control the probability of a type I error by deciding the risk level [eqn: alpha] you are willing to tolerate of rejecting the null hypothesis when it is true. Because you specify the level of significance before performing the hypothesis test, the risk of committing a type I error, [eqn: alpha], is directly under your control. The most common [eqn: alpha] values are 0.01, 0.05, and 0.10, and researchers traditionally select a value of 0.05 or smaller.

When you specify the value for [eqn: alpha], you determine the rejection region, and using the appropriate sampling distribution, the critical value or values that divide the rejection and nonrejection regions are determined.

Type II Error 제2종의 과오  허위인 귀무가설을 채택하는 (기각하지 못하는) 오류

Concept: The error that occurs if the null hypothesis [eqn: H sub 0] is not rejected when in fact it is false and should be rejected.

Interpretation: The risk, or probability, of a type II error occurring is identified by the Greek lowercase beta, [eqn: beta]. 제2종 오류 발생확률=[eqn: beta]  The probability of type II error depends on the size of the difference between the value of the population parameter stated in the null hypothesis and the actual population value. Unlike the type I error, the type II error is not directly established by you. Because large differences are easier to find, as the difference between the value of the population parameter stated in the null hypothesis and its corresponding population parameter increases, the probability of type II error decreases. Therefore, if the difference between the value of the population parameter stated in the null hypothesis and the corresponding parameter is small, the probability of type II error will be large.

The arithmetic complement of beta, [eqn: 1-beta], is known as the power of the test and represents the probability of rejecting the null hypothesis when it is false and should be rejected.

[eqn: 1-beta]는 검정력

Risk Trade-Off 제1종오류와 제2종오류표

The types of errors and their associated risks are summarized as follows:

Risk and Decisions in Hypothesis Testing

Statistical Decision	Actual Situation
		[eqn: H sub 0] True	[eqn: H sub 0] False
	Do not reject [eqn: H sub 0]	Correct decision confidence=[eqn: 1-alpha]	Type II error P(Type II error)=[eqn: beta]
	Reject [eqn: H sub 0]	Type I error P(Type I error)=[eqn: alpha]	Correct decision power=[eqn: 1-beta]

The probabilities of the two types of errors have an inverse relationship. When you decrease [eqn: alpha], you always increase [eqn: beta] and when you decrease [eqn: beta], you always increase [eqn: alpha].

[eqn: alpha]와 [eqn: beta]는 상충관계

One way in which you can lower [eqn: beta] without affecting the value of [eqn: alpha] is to increase the size of the sample. Larger sample sizes generally permit you to detect even very small differences between the hypothesized and actual values of the population parameter. For a given level of [eqn: alpha], increasing the sample size will decrease [eqn: beta] and therefore increase the power of the test to detect that the null hypothesis [eqn: H sub 0] is false.

In establishing a value for [eqn: alpha], you need to consider the negative consequences of a type I error. If these consequences are substantial, you can set [eqn: alpha=0.01] instead of 0.05 and tolerate the greater [eqn: beta] that results. If the negative consequences of a type II error most concern you, you can select a larger value for [eqn: alpha] (for example, 0.05 instead of 0.01) and benefit from the lower [eqn: beta] that results.

7.4 Performing Hypothesis Testing 가설검정단계 요약

When you perform a hypothesis test, you should follow the steps of hypothesis testing in this order:

① State the null hypothesis, [eqn: H sub 0], and the alternative hypothesis, [eqn: H sub 1] ① 가설 설정

② Evaluate the risk of making type I and II errors, and choose the level of significance, [eqn: alpha], and the sample size as appropriate. ② 유의수준 선택

③ Determine the appropriate test statistic and sampling distribution to use and identify the critical values that divide the rejection and nonrejection regions. ③ 검정통계량 결정

④ Collect the data, calculate the appropriate test statistic, and determine whether the test statistic has fallen into the rejection or the nonrejection region. ④ 자료수집 및 검정. 통계량 계산, 임계치와 비교.

⑤ Make the proper statistical inference. Reject the null hypothesis if the test statistic falls into the rejection region. Do not reject the null hypothesis if the test statistic falls into the nonrejection region. ⑤ 의사결정

The [eqn: P-]value Approach to Hypothesis Testing  [eqn: P-]값에 의한 가설검정

Most modern statistical software, including the functions found in Microsoft Excel and statistical calculators, can compute a probability value known as the [eqn: P-]value that you can use as a second way of drawing the proper statistical inference during hypothesis testing.

[eqn: P-]값을 제시함으로써 여러 개의 유의수준과 비교하는 것이 더 효과적인 가설검정 방법.

[eqn: P-]Value

Concept: The probability of obtaining a test statistic equal to or more extreme than the result obtained from the sample data, given that the null hypothesis [eqn: H sub 0] is true.

[eqn: P-]값은 귀무가설이 사실이라는 전제하에 표본에서 얻은 통계량 값과 같거나 더 큰 통계량을 얻을 확률.

Interpretation: The [eqn: p-]value is the smallest level at which [eqn: H sub 0] can be rejected for a given set of data. You can consider the [eqn: p-]value the actual risk of having a type I error for a given set of data. Using [eqn: p-]values, you reject the [eqn: H sub 0] if the [eqn: p-]value is less than [eqn: alpha] and do not reject [eqn: H sub 0] if the [eqn: p-]value is greater than or equal to [eqn: alpha]. Many people confuse this rule, mistakenly believing that a high [eqn: p-]value is grounds for rejection. You can avoid this confusion by informally remembering that "if the [eqn: p-]value is low, then [eqn: H sub 0] must go."

In practice, most researchers today use [eqn: p-]values for several reasons, including efficiency of the presentation of results. The [eqn: p-]value is also known as the observed level of significance. When using [eqn: p-]values, you can restate the steps of hypothesis testing as follows:  [eqn: P-]값=관찰된 유의수준

① State [eqn: H sub 0], and [eqn: H sub 1].

② Evaluate the risks of making type I and II errors, and choose the level of significance, [eqn: alpha], and the sample size as appropriate.

③ Collect the data and calculate the sample value of the appropriate test statistic

④ Calculate the [eqn: p-]value based on the test statistic and compare the [eqn: p-]value to [eqn: alpha].

⑤ Make the proper statistical inference. Reject [eqn: H sub 0] if the [eqn: p-]value is less than [eqn: alpha]. Do not reject [eqn: H sub 0] if the [eqn: p-]value is greater than or equal to [eqn: alpha].

[eqn: P-]값이 [eqn: alpha]보다 작으면 귀무가설을 기각한다.

7.5 Types of Hypothesis Tests 가설검정의 유형

Your choice of which statistical test to use when performing hypothesis testing is influenced by the following factors:  가설검정 시 어떤 검정을 할 것인가는 다음에 의존:

- Number of groups of data: one, two, or multiple  자료집단 개수

- Relationship stated in [eqn: H sub 1]: not equal to or inequality  대립가설의 형태

- Type of variable (population parameter): numerical (mean) or categorical (proportion)

변수의 유형

Number of Groups 단일표본 검정, 복수표본 검정

One group of hypothesis tests, more formally known as one-sample test, are of limited practical use, because if you are interested in examining the value of a population parameter, you can usually use one of the confidence interval estimate methods of Chapter 6. Two-sample tests, examining the differences between two groups, have been the focus of this chapter and can be found in the Problems of Section 8.1 through 8.3. Tests for more than two groups are discussed in Chapter 9.

Relationship Stated in [eqn: H sub 1]	[eqn: H _{1} `:` mu _{1} != mu _{2}] 양측검정

[eqn: H _{1} `:` mu _{1} > mu _{2}] 단측검정, 우측 (또는 좌측)검정

[eqn: H sub 1] can be stated either using the not-equal sign, as in, [eqn: H sub 1`:`mu sub 1 != mu sub 2]; or by using an inequality, such as [eqn: H sub 1 `:` mu sub 1 > mu sub 2]. Alternative hypotheses that use the not-equal sign require you to perform what statisticians call a two-tail test; alternative hypotheses that consist of an inequality require that you perform what statisticians call a one-tail test.

One-tail and two-tail test procedures are very similar and differ mainly in the way they use critical values to determine the region of rejection. Throughout this book, two-tail hypothesis tests are featured.

Types of Variable 수치적 자료와 범주별 자료

The type of variable, numerical or categorical, also influences the choice of hypothesis test used. For a numerical variable, the test will examine the population mean or the differences among the means, if two or more groups are used. For a categorical variable, the test will examine the population proportion or the differences among the population proportions if two or more groups are used. Tests involving two groups for each type of variable can be found in the Problems of Section8.1 through 8.3.  Tests involving more than two groups for each type of variable are featured in Chapter 9.

CHAPTER 8 HYPOTHESIS TESTING: [eqn: Z] AND [eqn: t] TESTS  [eqn: Z] 검정과 [eqn: t] 검정

In Chapter 7, you learned about the fundamentals of hypothesis testing. In this chapter, you will learn about tests that involve two groups, more formally known as two-sample tests. You will also learn how to evaluate the statistical assumptions behind these tests - what to do if the assumptions do not hold - as well as learn how to choose the appropriate test for any two-group set of data.

8.1 Testing for the Difference Between Two Proportions  두 비율의 차이 검정

Often you want to analyze differences between two groups in the proportion of items that are in a particular category. The sample statistics needed to analyze these differences are the proportion of occurrences in group 1 and the proportion of occurrences in group 2. With a sufficient sample size in each group, the sampling distribution of the difference between the two proportions approximately follows a normal distribution.

Problem 1. The following table presents the joint responses of whether a specific wafer was "good" or "bad" and whether that wafer had particles present on it (see page 8).

예: p.8의 예를 다시 볼 것

Counts of Particles Found Cross-Classified by Wafer Condition

	Wafer Condition Good Bad	Total
Particles Found Yes No	14 36 320 80	50 400
Total	334 116	450

Of 334 wafers that were classified as good, 320 had no particles found on the dye that produced the wafer. Of 116 wafers that were classified as bad, 80 had no particles found on the dye that produced the wafer. You seek to determine whether the proportion of wafers with no particles is the same for good and bad wafers using a level of significance of [eqn: alpha=0.05].

For these data, the proportion of good wafers without particle is 320/334=0.9581 and the proportion of bad wafer without particle is 80/116=0.6897

Because the number of good and bad wafers that have nno particles is large, the sampling distribution of the difference between the two proportions is approximately normally distributed. The null and alternative hypotheses are as follows:

[eqn: H sub 0 `:` pi sub 1 = pi sub 2] (no difference between the proportions for the two groups)

[eqn: H sub 1`:` pi sub 1 != pi sub 2] (a difference between the proportions for the two groups)

Microsoft Excel results for the manufacturing plant study are as follows:

Z Test for the Difference in Two Proportions
Data
Hypothesized Difference	0
Level of Significance	0.05
Group 1
Number of Successes	320
Sample Size	334
Group 2
Number of Successes	80
Sample Size	116

Intermediate Calculations
Group 1 Proportion	0.9581
Group 2 Proportion	0.6897
Difference in 2 Proportions	0.2684
Average Proportion	0.8889
Z Test Statistic	7.9254
Two-Tail Test
Lower Critical Value	-1.9600
Upper Critical Value	1.9600
p-Value	0.0000
Reject the null hypothesis

[eqn: p-]값=0.0000은 7.93보다 더 큰 [eqn: Z]값을 구할 확률은 결국 0이라는 것을 말한다. 이 [eqn: p-]값은 유의수준 [eqn: alpha =0.05]보다 적으므로 귀무가설을 기각할 수 있다.

You decide to use the critical value approach. With a level of significance of 0.05, the lower tail area is 0.025, and the upper tail area is 0.025. Using the cumulative normal distribution table, the lower critical value of 0.025 corresponds to a [eqn: Z] value of -1.96, and an upper critical value of 0.025 (cumulative area of 0.975) corresponds to [eqn: Z] value of +1.96, as shown in the following diagram:

Region

rejection region        of nonrejection        rejection region

-1.96            0            +1.96

Given these regions, you will reject [eqn: H sub 0] if [eqn: Z < -1.96] or [eqn: Z > +1.96]; otherwise you will not reject [eqn: H sub 0].  The above calculations determine that the [eqn: Z] test statistic is 7.93. Because [eqn: Z=7.93] is greater than the upper critical value of +1.96, you reject the null hypothesis. You report that there is evidence of a difference in the proportion of good and bad wafers that have no particles.

Problem 2. You seek to analyze the results of a famous health-study experiment that investigated the effectiveness of aspirin in the reduction of the incidence of heart attacks, using a level of significance of [eqn: alpha=0.05].  In this experiment, 22,071 male US physicians were randomly assigned to either a group that was given one 325mg buffered aspirin tablet every other day or a group that was given a placebo (a pill that contained no active ingredients). Of 11,037 physician taking aspirin, 104 suffered heart attacks during the 5-year period of the study. An additional 11,034 physicians were assigned to a group that took a placebo every other day. The results of this study were as follows:

문제 2. [eqn: H _{0} `:` pi _{1} = pi _{2}], [eqn: H _{1} `:` pi _{1} != pi _{2}] 를 [eqn: alpha =0.05]에서 검정하라.

		Study Group Aspirin Placebo	Totals
Results	Heart attack No heart attack	104 189 10,933 10,845	293 21,778
	Totals	11,037 11,034	22,071

The previous Problems use the [eqn: Z] test for the difference between two proportions. You need the symbols for he number of successes, [eqn: X], the sample size, [eqn: n], sample proportions, [eqn: p], and population proportions, [eqn: pi], as well as the symbol for the pooled estimate of the population proportion, [eqn: bar p], to express the [eqn: Z] test statistic calculation as an equation.

You first define the symbols for equations for the pooled estimate of the population proportion and the sample proportions for the two groups: [eqn: bar p = {X sub 1 + X sub 2 } over {n sub 1 + n sub 2 }]    [eqn: p sub 1 = X sub 1 over n sub 1]     [eqn: p sub 2 = X sub 2 over n sub 2]

미지의 모 비율에 대한  통합 추정치 [eqn: bar{p}] 로는 두 표본비율의 가중 평균치를 사용함.

You next use the just defined [eqn: bar{p} `,`p _{1} `,`p _{2}] along with the symbols for the sample sizes and population proportion to form the equation for the [eqn: Z] test for the difference between two proportions: [eqn: Z`=`{(p sub 1 - p sub 2 ) `-` ( pi sub 1 - pi sub 2 )} over sqrt { bar p (1- bar p ) [ 1 over n sub 1 + 1 over n sub 2 ]}]  검정통계량 공식

As an example, the calculations for determining the [eqn: Z] test statistic for the manufacturing plat study problem, (with [eqn: alpha=0.05], reject [eqn: H sub 0] if [eqn: Z < - 1.96] or [eqn: Z > 1.96]; otherwise do not reject [eqn: H sub 0]) are as follows:

[eqn: p sub 1 = X sub 1 over n sub 1 = 320 over 334 = 0.9581 ``````````p sub 2 = X sub 2 over n sub 2 = 80 over 116 = 0.6897]

and	[eqn: bar p = {X sub 1 + X sub 2 } over { n sub 1 + n sub 2 } = {320 + 80} over {334 + 116} = 0.8889]

so that	[eqn: Z`=` {(p _{1} -p _{2} )`-`( pi _{1} - pi _{2} )} over {sqrt {bar{p} (1- bar{p} )[ {1} over {n _{1}} + {1} over {n _{2}} ]}} `=` {0.9581-0.6897)-0} over {sqrt {0.8889(1-0.8889)[ {1} over {334} + {1} over {116} ]}}# `````=` o.2684 over sqrt { 0.0011456} = {0.2684} over {0.03385} =7.93]

Because [eqn: Z=7.93] is greater than the upper critical value of 1.96, reject the null hypothesis.

8.2 Testing for the Difference Between the Means of Two Independent Groups

두 독립적인 집단의 평균 차이 검정

Many studies compare a numerical population parameters of two populations or groups. Statisticians distinguish between using two independent groups, the meaning of groups as previously defined in this chapter, and two related groups, in which the observations are matched according to a relevant characteristic or repeated measurements of the same items are taken. For studies involving two independent groups, the most common test of hypothesis used is the pooled-variance [eqn: t] test.

두 독립적인 모집단의 경우 가장 일반적인 검정은 통합분산 [eqn: t] 검정

Pooled-Variance [eqn: t] Test  통합분산 [eqn: t] 검정

Concept: The hypothesis test for the difference between the population means of two independent groups that requires that the sample variances of each group be combined ("pooled") into one estimate of the variance common in the two groups.

두 집단의 표본분산을 하나의 공통분산 추정치로 통합

Interpretation: For this test, the test statistic is based on the difference in the sample means of the two groups, and the sampling distribution for the difference in the two sample means approximately follows the [eqn: t] distribution.

두 모평균을 비교할 때 만약 모분산을 모르고 또 소표본이라면, [eqn: t]분포를 이용한다.

(단, 두 모집단 정규분포를 따르고 두 모분산은 동일하다고 가정한다)

In a pooled variance [eqn: t] test, the null and the alternative hypotheses are:

[eqn: H sub 0`:` mu sub 1 = mu sub 2] (The two population means are equal)

[eqn: H sub 1 `:` mu sub 1 != mu sub 2] (The two population means are not equal)

Problem 1. You seek to determine at a level of significance of [eqn: alpha=0.05] whether the average surface hardness of steel intaglio printing plates prepared using a new treatment differs from the average hardness of plates that are untreated. You review the following results of an experiment in which 40 steel plates, 20 treated ad 20 untreated, were tested for surface hardness.

예: 40개의 철판 중 신 처리공법에 의한 철판과 그렇지 않은 것들 간의 평균에 차이가 있는지 여부를 검정.

Surface Hardness of 20 Untreated and 20 treated Steel Plates

Untreated:

164.368  177.135  159.018  163.903  153.871  167.802  165.096  160.818  157.184  167.433

154.496  163.538  160.920  164.525  164.917  171.230  169.091  174.964  175.276  166.311

Treated:

158.239  150.226  138.216  155.620  168.006  151.233  149.654  158.653  145.456  151.204

168.178  150.869  154.321  161.657  162.763  157.016  161.020  156.670  167.706  147.920

Microsoft Excel results for the printing plates study are as follows:

t-Test: Two-Sample Assuming Equal Variances
	Untreated	Treated
Mean	165.0948	155.73135
Variance	41.6934	62.4141
Observations	20	20
Pooled Variance	52.0537
Hypothesized Mean Difference	0
df	38
t Stat	4.1040
P(T<t) one tail	0.0001
t critical one-tail	1.6859
P(T<t) two-tail	0.0002
t Critical two-tail	2.0244

Calculations determine that the [eqn: t] statistic (labeled as "t Stat" in the Excel results) is 4.1040 and the [eqn: p-]value (labeled as "P(T<t) two-tail" is 0.0002. Because the [eqn: p-]value is 0.0002, which is less than [eqn: alpha=0.05], the null hypothesis is rejected. This means that the chance of obtaining a [eqn: t] value greater than 4.1040 is virtually zero (0.0002). You conclude that the mean surface hardness is higher for the untreated steel plates than for the treated steel plates.

The previous Problems use the pooled variance [eqn: t] test for the difference between the population means of two independent groups. You need the symbol for the pooled estimate of the variance, [eqn: S sub p sup 2], to express the [eqn: t] test statistic calculation as an equation.

To write the [eqn: t] test statistic equation, you first define the symbols for the equation for the pooled estimate of the population variance:

[eqn: S sub p sup 2 `=` {( n sub 1 - 1) S sub 1 sup 2 + (n sub 2 - 1) S sub 2 sup 2 } over {(n sub 1 - 1 ) + (n sub 2 -1 )}]  통합분산 공식

You next use the just defined [eqn: S sub p sup 2] and the symbols for the sample means, the population means, and the sample sizes to form the equation for the pooled- variance [eqn: t] test for the difference between two means:

[eqn: t`=` {( {bar X} sub 1 - {bar X} sub 2 ) - (mu sub 1 - mu sub 2 )} over { sqrt { S sub p sup 2 ``( 1 over n sub 1 + 1 over n sub 2 )}]  검정통계량

The calculated test statistic [eqn: t] follows a [eqn: t] distribution with [eqn: n sub 1 + n sub 2 - 2] degrees of freedom.

As an example, the calculations for Problem 1, with [eqn: alpha=0.05], are as follows:

[eqn: S sub p sup 2 `=` {( n sub 1 - 1) S sub 1 sup 2 + (n sub 2 - 1) S sub 2 sup 2 } over {(n sub 1 - 1 ) + (n sub 2 -1 )}`=` {19(41.6934) + 19(62.4141)} over {19+19} = 52.05375]

Using 52.05375 as the value for [eqn: S sub p sup 2] in the original equation

[eqn: t`=` {( {bar X} sub 1 - {bar X} sub 2 ) - (mu sub 1 - mu sub 2 )} over { sqrt { S sub p sup 2 ``( 1 over n sub 1 + 1 over n sub 2 )}} = {(165.0948-155.7313) -0} over {sqrt{52.05375 ( 1 over 20 + 1 over 20 )}} = 9.36345 over sqrt {5.205375}} = 4.104]

Using the [eqn: alpha=0.05] level of significance, with 38 degrees of freedom, the critical value of [eqn: t] is 2.0244 (0.025 in the upper tail of the [eqn: t] distribution). Because[eqn: t=4.104 > 2.0244], you reject [eqn: H sub 0].

Pooled-Variance [eqn: t] Test Assumptions  통합분산 [eqn: t]검정 가정

In testing for the difference between the means, you assume that the populations from which the two independent samples are drawn are normally distributed with equal variances. For situations in which the two populations have equal variances, the pooled-variance [eqn: t] test is not sensitive to moderate departures from this assumption, provided that the sample sizes are large. In such situations, the pooled-variance [eqn: t] test can be used without serious effect on its power.  두 모집단 정규분포 가정, 두 모집단의 분산 동일.

To check the assumption of normality in each of the two groups, you can prepare a side-by-side box-and-whisker plot similar to the following plot:

정규분포 가정을 확인하려면, box-and-whisker를 이용한다.

Treated

Untreated

130      140      150      160      170      180      190      200

In this box-and-whisker plot, the lower tail for the treated group is longer than the upper tail. You can conclude, however, that there appears to be only moderate departure from normality. Therefore, the assumption of normality needed for the [eqn: t] test is not seriously violated.  앞 그림에서 처리공정에 대한 왼쪽꼬리는 우측꼬리보다 길지만 정규분포가정이 크게 위배되지 않은 것으로 간주.

If the data in each group cannot be assumed to be from normally distributed populations, two choices exist. A nonparametric procedure, such as the Wilcoxon rank sum test, can be used that does not depend on the assumption of normality for the two populations, or a transformation on each of the outcomes can be made and the pooled-variance [eqn: t] test can then be used.

The pooled-variance [eqn: t] test also assumes that the population variances are equal. If this assumption cannot be made, the pooled-variance [eqn: t] test is inappropriate. Instead, the separate-variance [eqn: t] test is used. Although the computations for the separate-variance [eqn: t] test are cumbersome, Microsoft Excel can be used to perform them.

두 모집단 분산 동일성 가정을 하지 않으면 통합분산 [eqn: t]은 부적당

8.3 Paired [eqn: t] Test  대응(對應)표본에 의한 두 모평균의 비교

The tests for the pooled variance [eqn: t] test and the difference between two population proportions were based on differences between two independent groups. Often, data are obtained from observations in which the groups are related.

지금까지는 독립적인 집단을 취급하였지만, 두 집단이 서로 연관되어 있는 경우도 있다

Two approaches that involve related data between groups are possible. In one approach, you pair, or match, the items or individuals under study according to some other variable. For example, in testing whether a new drug treatment lowers blood pressure, a sample of patients could be paired according to their blood pressure at the beginning of the study. For example, assuming there were two patients in the study who had a diastolic blood pressure of 140, one would be randomly assigned to the new drug, and the other would be assigned to either a placebo or an old drug. Assigning patients in this manner allows the experimenter to factor out the initial effect of the patient's blood pressure so the analysis can focus on the difference between the drugs.

두 가지 방법:

신 약품처방과 고혈압의 예에서 첫째, 수축기 혈압이 140인 두 사람: 한명에게는 신약을 다른 한 명에겐 위약(僞藥)을 무작위로 처방하면 약품간의 차이에 초점을 둘 수 있다

In the second approach, repeated measurements are obtained from the same set of items or individuals. This approach is based on the theory that the same items or individuals will behave alike if treated alike. The objective of the analysis is to show that any differences between two measurements of the same items or individuals are due to different treatment conditions. For example, when performing an experiment on the effect of a diet, each person can be used as his or her own control so that repeated measurements on the same people are obtained. One measurement is taken just prior to starting the diet and the other measurement is taken at the end of a specified time period.

둘째, 반복적인 측정을 하는 것. 동일한 대상의 두 측정치간의 차이는 서로 다른 처리조건에 따른다는 것이다.  예: 다이어트 효과 실험

In either approach, the variable of interest is the difference between the values of the paired items or individuals rather than the values themselves, stated algebraically as follows:

관심변수는 짝(쌍)을 이루는 것들의 값의 차이.  차이 = 제1표본 관련된 값 - 제2표본 관련된 값

Difference (D) = Related value in Sample 1 - Related value in Sample 2

With related groups and a numeric variable of interest, the null hypothesis become that there is no difference in the population means of the two related groups, and the alternative hypothesis becomes that there is a difference in the population means of the two related groups. Using the symbol [eqn: mu sub D] ([eqn: mu _{D}]는 모평균의 차이를 나타냄) to represent the difference between the population means, the null and alternative hypotheses can be expressed as follows:  [eqn: H sub 0 `:` mu sub D `=`0]  and [eqn: H sub 1 `:` mu sub D !=0].

To decide whether to reject the null hypothesis, you use a paired [eqn: t] test.

Problem 1. You seek to determine, using a level of significance of [eqn: alpha=0.05], whether there is a difference between the Doppler echocardiography measurements of 23 patients as taken by two different observers. Study data for this problem is as follows: 두 관찰자의 측정치자료

----------------------------------------------------------

Patients	Observer A	Observer B	Difference (D)

----------------------------------------------------------

1	4.8	5.8	-1.0

2	5.6	6.1	-0.5

3	6.0	7.7	-1.7

4	6.4	7.8	-1.4

5	6.5	7.6	-1.1

6	6.6	8.1	-1.5

7	6.8	8.0	-1.2

8	7.0	8.1	-1.1

9	7.0	6.6	0.4

10	7.2	8.1	-0.9                대응표본의 자료구조

11	7.4	9.5	-2.1

12	7.6	9.6	-2.0

13	7.7	8.5	-0.8

14	7.7	9.5	-1.8

15	8.2	9.1	-0.9

16	8.2	10.0	-1.8

17	8.3	9.1	-0.8

18	8.5	10.8	-2.3

19	9.3	11.5	-2.2

20	10.2	11.5	-1.3

21	10.4	11.2	-0.8

22	10.6	11.5	-0.9

23	11.4	12.0	-0.6

----------------------------------------------------------

Because the two observers measure the same set of patients, the two groups of measurements are related and the differences between the two groups are tested.  Excel results for this study are as follows:  두 관찰자는 동일한 환자들을 대상으로 함

t-Test: Paired Two Sample for Means
	Observer A	Observer B
Mean	7.8000	9.0304
Variance	2.8027	3.2213
Observations	23	23
Pearson Correlation	0.9346
Hypothesized Mean Difference	0
df	22
t Stat	-9.2421
P(T<=t) one-tail	0.0000
t Critical one-tail	1.7171
P(T<=t) two-tail	0.0000
t Critical two-tail	2.0739

Calculation done determine that the [eqn: t] statistic (labeled as t Stat) is -9.2421 and the [eqn: p-]value is 0.0000. Because the [eqn: p-]value is less than [eqn: alpha=0.05], you reject the null hypothesis. This means that the chance of obtaining a [eqn: t] value less than -9.24 is virtually zero. You conclude that there is a difference between the observers.

You need the symbols for the difference between the population arithmetic means, [eqn: mu _{D}], the sample standard deviation, [eqn: S _{D}], the subscribed symbol for the  differences in the paired values, [eqn: D _{i}], and the symbol for the average difference, [eqn: bar{D}], to express the [eqn: t] test statistic calculation as an equation. To write the [eqn: t] statistic equation, you first define the symbols for the equation for the average difference, [eqn: bar{D}]:  [eqn: bar{D} `=` {sum _{i=1} ^{n} D _{i}} over {n}]

Next, use [eqn: bar{D}], the symbols for the sample size, and the differences in the paired values to form the equation for the sample standard deviation, [eqn: S _{D}]:  [eqn: S _{D} `=` sqrt {{sum _{} ^{} (D _{i} - bar{D} )sup 2} over {n-1}}]

Finally, assemble the above two symbols and the remaining symbols to form the equation for the paired [eqn: t] test for the difference between two related means:  [eqn: t`=` {bar{D} - mu _{D}} over {{S _{D}} over {sqrt {n}}}]

The test statistic [eqn: t] follows a [eqn: t] distribution with [eqn: n-1] degrees of freedom.

As an example, the calculations for determining the [eqn: t] test statistic for the two observers problem, with [eqn: alpha =0.05], as follows:  [eqn: bar{D} `=` {sum _{i=1} ^{n} D _{i}} over {n} = {-28.3} over {23} =-1.23]

This makes [eqn: S _{D} =0.638]. Substituting these values produces the following:

[eqn: t`=` {bar{D} - mu _{D}} over {{S _{D}} over {sqrt {n}}} `=` {-1.23-0} over {{0.638} over {sqrt {23}}} `=`-9.24]

Using [eqn: alpha =0.05], with 23-1=22 degrees of freedom, the critical value of [eqn: t] is -2.0739 (0.025 in the lower tail of the [eqn: t] distribution). Because [eqn: t=-9.24<-2.0739], you reject the null hypothesis.

Problem 2. You seek to determine whether there are differences in monthly sales between the new package design and the old package design of a laundry stain remover. The new package was test-marketed over a period of one month in a sample of supermarkets in a particular city. A random sample of 10 pairs of supermarkets is matched according to weekly sales volume and a set of demographic characteristics. The data of the test-marketing study is as follows. 세탁세제 신상품과 구상품 월간 매출액 차이를 조사함.

Monthly Sales of Laundry Stain Remover

--------------------------------------------------

Pair	New Package	Old Package	Difference

--------------------------------------------------

1	458	437	21

2	519	488	31

3	394	409	-15

4	632	587	45

5	768	753	15

6	348	400	-52

7	572	508	64

8	704	695	9

9	527	496	31

10	584	513	71

--------------------------------------------------