The Difference between Two Means

Formatting Data for Computer Analysis

Most computer programs that compute t tests require your data to be in a specific form. Consider the data in Table 2.

Table 2. Example Data.

Group 1 Group 2
3 2
4 6
5 8

Here there are two groups, each with three observations. To format these data for a computer program, you normally have to use two variables: the first specifies the group the subject is in and the second is the score itself. The reformatted version of the data in Table 2 is shown in Table 3.

Table 3. Reformatted Data.

G Y
1 3
1 4
1 5
2 2
2 6
2 8


To use Analysis Lab to do the calculations, you would copy the data and then

  1. Click the "Enter/Edit Data" button. (You may be warned that for security reasons you must use the keyboard shortcut for pasting data.)
  2. Paste your data.
  3. Click "Accept Data".
  4. Set the Dependent Variable to \mathrm{Y}.
  5. Set the Grouping Variable to \mathrm{G}.
  6. Click the "t-test/confidence interval" button.

The t value is -0.718, the df = 4, and p = 0.512.

Callback before_footer in local_aigrade component should be migrated to new hook callback for core\hook\output\before_footer_html_generation
  • line 7225 of /lib/moodlelib.php: call to debugging()
  • line 7292 of /lib/moodlelib.php: call to {closure}()
  • line 71 of /lib/classes/hook/output/before_footer_html_generation.php: call to get_plugins_with_function()
  • line 987 of /lib/classes/output/core_renderer.php: call to core\hook\output\before_footer_html_generation->process_legacy_callbacks()
  • line 97 of /mod/book/tool/print/index.php: call to core\output\core_renderer->footer()