(Independent samples from two populations)

Hypothesis tests and Confidence Interval calculations are carried
out with the same command.

You need to know which way the data are entered. There are two
possibilities:

1.The data for the two samples are inseparate columns(typical if you did an experiment or observation just for this variable)

2.The data for the two samples are in thesame column, with another column containing a code saying which sample the individual is in [Typical if the data are from a large experiment or study in which many variables are observed on each individual] Procedures for both cases will be disucssed here.

**1. If the data are in two separate columns - one for each sample**
.

**Naming** the columns will be a great help here, because
you will need to remember which population (which sample) you
have first in your alternative hypothesis or in calculating the
difference for the confidence interval.

- 1. Select
**Stat>Basic Statistics>2-Sample t**. - 2. Select (click on the circle next to) "Samples in different columns "
- 3. With the cursor in the box labeled " First " , select (double-click or highlight & then click " Select ") the name (or column) of your first variable (or type the name in the box). Remember that the order matters (must match your alternative hypothesis, or the order in which you want to state your results, for estimation - this is your "X1", if you haven't used better names).
- 4. With the cursor in the box labeled " Second ", select the name of your second variable (or type its name in the box - this is your "X2").
- 5. Click on the
**"Options"**button - 6. If you want a confidence interval for the difference between
the means: type in the confidence level in the "
**Level**" box**and**make sure the "**Alternative**" is set to "**not equal**" - 7. If you want to perform a test on the mean difference: select the alternative hypothesis ("less than" "not equal" or "greater than" in the "Alternative" box - for the one-sided alternatives, make sure the alternative says what you mean (the "First" and "Second" labels matter)
- 8. If you want to test a null hypothesis of the form "Mu(1)
- Mu(2) = K" (rather than the usual Mu(1) = Mu(2)) enter
K in the "
**Test Mean**" box (usually you will leave this at 0.0) - 9. Click "OK" for the "options" window and "OK" for the "2-sample t" window.

**Output in the Session window:**:

- A heading "Two-Sample T-Test and CI: [First sample],[Second sample]"
- A second text line "Two sample T for [first column] vs [second column]"
- A table with data on the two samples: First a heading line identifying the numbers below
- For each variable: the variable name, the sample size (labeled "N"), the sample mean (labeled "Mean"), Sample standard deviation (labeled "StDev") and the (sample) standard error of the mean (StDev/sqrt(N) - labeled "SE Mean).

A statement of which way the comparison is done: "Difference = mu[First] - mu[Second]"

A line "Estimate of difference: [number]" - this is the difference in the sample means (order as specified in the line above).

A line with the confidence interval:

For a standard confidence interval (or if the test is "not equal") "C% confidence interval for difference: ([Lower limit], [Upper limit])

If you performed a test with alternative "greater than" or "less than" : "C% lower bound [or upper bound] for difference [value] " This is the value for which we can say "We can say, with C% confidence that the mean is no less than [no more than] [value]" - this is the cutoff for a one-sided confidence interval (all the risk on one side)."T-Test of difference = 0 [or K, if you put in a K] (vs {">" or "<" or "not ="}): T-value = [number] P-value = [number] DF = [number]" [Degrees of freedom may not be a whole number - Minitab uses the exact calculation rather than our rough rule of thumb]

The printout does not give a yes or no answer - you must determine that, based on the t- or p-value and your decision criteria.

**2. If the data are all in one column, identified by codes
in another column:**

- 1. Select
**Stat>Basic Statistics>2-Sample t**. - 2. Select (click on the circle next to) "Samples in one column"
- 3. With the cursor in the box labeled "Samples" , select (double-click or highlight & then click "Select ") the name (or column) of the column containing the values of the variable you want to test on.
- 4. With the cursor in the box labeled " Subscripts",
select the name of the column that identifies which group the
individual is in..

5. Click on the**"Options"**button - 6. If you want a confidence interval for the difference between
the means: type in the confidence level in the "
**Level**" box**and**make sure the "**Alternative**" is set to "**not equal**" - 7. If you want to perform a test on the mean difference:
select the alternative hypothesis ("less than" "not
equal" or "greater than" in the "Alternative"
box - for the one-sided alternatives, make sure the alternative
says what you mean (the "First" and "Second"
labels matter)
**Note:**The**first entry in the "Subscripts"column**will determine which group is considered "first" and which is "second". This matters if you are testing for "Less than" or "Greater than" - so look at the data to make sure the order the program will use matches the order in your alternative hypothesis. - 8. If you want to test a null hypothesis of the form "Mu(1)
- Mu(2) = K" (rather than the usual Mu(1) = Mu(2)) enter
K in the "
**Test Mean**" box (usually you will leave this at 0.0) - 9. Click "OK" for the "options" window and "OK" for the "2-sample t" window.

**Output in the Session window:**:

- A heading "Two-Sample T-Test and CI: [Variable tested],[Variable indicating groups]"
- A second text line "Two sample T for [Variable]"
- A table with data on the two groups: First a heading line identifying the numbers below
- For each group: the value (for the "subscript" variable) that identifies the group, the sample size (labeled "N"), the sample mean (labeled "Mean"), Sample standard deviation (labeled "StDev") and the (sample) standard error of the mean (StDev/sqrt(N) - labeled "SE Mean).

A statement of which way the comparison is done: "Difference = mu[First label] - mu[Second label]"

A line "Estimate of difference: [number]" - this is the difference in the sample means (order as specified in the line above).A line with the confidence interval:

For a standard confidence interval (or if the test is "not equal") "C% confidence interval for difference: ([Lower limit], [Upper limit])

If you performed a test with alternative "greater than" or "less than" : "C% lower bound [or upper bound] for difference [value] " This is the value for which we can say "We can say, with C% confidence that the difference in the means (First - Second) is no less than [no more than] [value]" - this is the cutoff for a one-sided confidence interval (all the risk on one side)."T-Test of mean difference = 0 [or K, if you put in a K] (vs {">" or "<" or "not ="}): T-value = [number] P-value = [number] DF = [number]"

The printout

does not give a yes or no answer- you must determine that, based on the t- or p-value and your decision criteria.

Last update 8/18/2000

*Maintained by cpeltier@saintmarys.edu*