##
Introduction
Section* *

In this section, we are going to approach constructing the confidence interval and developing the hypothesis test similarly to how we approached those of the difference in two proportions.

There are a few extra steps we need to take, however. First, we need to consider whether the two populations are independent. When considering the sample mean, there were two parameters we had to consider, \(\mu\) the population mean, and \(\sigma\) the population standard deviation. Therefore, the second step is to determine if we are in a situation where the population standard deviations are the same or if they are different.

##
Independent and Dependent Samples
Section* *

It is important to be able to distinguish between an independent sample or a dependent sample.

- Independent sample
- The samples from two populations are
**independent**if the samples selected from one of the populations has no relationship with the samples selected from the other population.

- Dependent sample
- The samples are dependent (also called
**paired data**) if each measurement in one sample is matched or paired with a particular measurement in the other sample. Another way to consider this is how many measurements are taken off of each subject. If only one measurement, then independent; if two measurements, then paired. Exceptions are in familial situations such as in a study of spouses or twins. In such cases, the data is almost always treated as paired data.

The following are examples to illustrate the two types of samples.

##
Example 7-3: Gas Mileage
Section* *

We want to compare the gas mileage of two brands of gasoline. Describe how to design a study involving...

- independent sample
**Answer:**Randomly assign 12 cars to use Brand A and another 12 cars to use Brand B. - dependent samples
**Answer:**Using 12 cars, have each car use Brand A and Brand B. Compare the differences in mileage for each car.

##
Try it!

- We want to compare whether people give a higher taste rating to Coke or Pepsi. To avoid a possible psychological effect, the subjects should taste the drinks blind (i.e., they don't know the identity of the drink). Describe how to design a study involving independent sample and dependent samples.
- Design involving independent samples
- Design involving dependent samples

**Answer:**Randomly assign half of the subjects to taste Coke and the other half to taste Pepsi.-
**Answer:**Allow all the subjects to rate both Coke and Pepsi. The drinks should be given in random order. The same subject's ratings of the Coke and the Pepsi form a paired data set.

- Compare the time that males and females spend watching TV.
- We randomly select 20 males and 20 females and compare the average time they spend watching TV. Is this an independent sample or paired sample?
- We randomly select 20 couples and compare the time the husbands and wives spend watching TV. Is this an independent sample or paired sample?

**Answer:**Independent Sample-
**Answer:**Paired sample

The two types of samples require a different theory to construct a confidence interval and develop a hypothesis test. We consider each case separately, beginning with independent samples.