Two Sample Tests

8.6.1. Comparing Means of Two Populations

Gnumeric provides four similar tools to test whether the difference of two population means is equal to a hypothesized value. These four tools use the same dialog (see Figure 8-86).

Figure 8-86t- and z-Test Tool Dialog

Depending on the options settings, the appropriate test will be performed. The entries in the Input, Test, and Output frames are independent from the specific test.

Enter the first variable in the Variable 1 Range entry and the second variable in the Variable 2 Range entry.

Enter the hypothesized difference between the population means in the Hypothesized Mean Difference entry, which has a default of 0. Enter the significance level in the Alpha entry, which has a default of 5 %.

Specify the output options as described above. If the output is printed into a range, it should have at least three columns and ten rows.

There are up to three possible options that can be selected:

Paired versus Unpaired

If the variables are dependent (or paired) select the Paired option.

Known versus Unknown

For unpaired or independent variables, the population variances may be known or unknown. In the latter case they will be estimated using the sample variances. Select the Known option if you in fact know the population variances prior to collecting the sample.

Equal versus Unequal

For paired variables with unknown population variances, we may either assume that the population variances are equal or not. If the population variances are assumed to be equal, Gnumeric will estimate the common variance by pooling the sample variances. Select the Equal option to assume that the population variances are equal.

8.6.1.1. t-Test: Paired Two Sample for Means Tool

Figure 8-87t-Test (Paired) Tool Dialog Options

For paired variables, when you click on OK, Gnumeric will test whether the mean of the difference between the paired variables is equal to the given hypothesized mean difference.

Example 8-19Using the t-Test (Paired) Tool

See Figure 8-88 for an example of a completed dialog and Figure 8-89 for the corresponding output.

Figure 8-88t-Test (Paired) Example Data
Figure 8-89Output from the t-Test (Paired) Tool

8.6.1.2. t-Test: Two-Sample Assuming Equal Variances Tool

Figure 8-90t-Test (Equal Variances) Tool Dialog Options

For unpaired variables with unknown but assumed equal population variances, when you click on OK, Gnumeric will test whether the mean of the difference between the paired variables is equal to the given hypothesized mean difference.

Example 8-20Using the t-Test (Unknown but Equal Variances) Tool

See Figure 8-91 for an example of a completed dialog and Figure 8-92 for the corresponding output.

Figure 8-91t-Test (Unknown but Equal Variances) Example Data
Figure 8-92Output from the t-Test (Unknown but Equal Variances) Tool

8.6.1.3. t-Test: Two-Sample Assuming Unequal Variances Tool

Figure 8-93t-Test (Unknown and Unequal Variances) Tool Dialog Options

For unpaired variables with unknown and assumed unequal population variances, when you click on OK, Gnumeric will test whether the mean of the difference between the paired variables is equal to the given hypothesized mean difference.

Example 8-21Using the t-Test (Unknown and Unequal Variances) Tool

See Figure 8-94 for an example of a completed dialog and Figure 8-95 for the corresponding output.

Figure 8-94t-Test (Unknown and Unequal Variances) Example Data
Figure 8-95Output from the t-Test (Unknown and Unequal Variances) Tool

8.6.1.4. z-Test: Two Samples for Means Tool

Figure 8-96z-Test Tool Dialog Options

For unpaired variables with known population variances, enter those variances in the Variable 1 Pop. Variance and Variable 2 Pop. Variance entries. When you click on OK, Gnumeric will test whether the mean of the difference between the paired variables is equal to the given hypothesized mean difference.

Example 8-22Using the z-Test Tool

See Figure 8-97 for an example of a completed dialog and Figure 8-98 for the corresponding output.

Figure 8-97z-Test Example Data
Figure 8-98Output from the z-Test Tool

8.6.2. Comparing Medians of Two Populations

Gnumeric provides three non-parametric tests to test the null hypothesis that the two samples come from populations with the same median. Two tests, performed through the same tool, apply in the case of paired samples:

  • Sign Test
  • Wilcoxon Signed Rank Test

One test applies in the case of unpaired samples:

  • Wilcoxon-Mann-Whitney Test

8.6.2.1. Sign Test

This section describes the two sample (paired) sign test to test the null hypothesis that the two samples come from populations with the same median. The tool to perform a sign test to test the null hypothesis that the single sample comes from a population with a given median is in section Section 8.5.2.1 ― Sign Test.

This section needs to be written.

8.6.2.2. Wilcoxon Signed Rank Test

This section describes the two sample (paired) Wilcoxon signed rank test to test the null hypothesis that the two samples come from populations with the same median. The tool to perform a Wilcoxon signed rank test to test the null hypothesis that the single sample comes from a population with a given median is in section Section 8.5.2.2 ― Wilcoxon Signed Rank Test.

This section needs to be written.

8.6.2.3. Wilcoxon-Mann-Whitney Test

This section needs to be written.

8.6.3. F-Test: Two-Sample for Variances Tool

Figure 8-99F-Test Tool Dialog

Use the F-Test tool to test whether two population variances are different against the null hypothesis that they are not.

Specify the variables in the Variable 1 Range: and Variable 2 Range: entries. The Alpha: entry contains the significance level which is by default 5%.

If the first field of each range contains labels, select the Labels option. The names of the variables will be included in the output table.

The results are given in a table. This table contains the mean, variance, count of observations and the degree of freedom for both variables. The output table also includes the F-value, the one-tailed probability for the F-value, and the F Critical value for one-tailed test and the corresponding values for a two tailed test. The one-tailed probability for the F-value (P(F≤f) one-tail” row) is the probability of making a Type I error in the one-tailed test. Similarly, the two-tailed probability for the F-value (P two-tail row) is the probability of making a Type I error in the two-tailed test. Since in the two-tailed F-Test both critical values are positive, the F Critical two-tail row contains two numbers.

If the output is directed into a specific output range, that range should contain at least three columns and eight rows.

Figure 8-100Some Example Data
Example 8-23Using the F-Test Tool

Figure 8-100 shows some example data and Figure 8-101 the corresponding output.

Figure 8-101F-Test Tool Output