-
Notifications
You must be signed in to change notification settings - Fork 1
/
Chapter_22.html
1151 lines (1113 loc) · 104 KB
/
Chapter_22.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="" xml:lang="">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>Chapter 22 The t-test | Fundamental statistical concepts and techniques in the biological and environmental sciences: With jamovi</title>
<meta name="description" content="This is an introductory statistics textbook for students in the biological and environmental sciences with examples using jamovi statistical software." />
<meta name="generator" content="bookdown 0.39 and GitBook 2.6.7" />
<meta property="og:title" content="Chapter 22 The t-test | Fundamental statistical concepts and techniques in the biological and environmental sciences: With jamovi" />
<meta property="og:type" content="book" />
<meta property="og:image" content="/img/cover.png" />
<meta property="og:description" content="This is an introductory statistics textbook for students in the biological and environmental sciences with examples using jamovi statistical software." />
<meta name="github-repo" content="bradduthie/stats" />
<meta name="twitter:card" content="summary" />
<meta name="twitter:title" content="Chapter 22 The t-test | Fundamental statistical concepts and techniques in the biological and environmental sciences: With jamovi" />
<meta name="twitter:description" content="This is an introductory statistics textbook for students in the biological and environmental sciences with examples using jamovi statistical software." />
<meta name="twitter:image" content="/img/cover.png" />
<meta name="author" content="A. Bradley Duthie" />
<meta name="date" content="2024-08-06" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<link rel="prev" href="Chapter_21.html"/>
<link rel="next" href="Chapter_23.html"/>
<script src="libs/jquery-3.6.0/jquery-3.6.0.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/fuse.js@6.4.6/dist/fuse.min.js"></script>
<link href="libs/gitbook-2.6.7/css/style.css" rel="stylesheet" />
<link href="libs/gitbook-2.6.7/css/plugin-table.css" rel="stylesheet" />
<link href="libs/gitbook-2.6.7/css/plugin-bookdown.css" rel="stylesheet" />
<link href="libs/gitbook-2.6.7/css/plugin-highlight.css" rel="stylesheet" />
<link href="libs/gitbook-2.6.7/css/plugin-search.css" rel="stylesheet" />
<link href="libs/gitbook-2.6.7/css/plugin-fontsettings.css" rel="stylesheet" />
<link href="libs/gitbook-2.6.7/css/plugin-clipboard.css" rel="stylesheet" />
<link href="libs/anchor-sections-1.1.0/anchor-sections.css" rel="stylesheet" />
<link href="libs/anchor-sections-1.1.0/anchor-sections-hash.css" rel="stylesheet" />
<script src="libs/anchor-sections-1.1.0/anchor-sections.js"></script>
<style type="text/css">
pre > code.sourceCode { white-space: pre; position: relative; }
pre > code.sourceCode > span { display: inline-block; line-height: 1.25; }
pre > code.sourceCode > span:empty { height: 1.2em; }
.sourceCode { overflow: visible; }
code.sourceCode > span { color: inherit; text-decoration: inherit; }
pre.sourceCode { margin: 0; }
@media screen {
div.sourceCode { overflow: auto; }
}
@media print {
pre > code.sourceCode { white-space: pre-wrap; }
pre > code.sourceCode > span { text-indent: -5em; padding-left: 5em; }
}
pre.numberSource code
{ counter-reset: source-line 0; }
pre.numberSource code > span
{ position: relative; left: -4em; counter-increment: source-line; }
pre.numberSource code > span > a:first-child::before
{ content: counter(source-line);
position: relative; left: -1em; text-align: right; vertical-align: baseline;
border: none; display: inline-block;
-webkit-touch-callout: none; -webkit-user-select: none;
-khtml-user-select: none; -moz-user-select: none;
-ms-user-select: none; user-select: none;
padding: 0 4px; width: 4em;
}
pre.numberSource { margin-left: 3em; padding-left: 4px; }
div.sourceCode
{ }
@media screen {
pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; }
}
code span.al { font-weight: bold; } /* Alert */
code span.an { font-style: italic; } /* Annotation */
code span.cf { font-weight: bold; } /* ControlFlow */
code span.co { font-style: italic; } /* Comment */
code span.cv { font-style: italic; } /* CommentVar */
code span.do { font-style: italic; } /* Documentation */
code span.dt { text-decoration: underline; } /* DataType */
code span.er { font-weight: bold; } /* Error */
code span.in { font-style: italic; } /* Information */
code span.kw { font-weight: bold; } /* Keyword */
code span.pp { font-weight: bold; } /* Preprocessor */
code span.wa { font-style: italic; } /* Warning */
</style>
<style type="text/css">
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
</style>
<style type="text/css">
/* Used with Pandoc 2.11+ new --citeproc when CSL is used */
div.csl-bib-body { }
div.csl-entry {
clear: both;
}
.hanging div.csl-entry {
margin-left:2em;
text-indent:-2em;
}
div.csl-left-margin {
min-width:2em;
float:left;
}
div.csl-right-inline {
margin-left:2em;
padding-left:1em;
}
div.csl-indent {
margin-left: 2em;
}
</style>
<link rel="stylesheet" href="style.css" type="text/css" />
</head>
<body>
<div class="book without-animation with-summary font-size-2 font-family-1" data-basepath=".">
<div class="book-summary">
<nav role="navigation">
<ul class="summary">
<li><a href="./">Statistics with jamovi</a></li>
<li class="divider"></li>
<li class="chapter" data-level="" data-path="index.html"><a href="index.html"><i class="fa fa-check"></i>Preface</a>
<ul>
<li class="chapter" data-level="" data-path="index.html"><a href="index.html#structure"><i class="fa fa-check"></i>How this book is structured</a></li>
<li class="chapter" data-level="" data-path="index.html"><a href="index.html#datasets"><i class="fa fa-check"></i>Datasets used in this book</a></li>
<li class="chapter" data-level="" data-path="index.html"><a href="index.html#acknowledgements"><i class="fa fa-check"></i>Acknowledgements</a></li>
<li class="chapter" data-level="" data-path="index.html"><a href="index.html#author"><i class="fa fa-check"></i>About the author</a></li>
</ul></li>
<li class="chapter" data-level="1" data-path="Chapter_1.html"><a href="Chapter_1.html"><i class="fa fa-check"></i><b>1</b> Background mathematics</a>
<ul>
<li class="chapter" data-level="1.1" data-path="Chapter_1.html"><a href="Chapter_1.html#numbers-and-operations"><i class="fa fa-check"></i><b>1.1</b> Numbers and operations</a></li>
<li class="chapter" data-level="1.2" data-path="Chapter_1.html"><a href="Chapter_1.html#logarithms"><i class="fa fa-check"></i><b>1.2</b> Logarithms</a></li>
<li class="chapter" data-level="1.3" data-path="Chapter_1.html"><a href="Chapter_1.html#order-of-operations"><i class="fa fa-check"></i><b>1.3</b> Order of operations</a></li>
</ul></li>
<li class="chapter" data-level="2" data-path="Chapter_2.html"><a href="Chapter_2.html"><i class="fa fa-check"></i><b>2</b> Data organisation</a>
<ul>
<li class="chapter" data-level="2.1" data-path="Chapter_2.html"><a href="Chapter_2.html#tidy-data"><i class="fa fa-check"></i><b>2.1</b> Tidy data</a></li>
<li class="chapter" data-level="2.2" data-path="Chapter_2.html"><a href="Chapter_2.html#data-files"><i class="fa fa-check"></i><b>2.2</b> Data files</a></li>
<li class="chapter" data-level="2.3" data-path="Chapter_2.html"><a href="Chapter_2.html#managing-data-files"><i class="fa fa-check"></i><b>2.3</b> Managing data files</a></li>
</ul></li>
<li class="chapter" data-level="3" data-path="Chapter_3.html"><a href="Chapter_3.html"><i class="fa fa-check"></i><b>3</b> <em>Practical</em>. Preparing data</a>
<ul>
<li class="chapter" data-level="3.1" data-path="Chapter_3.html"><a href="Chapter_3.html#transferring-data-to-a-spreadsheet"><i class="fa fa-check"></i><b>3.1</b> Transferring data to a spreadsheet</a></li>
<li class="chapter" data-level="3.2" data-path="Chapter_3.html"><a href="Chapter_3.html#making-spreadsheet-data-tidy"><i class="fa fa-check"></i><b>3.2</b> Making spreadsheet data tidy</a></li>
<li class="chapter" data-level="3.3" data-path="Chapter_3.html"><a href="Chapter_3.html#making-data-tidy-again"><i class="fa fa-check"></i><b>3.3</b> Making data tidy again</a></li>
<li class="chapter" data-level="3.4" data-path="Chapter_3.html"><a href="Chapter_3.html#tidy-data-and-spreadsheet-calculations"><i class="fa fa-check"></i><b>3.4</b> Tidy data and spreadsheet calculations</a></li>
<li class="chapter" data-level="3.5" data-path="Chapter_3.html"><a href="Chapter_3.html#summary"><i class="fa fa-check"></i><b>3.5</b> Summary</a></li>
</ul></li>
<li class="chapter" data-level="4" data-path="Chapter_4.html"><a href="Chapter_4.html"><i class="fa fa-check"></i><b>4</b> Populations and samples</a></li>
<li class="chapter" data-level="5" data-path="Chapter_5.html"><a href="Chapter_5.html"><i class="fa fa-check"></i><b>5</b> Types of variables</a></li>
<li class="chapter" data-level="6" data-path="Chapter_6.html"><a href="Chapter_6.html"><i class="fa fa-check"></i><b>6</b> Accuracy, precision, and units</a>
<ul>
<li class="chapter" data-level="6.1" data-path="Chapter_6.html"><a href="Chapter_6.html#accuracy"><i class="fa fa-check"></i><b>6.1</b> Accuracy</a></li>
<li class="chapter" data-level="6.2" data-path="Chapter_6.html"><a href="Chapter_6.html#precision"><i class="fa fa-check"></i><b>6.2</b> Precision</a></li>
<li class="chapter" data-level="6.3" data-path="Chapter_6.html"><a href="Chapter_6.html#systems-of-units"><i class="fa fa-check"></i><b>6.3</b> Systems of units</a></li>
</ul></li>
<li class="chapter" data-level="7" data-path="Chapter_7.html"><a href="Chapter_7.html"><i class="fa fa-check"></i><b>7</b> Uncertainty propagation</a>
<ul>
<li class="chapter" data-level="7.1" data-path="Chapter_7.html"><a href="Chapter_7.html#adding-or-subtracting-errors"><i class="fa fa-check"></i><b>7.1</b> Adding or subtracting errors</a></li>
<li class="chapter" data-level="7.2" data-path="Chapter_7.html"><a href="Chapter_7.html#multiplying-or-dividing-errors"><i class="fa fa-check"></i><b>7.2</b> Multiplying or dividing errors</a></li>
</ul></li>
<li class="chapter" data-level="8" data-path="Chapter_8.html"><a href="Chapter_8.html"><i class="fa fa-check"></i><b>8</b> <em>Practical</em>. Introduction to jamovi</a>
<ul>
<li class="chapter" data-level="8.1" data-path="Chapter_8.html"><a href="Chapter_8.html#summary_statistics_02"><i class="fa fa-check"></i><b>8.1</b> Summary statistics</a></li>
<li class="chapter" data-level="8.2" data-path="Chapter_8.html"><a href="Chapter_8.html#transforming_variables_02"><i class="fa fa-check"></i><b>8.2</b> Transforming variables</a></li>
<li class="chapter" data-level="8.3" data-path="Chapter_8.html"><a href="Chapter_8.html#computing_variables_02"><i class="fa fa-check"></i><b>8.3</b> Computing variables</a></li>
<li class="chapter" data-level="8.4" data-path="Chapter_8.html"><a href="Chapter_8.html#summary-1"><i class="fa fa-check"></i><b>8.4</b> Summary</a></li>
</ul></li>
<li class="chapter" data-level="9" data-path="Chapter_9.html"><a href="Chapter_9.html"><i class="fa fa-check"></i><b>9</b> Decimal places, significant figures, and rounding</a>
<ul>
<li class="chapter" data-level="9.1" data-path="Chapter_9.html"><a href="Chapter_9.html#decimal-places-and-significant-figures"><i class="fa fa-check"></i><b>9.1</b> Decimal places and significant figures</a></li>
<li class="chapter" data-level="9.2" data-path="Chapter_9.html"><a href="Chapter_9.html#rounding"><i class="fa fa-check"></i><b>9.2</b> Rounding</a></li>
</ul></li>
<li class="chapter" data-level="10" data-path="Chapter_10.html"><a href="Chapter_10.html"><i class="fa fa-check"></i><b>10</b> Graphs</a>
<ul>
<li class="chapter" data-level="10.1" data-path="Chapter_10.html"><a href="Chapter_10.html#histograms"><i class="fa fa-check"></i><b>10.1</b> Histograms</a></li>
<li class="chapter" data-level="10.2" data-path="Chapter_10.html"><a href="Chapter_10.html#barplots-and-pie-charts"><i class="fa fa-check"></i><b>10.2</b> Barplots and pie charts</a></li>
<li class="chapter" data-level="10.3" data-path="Chapter_10.html"><a href="Chapter_10.html#box-whisker-plots"><i class="fa fa-check"></i><b>10.3</b> Box-whisker plots</a></li>
</ul></li>
<li class="chapter" data-level="11" data-path="Chapter_11.html"><a href="Chapter_11.html"><i class="fa fa-check"></i><b>11</b> Measures of central tendency</a>
<ul>
<li class="chapter" data-level="11.1" data-path="Chapter_11.html"><a href="Chapter_11.html#the-mean"><i class="fa fa-check"></i><b>11.1</b> The mean</a></li>
<li class="chapter" data-level="11.2" data-path="Chapter_11.html"><a href="Chapter_11.html#the-mode"><i class="fa fa-check"></i><b>11.2</b> The mode</a></li>
<li class="chapter" data-level="11.3" data-path="Chapter_11.html"><a href="Chapter_11.html#the-median-and-quantiles"><i class="fa fa-check"></i><b>11.3</b> The median and quantiles</a></li>
</ul></li>
<li class="chapter" data-level="12" data-path="Chapter_12.html"><a href="Chapter_12.html"><i class="fa fa-check"></i><b>12</b> Measures of spread</a>
<ul>
<li class="chapter" data-level="12.1" data-path="Chapter_12.html"><a href="Chapter_12.html#the-range"><i class="fa fa-check"></i><b>12.1</b> The range</a></li>
<li class="chapter" data-level="12.2" data-path="Chapter_12.html"><a href="Chapter_12.html#the-inter-quartile-range"><i class="fa fa-check"></i><b>12.2</b> The inter-quartile range</a></li>
<li class="chapter" data-level="12.3" data-path="Chapter_12.html"><a href="Chapter_12.html#the-variance"><i class="fa fa-check"></i><b>12.3</b> The variance</a></li>
<li class="chapter" data-level="12.4" data-path="Chapter_12.html"><a href="Chapter_12.html#the-standard-deviation"><i class="fa fa-check"></i><b>12.4</b> The standard deviation</a></li>
<li class="chapter" data-level="12.5" data-path="Chapter_12.html"><a href="Chapter_12.html#the-coefficient-of-variation"><i class="fa fa-check"></i><b>12.5</b> The coefficient of variation</a></li>
<li class="chapter" data-level="12.6" data-path="Chapter_12.html"><a href="Chapter_12.html#the-standard-error"><i class="fa fa-check"></i><b>12.6</b> The standard error</a></li>
</ul></li>
<li class="chapter" data-level="13" data-path="Chapter_13.html"><a href="Chapter_13.html"><i class="fa fa-check"></i><b>13</b> Skew and kurtosis</a>
<ul>
<li class="chapter" data-level="13.1" data-path="Chapter_13.html"><a href="Chapter_13.html#skew"><i class="fa fa-check"></i><b>13.1</b> Skew</a></li>
<li class="chapter" data-level="13.2" data-path="Chapter_13.html"><a href="Chapter_13.html#kurtosis"><i class="fa fa-check"></i><b>13.2</b> Kurtosis</a></li>
<li class="chapter" data-level="13.3" data-path="Chapter_13.html"><a href="Chapter_13.html#moments"><i class="fa fa-check"></i><b>13.3</b> Moments</a></li>
</ul></li>
<li class="chapter" data-level="14" data-path="Chapter_14.html"><a href="Chapter_14.html"><i class="fa fa-check"></i><b>14</b> <em>Practical</em>. Plotting and statistical summaries in jamovi</a>
<ul>
<li class="chapter" data-level="14.1" data-path="Chapter_14.html"><a href="Chapter_14.html#reorganise-the-dataset-into-a-tidy-format"><i class="fa fa-check"></i><b>14.1</b> Reorganise the dataset into a tidy format</a></li>
<li class="chapter" data-level="14.2" data-path="Chapter_14.html"><a href="Chapter_14.html#histograms-and-box-whisker-plots"><i class="fa fa-check"></i><b>14.2</b> Histograms and box-whisker plots</a></li>
<li class="chapter" data-level="14.3" data-path="Chapter_14.html"><a href="Chapter_14.html#calculate-summary-statistics"><i class="fa fa-check"></i><b>14.3</b> Calculate summary statistics</a></li>
<li class="chapter" data-level="14.4" data-path="Chapter_14.html"><a href="Chapter_14.html#reporting-decimals-and-significant-figures"><i class="fa fa-check"></i><b>14.4</b> Reporting decimals and significant figures</a></li>
<li class="chapter" data-level="14.5" data-path="Chapter_14.html"><a href="Chapter_14.html#comparing-across-sites"><i class="fa fa-check"></i><b>14.5</b> Comparing across sites</a></li>
</ul></li>
<li class="chapter" data-level="15" data-path="Chapter_15.html"><a href="Chapter_15.html"><i class="fa fa-check"></i><b>15</b> Introduction to probability models</a>
<ul>
<li class="chapter" data-level="15.1" data-path="Chapter_15.html"><a href="Chapter_15.html#instructive-example"><i class="fa fa-check"></i><b>15.1</b> Instructive example</a></li>
<li class="chapter" data-level="15.2" data-path="Chapter_15.html"><a href="Chapter_15.html#biological-applications"><i class="fa fa-check"></i><b>15.2</b> Biological applications</a></li>
<li class="chapter" data-level="15.3" data-path="Chapter_15.html"><a href="Chapter_15.html#sampling-with-and-without-replacement"><i class="fa fa-check"></i><b>15.3</b> Sampling with and without replacement</a></li>
<li class="chapter" data-level="15.4" data-path="Chapter_15.html"><a href="Chapter_15.html#probability-distributions"><i class="fa fa-check"></i><b>15.4</b> Probability distributions</a>
<ul>
<li class="chapter" data-level="15.4.1" data-path="Chapter_15.html"><a href="Chapter_15.html#binomial-distribution"><i class="fa fa-check"></i><b>15.4.1</b> Binomial distribution</a></li>
<li class="chapter" data-level="15.4.2" data-path="Chapter_15.html"><a href="Chapter_15.html#poisson-distribution"><i class="fa fa-check"></i><b>15.4.2</b> Poisson distribution</a></li>
<li class="chapter" data-level="15.4.3" data-path="Chapter_15.html"><a href="Chapter_15.html#uniform-distribution"><i class="fa fa-check"></i><b>15.4.3</b> Uniform distribution</a></li>
<li class="chapter" data-level="15.4.4" data-path="Chapter_15.html"><a href="Chapter_15.html#normal-distribution"><i class="fa fa-check"></i><b>15.4.4</b> Normal distribution</a></li>
</ul></li>
<li class="chapter" data-level="15.5" data-path="Chapter_15.html"><a href="Chapter_15.html#summary-2"><i class="fa fa-check"></i><b>15.5</b> Summary</a></li>
</ul></li>
<li class="chapter" data-level="16" data-path="Chapter_16.html"><a href="Chapter_16.html"><i class="fa fa-check"></i><b>16</b> Central Limit Theorem</a>
<ul>
<li class="chapter" data-level="16.1" data-path="Chapter_16.html"><a href="Chapter_16.html#the-distribution-of-means-is-normal"><i class="fa fa-check"></i><b>16.1</b> The distribution of means is normal</a></li>
<li class="chapter" data-level="16.2" data-path="Chapter_16.html"><a href="Chapter_16.html#probability-and-z-scores"><i class="fa fa-check"></i><b>16.2</b> Probability and z-scores</a></li>
</ul></li>
<li class="chapter" data-level="17" data-path="Chapter_17.html"><a href="Chapter_17.html"><i class="fa fa-check"></i><b>17</b> <em>Practical</em>. Probability and simulation</a>
<ul>
<li class="chapter" data-level="17.1" data-path="Chapter_17.html"><a href="Chapter_17.html#probabilities-from-a-dataset"><i class="fa fa-check"></i><b>17.1</b> Probabilities from a dataset</a></li>
<li class="chapter" data-level="17.2" data-path="Chapter_17.html"><a href="Chapter_17.html#probabilities-from-a-normal-distribution"><i class="fa fa-check"></i><b>17.2</b> Probabilities from a normal distribution</a></li>
<li class="chapter" data-level="17.3" data-path="Chapter_17.html"><a href="Chapter_17.html#central-limit-theorem"><i class="fa fa-check"></i><b>17.3</b> Central limit theorem</a></li>
</ul></li>
<li class="chapter" data-level="18" data-path="Chapter_18.html"><a href="Chapter_18.html"><i class="fa fa-check"></i><b>18</b> Confidence intervals</a>
<ul>
<li class="chapter" data-level="18.1" data-path="Chapter_18.html"><a href="Chapter_18.html#normal-distribution-cis"><i class="fa fa-check"></i><b>18.1</b> Normal distribution CIs</a></li>
<li class="chapter" data-level="18.2" data-path="Chapter_18.html"><a href="Chapter_18.html#binomial-distribution-cis"><i class="fa fa-check"></i><b>18.2</b> Binomial distribution CIs</a></li>
</ul></li>
<li class="chapter" data-level="19" data-path="Chapter_19.html"><a href="Chapter_19.html"><i class="fa fa-check"></i><b>19</b> The t-interval</a></li>
<li class="chapter" data-level="20" data-path="Chapter_20.html"><a href="Chapter_20.html"><i class="fa fa-check"></i><b>20</b> <em>Practical</em>. z- and t-intervals</a>
<ul>
<li class="chapter" data-level="20.1" data-path="Chapter_20.html"><a href="Chapter_20.html#confidence-intervals-with-distraction"><i class="fa fa-check"></i><b>20.1</b> Confidence intervals with distrACTION</a></li>
<li class="chapter" data-level="20.2" data-path="Chapter_20.html"><a href="Chapter_20.html#confidence-intervals-from-z--and-t-scores"><i class="fa fa-check"></i><b>20.2</b> Confidence intervals from z- and t-scores</a></li>
<li class="chapter" data-level="20.3" data-path="Chapter_20.html"><a href="Chapter_20.html#confidence-intervals-for-different-sample-sizes"><i class="fa fa-check"></i><b>20.3</b> Confidence intervals for different sample sizes</a></li>
<li class="chapter" data-level="20.4" data-path="Chapter_20.html"><a href="Chapter_20.html#proportion-confidence-intervals"><i class="fa fa-check"></i><b>20.4</b> Proportion confidence intervals</a></li>
<li class="chapter" data-level="20.5" data-path="Chapter_20.html"><a href="Chapter_20.html#another-proportion-confidence-interval"><i class="fa fa-check"></i><b>20.5</b> Another proportion confidence interval</a></li>
</ul></li>
<li class="chapter" data-level="21" data-path="Chapter_21.html"><a href="Chapter_21.html"><i class="fa fa-check"></i><b>21</b> What is hypothesis testing?</a>
<ul>
<li class="chapter" data-level="21.1" data-path="Chapter_21.html"><a href="Chapter_21.html#how-ridiculous-is-our-hypothesis"><i class="fa fa-check"></i><b>21.1</b> How ridiculous is our hypothesis?</a></li>
<li class="chapter" data-level="21.2" data-path="Chapter_21.html"><a href="Chapter_21.html#statistical-hypothesis-testing"><i class="fa fa-check"></i><b>21.2</b> Statistical hypothesis testing</a></li>
<li class="chapter" data-level="21.3" data-path="Chapter_21.html"><a href="Chapter_21.html#p-values-false-positives-and-power"><i class="fa fa-check"></i><b>21.3</b> P-values, false positives, and power</a></li>
</ul></li>
<li class="chapter" data-level="22" data-path="Chapter_22.html"><a href="Chapter_22.html"><i class="fa fa-check"></i><b>22</b> The t-test</a>
<ul>
<li class="chapter" data-level="22.1" data-path="Chapter_22.html"><a href="Chapter_22.html#one-sample-t-test"><i class="fa fa-check"></i><b>22.1</b> One sample t-test</a></li>
<li class="chapter" data-level="22.2" data-path="Chapter_22.html"><a href="Chapter_22.html#independent-samples-t-test"><i class="fa fa-check"></i><b>22.2</b> Independent samples t-test</a></li>
<li class="chapter" data-level="22.3" data-path="Chapter_22.html"><a href="Chapter_22.html#paired-samples-t-test"><i class="fa fa-check"></i><b>22.3</b> Paired samples t-test</a></li>
<li class="chapter" data-level="22.4" data-path="Chapter_22.html"><a href="Chapter_22.html#assumptions-of-t-tests"><i class="fa fa-check"></i><b>22.4</b> Assumptions of t-tests</a></li>
<li class="chapter" data-level="22.5" data-path="Chapter_22.html"><a href="Chapter_22.html#non-parametric-alternatives"><i class="fa fa-check"></i><b>22.5</b> Non-parametric alternatives</a>
<ul>
<li class="chapter" data-level="22.5.1" data-path="Chapter_22.html"><a href="Chapter_22.html#wilcoxon-test"><i class="fa fa-check"></i><b>22.5.1</b> Wilcoxon test</a></li>
<li class="chapter" data-level="22.5.2" data-path="Chapter_22.html"><a href="Chapter_22.html#mann-whitney-u-test"><i class="fa fa-check"></i><b>22.5.2</b> Mann-Whitney U test</a></li>
</ul></li>
<li class="chapter" data-level="22.6" data-path="Chapter_22.html"><a href="Chapter_22.html#summary-3"><i class="fa fa-check"></i><b>22.6</b> Summary</a></li>
</ul></li>
<li class="chapter" data-level="23" data-path="Chapter_23.html"><a href="Chapter_23.html"><i class="fa fa-check"></i><b>23</b> <em>Practical</em>. Hypothesis testing and t-tests</a>
<ul>
<li class="chapter" data-level="23.1" data-path="Chapter_23.html"><a href="Chapter_23.html#one-sample-t-test-1"><i class="fa fa-check"></i><b>23.1</b> One sample t-test</a></li>
<li class="chapter" data-level="23.2" data-path="Chapter_23.html"><a href="Chapter_23.html#paired-t-test"><i class="fa fa-check"></i><b>23.2</b> Paired t-test</a></li>
<li class="chapter" data-level="23.3" data-path="Chapter_23.html"><a href="Chapter_23.html#wilcoxon-test-1"><i class="fa fa-check"></i><b>23.3</b> Wilcoxon test</a></li>
<li class="chapter" data-level="23.4" data-path="Chapter_23.html"><a href="Chapter_23.html#independent-samples-t-test-1"><i class="fa fa-check"></i><b>23.4</b> Independent samples t-test</a></li>
<li class="chapter" data-level="23.5" data-path="Chapter_23.html"><a href="Chapter_23.html#mann-whitney-u-test-1"><i class="fa fa-check"></i><b>23.5</b> Mann-Whitney U Test</a></li>
</ul></li>
<li class="chapter" data-level="24" data-path="Chapter_24.html"><a href="Chapter_24.html"><i class="fa fa-check"></i><b>24</b> Analysis of variance</a>
<ul>
<li class="chapter" data-level="24.1" data-path="Chapter_24.html"><a href="Chapter_24.html#f-distribution"><i class="fa fa-check"></i><b>24.1</b> F-distribution</a></li>
<li class="chapter" data-level="24.2" data-path="Chapter_24.html"><a href="Chapter_24.html#one-way-anova"><i class="fa fa-check"></i><b>24.2</b> One-way ANOVA</a>
<ul>
<li class="chapter" data-level="24.2.1" data-path="Chapter_24.html"><a href="Chapter_24.html#anova-mean-variance-among-groups"><i class="fa fa-check"></i><b>24.2.1</b> ANOVA mean variance among groups</a></li>
<li class="chapter" data-level="24.2.2" data-path="Chapter_24.html"><a href="Chapter_24.html#anova-mean-variance-within-groups"><i class="fa fa-check"></i><b>24.2.2</b> ANOVA mean variance within groups</a></li>
<li class="chapter" data-level="24.2.3" data-path="Chapter_24.html"><a href="Chapter_24.html#anova-f-statistic-calculation"><i class="fa fa-check"></i><b>24.2.3</b> ANOVA F-statistic calculation</a></li>
</ul></li>
<li class="chapter" data-level="24.3" data-path="Chapter_24.html"><a href="Chapter_24.html#assumptions-of-anova"><i class="fa fa-check"></i><b>24.3</b> Assumptions of ANOVA</a></li>
</ul></li>
<li class="chapter" data-level="25" data-path="Chapter_25.html"><a href="Chapter_25.html"><i class="fa fa-check"></i><b>25</b> Multiple comparisons</a></li>
<li class="chapter" data-level="26" data-path="Chapter_26.html"><a href="Chapter_26.html"><i class="fa fa-check"></i><b>26</b> Kruskal-Wallis H test</a></li>
<li class="chapter" data-level="27" data-path="Chapter_27.html"><a href="Chapter_27.html"><i class="fa fa-check"></i><b>27</b> Two-way ANOVA</a></li>
<li class="chapter" data-level="28" data-path="Chapter_28.html"><a href="Chapter_28.html"><i class="fa fa-check"></i><b>28</b> <em>Practical</em>. ANOVA and associated tests</a>
<ul>
<li class="chapter" data-level="28.1" data-path="Chapter_28.html"><a href="Chapter_28.html#one-way-anova-site"><i class="fa fa-check"></i><b>28.1</b> One-way ANOVA (site)</a></li>
<li class="chapter" data-level="28.2" data-path="Chapter_28.html"><a href="Chapter_28.html#one-way-anova-profile"><i class="fa fa-check"></i><b>28.2</b> One-way ANOVA (profile)</a></li>
<li class="chapter" data-level="28.3" data-path="Chapter_28.html"><a href="Chapter_28.html#multiple-comparisons"><i class="fa fa-check"></i><b>28.3</b> Multiple comparisons</a></li>
<li class="chapter" data-level="28.4" data-path="Chapter_28.html"><a href="Chapter_28.html#kruskal-wallis-h-test"><i class="fa fa-check"></i><b>28.4</b> Kruskal-Wallis H test</a></li>
<li class="chapter" data-level="28.5" data-path="Chapter_28.html"><a href="Chapter_28.html#two-way-anova"><i class="fa fa-check"></i><b>28.5</b> Two-way ANOVA</a></li>
</ul></li>
<li class="chapter" data-level="29" data-path="Chapter_29.html"><a href="Chapter_29.html"><i class="fa fa-check"></i><b>29</b> Frequency and count data</a>
<ul>
<li class="chapter" data-level="29.1" data-path="Chapter_29.html"><a href="Chapter_29.html#chi-square-distribution"><i class="fa fa-check"></i><b>29.1</b> Chi-square distribution</a></li>
<li class="chapter" data-level="29.2" data-path="Chapter_29.html"><a href="Chapter_29.html#chi-square-goodness-of-fit"><i class="fa fa-check"></i><b>29.2</b> Chi-square goodness of fit</a></li>
<li class="chapter" data-level="29.3" data-path="Chapter_29.html"><a href="Chapter_29.html#chi-square-test-of-association"><i class="fa fa-check"></i><b>29.3</b> Chi-square test of association</a></li>
</ul></li>
<li class="chapter" data-level="30" data-path="Chapter_30.html"><a href="Chapter_30.html"><i class="fa fa-check"></i><b>30</b> Correlation</a>
<ul>
<li class="chapter" data-level="30.1" data-path="Chapter_30.html"><a href="Chapter_30.html#scatterplots"><i class="fa fa-check"></i><b>30.1</b> Scatterplots</a></li>
<li class="chapter" data-level="30.2" data-path="Chapter_30.html"><a href="Chapter_30.html#correlation-coefficient"><i class="fa fa-check"></i><b>30.2</b> Correlation coefficient</a>
<ul>
<li class="chapter" data-level="30.2.1" data-path="Chapter_30.html"><a href="Chapter_30.html#pearson-product-moment-correlation-coefficient"><i class="fa fa-check"></i><b>30.2.1</b> Pearson product moment correlation coefficient</a></li>
<li class="chapter" data-level="30.2.2" data-path="Chapter_30.html"><a href="Chapter_30.html#spearmans-rank-correlation-coefficient"><i class="fa fa-check"></i><b>30.2.2</b> Spearman’s rank correlation coefficient</a></li>
</ul></li>
<li class="chapter" data-level="30.3" data-path="Chapter_30.html"><a href="Chapter_30.html#correlation-hypothesis-testing"><i class="fa fa-check"></i><b>30.3</b> Correlation hypothesis testing</a></li>
</ul></li>
<li class="chapter" data-level="31" data-path="Chapter_31.html"><a href="Chapter_31.html"><i class="fa fa-check"></i><b>31</b> <em>Practical</em>. Analysis of counts and correlations</a>
<ul>
<li class="chapter" data-level="31.1" data-path="Chapter_31.html"><a href="Chapter_31.html#survival-goodness-of-fit"><i class="fa fa-check"></i><b>31.1</b> Survival goodness of fit</a></li>
<li class="chapter" data-level="31.2" data-path="Chapter_31.html"><a href="Chapter_31.html#colony-goodness-of-fit"><i class="fa fa-check"></i><b>31.2</b> Colony goodness of fit</a></li>
<li class="chapter" data-level="31.3" data-path="Chapter_31.html"><a href="Chapter_31.html#chi-square-test-of-association-1"><i class="fa fa-check"></i><b>31.3</b> Chi-Square test of association</a></li>
<li class="chapter" data-level="31.4" data-path="Chapter_31.html"><a href="Chapter_31.html#pearson-product-moment-correlation-test"><i class="fa fa-check"></i><b>31.4</b> Pearson product moment correlation test</a></li>
<li class="chapter" data-level="31.5" data-path="Chapter_31.html"><a href="Chapter_31.html#spearmans-rank-correlation-test"><i class="fa fa-check"></i><b>31.5</b> Spearman’s rank correlation test</a></li>
<li class="chapter" data-level="31.6" data-path="Chapter_31.html"><a href="Chapter_31.html#untidy-goodness-of-fit"><i class="fa fa-check"></i><b>31.6</b> Untidy goodness of fit</a></li>
</ul></li>
<li class="chapter" data-level="32" data-path="Chapter_32.html"><a href="Chapter_32.html"><i class="fa fa-check"></i><b>32</b> Simple linear regression</a>
<ul>
<li class="chapter" data-level="32.1" data-path="Chapter_32.html"><a href="Chapter_32.html#visual-interpretation-of-regression"><i class="fa fa-check"></i><b>32.1</b> Visual interpretation of regression</a></li>
<li class="chapter" data-level="32.2" data-path="Chapter_32.html"><a href="Chapter_32.html#intercepts-slopes-and-residuals"><i class="fa fa-check"></i><b>32.2</b> Intercepts, slopes, and residuals</a></li>
<li class="chapter" data-level="32.3" data-path="Chapter_32.html"><a href="Chapter_32.html#regression-coefficients"><i class="fa fa-check"></i><b>32.3</b> Regression coefficients</a></li>
<li class="chapter" data-level="32.4" data-path="Chapter_32.html"><a href="Chapter_32.html#regression-line-calculation"><i class="fa fa-check"></i><b>32.4</b> Regression line calculation</a></li>
<li class="chapter" data-level="32.5" data-path="Chapter_32.html"><a href="Chapter_32.html#coefficient-of-determination"><i class="fa fa-check"></i><b>32.5</b> Coefficient of determination</a></li>
<li class="chapter" data-level="32.6" data-path="Chapter_32.html"><a href="Chapter_32.html#regression-assumptions"><i class="fa fa-check"></i><b>32.6</b> Regression assumptions</a></li>
<li class="chapter" data-level="32.7" data-path="Chapter_32.html"><a href="Chapter_32.html#regression-hypothesis-testing"><i class="fa fa-check"></i><b>32.7</b> Regression hypothesis testing</a>
<ul>
<li class="chapter" data-level="32.7.1" data-path="Chapter_32.html"><a href="Chapter_32.html#overall-model-significance"><i class="fa fa-check"></i><b>32.7.1</b> Overall model significance</a></li>
<li class="chapter" data-level="32.7.2" data-path="Chapter_32.html"><a href="Chapter_32.html#significance-of-the-intercept"><i class="fa fa-check"></i><b>32.7.2</b> Significance of the intercept</a></li>
<li class="chapter" data-level="32.7.3" data-path="Chapter_32.html"><a href="Chapter_32.html#significance-of-the-slope"><i class="fa fa-check"></i><b>32.7.3</b> Significance of the slope</a></li>
<li class="chapter" data-level="32.7.4" data-path="Chapter_32.html"><a href="Chapter_32.html#simple-regression-output"><i class="fa fa-check"></i><b>32.7.4</b> Simple regression output</a></li>
</ul></li>
<li class="chapter" data-level="32.8" data-path="Chapter_32.html"><a href="Chapter_32.html#prediction-with-linear-models"><i class="fa fa-check"></i><b>32.8</b> Prediction with linear models</a></li>
<li class="chapter" data-level="32.9" data-path="Chapter_32.html"><a href="Chapter_32.html#conclusion"><i class="fa fa-check"></i><b>32.9</b> Conclusion</a></li>
</ul></li>
<li class="chapter" data-level="33" data-path="Chapter_33.html"><a href="Chapter_33.html"><i class="fa fa-check"></i><b>33</b> Multiple regression</a>
<ul>
<li class="chapter" data-level="33.1" data-path="Chapter_33.html"><a href="Chapter_33.html#adjusted-coefficient-of-determination"><i class="fa fa-check"></i><b>33.1</b> Adjusted coefficient of determination</a></li>
</ul></li>
<li class="chapter" data-level="34" data-path="Chapter_34.html"><a href="Chapter_34.html"><i class="fa fa-check"></i><b>34</b> <em>Practical</em>. Using regression</a>
<ul>
<li class="chapter" data-level="34.1" data-path="Chapter_34.html"><a href="Chapter_34.html#predicting-pyrogenic-carbon-from-soil-depth"><i class="fa fa-check"></i><b>34.1</b> Predicting pyrogenic carbon from soil depth</a></li>
<li class="chapter" data-level="34.2" data-path="Chapter_34.html"><a href="Chapter_34.html#predicting-pyrogenic-carbon-from-fire-frequency"><i class="fa fa-check"></i><b>34.2</b> Predicting pyrogenic carbon from fire frequency</a></li>
<li class="chapter" data-level="34.3" data-path="Chapter_34.html"><a href="Chapter_34.html#multiple-regression-depth-and-fire-frequency"><i class="fa fa-check"></i><b>34.3</b> Multiple regression depth and fire frequency</a></li>
<li class="chapter" data-level="34.4" data-path="Chapter_34.html"><a href="Chapter_34.html#large-multiple-regression"><i class="fa fa-check"></i><b>34.4</b> Large multiple regression</a></li>
<li class="chapter" data-level="34.5" data-path="Chapter_34.html"><a href="Chapter_34.html#predicting-temperature-from-fire-frequency"><i class="fa fa-check"></i><b>34.5</b> Predicting temperature from fire frequency</a></li>
</ul></li>
<li class="chapter" data-level="35" data-path="Chapter_35.html"><a href="Chapter_35.html"><i class="fa fa-check"></i><b>35</b> Randomisation</a>
<ul>
<li class="chapter" data-level="35.1" data-path="Chapter_35.html"><a href="Chapter_35.html#summary-of-parametric-hypothesis-testing"><i class="fa fa-check"></i><b>35.1</b> Summary of parametric hypothesis testing</a></li>
<li class="chapter" data-level="35.2" data-path="Chapter_35.html"><a href="Chapter_35.html#randomisation-approach"><i class="fa fa-check"></i><b>35.2</b> Randomisation approach</a></li>
<li class="chapter" data-level="35.3" data-path="Chapter_35.html"><a href="Chapter_35.html#randomisation-for-hypothesis-testing"><i class="fa fa-check"></i><b>35.3</b> Randomisation for hypothesis testing</a></li>
<li class="chapter" data-level="35.4" data-path="Chapter_35.html"><a href="Chapter_35.html#randomisation-assumptions"><i class="fa fa-check"></i><b>35.4</b> Randomisation assumptions</a></li>
<li class="chapter" data-level="35.5" data-path="Chapter_35.html"><a href="Chapter_35.html#bootstrapping"><i class="fa fa-check"></i><b>35.5</b> Bootstrapping</a></li>
<li class="chapter" data-level="35.6" data-path="Chapter_35.html"><a href="Chapter_35.html#randomisation-conclusions"><i class="fa fa-check"></i><b>35.6</b> Randomisation conclusions</a></li>
</ul></li>
<li class="appendix"><span><b>Appendix</b></span></li>
<li class="chapter" data-level="A" data-path="appendexA.html"><a href="appendexA.html"><i class="fa fa-check"></i><b>A</b> Answers to chapter exercises</a>
<ul>
<li class="chapter" data-level="A.1" data-path="appendexA.html"><a href="appendexA.html#chapter-3"><i class="fa fa-check"></i><b>A.1</b> Chapter 3</a>
<ul>
<li class="chapter" data-level="A.1.1" data-path="appendexA.html"><a href="appendexA.html#exercise-3.1"><i class="fa fa-check"></i><b>A.1.1</b> Exercise 3.1:</a></li>
<li class="chapter" data-level="A.1.2" data-path="appendexA.html"><a href="appendexA.html#exercise-3.2"><i class="fa fa-check"></i><b>A.1.2</b> Exercise 3.2</a></li>
<li class="chapter" data-level="A.1.3" data-path="appendexA.html"><a href="appendexA.html#exercise-3.3"><i class="fa fa-check"></i><b>A.1.3</b> Exercise 3.3</a></li>
<li class="chapter" data-level="A.1.4" data-path="appendexA.html"><a href="appendexA.html#exercise-3.4"><i class="fa fa-check"></i><b>A.1.4</b> Exercise 3.4</a></li>
</ul></li>
<li class="chapter" data-level="A.2" data-path="appendexA.html"><a href="appendexA.html#chapter-8"><i class="fa fa-check"></i><b>A.2</b> Chapter 8</a>
<ul>
<li class="chapter" data-level="A.2.1" data-path="appendexA.html"><a href="appendexA.html#exercise-8.1"><i class="fa fa-check"></i><b>A.2.1</b> Exercise 8.1</a></li>
<li class="chapter" data-level="A.2.2" data-path="appendexA.html"><a href="appendexA.html#exercise-8.2"><i class="fa fa-check"></i><b>A.2.2</b> Exercise 8.2</a></li>
<li class="chapter" data-level="A.2.3" data-path="appendexA.html"><a href="appendexA.html#exercise-8.3"><i class="fa fa-check"></i><b>A.2.3</b> Exercise 8.3</a></li>
</ul></li>
<li class="chapter" data-level="A.3" data-path="appendexA.html"><a href="appendexA.html#chapter-14"><i class="fa fa-check"></i><b>A.3</b> Chapter 14</a>
<ul>
<li class="chapter" data-level="A.3.1" data-path="appendexA.html"><a href="appendexA.html#exercise-14.1"><i class="fa fa-check"></i><b>A.3.1</b> Exercise 14.1</a></li>
<li class="chapter" data-level="A.3.2" data-path="appendexA.html"><a href="appendexA.html#exercise-14.2"><i class="fa fa-check"></i><b>A.3.2</b> Exercise 14.2</a></li>
<li class="chapter" data-level="A.3.3" data-path="appendexA.html"><a href="appendexA.html#exercise-14.3"><i class="fa fa-check"></i><b>A.3.3</b> Exercise 14.3</a></li>
<li class="chapter" data-level="A.3.4" data-path="appendexA.html"><a href="appendexA.html#exercise-14.4"><i class="fa fa-check"></i><b>A.3.4</b> Exercise 14.4</a></li>
<li class="chapter" data-level="A.3.5" data-path="appendexA.html"><a href="appendexA.html#exercise-14.5"><i class="fa fa-check"></i><b>A.3.5</b> Exercise 14.5</a></li>
</ul></li>
<li class="chapter" data-level="A.4" data-path="appendexA.html"><a href="appendexA.html#chapter-17"><i class="fa fa-check"></i><b>A.4</b> Chapter 17</a>
<ul>
<li class="chapter" data-level="A.4.1" data-path="appendexA.html"><a href="appendexA.html#exercise-17.1"><i class="fa fa-check"></i><b>A.4.1</b> Exercise 17.1</a></li>
<li class="chapter" data-level="A.4.2" data-path="appendexA.html"><a href="appendexA.html#exercise-17.2"><i class="fa fa-check"></i><b>A.4.2</b> Exercise 17.2</a></li>
<li class="chapter" data-level="A.4.3" data-path="appendexA.html"><a href="appendexA.html#exercise-17.3"><i class="fa fa-check"></i><b>A.4.3</b> Exercise 17.3</a></li>
</ul></li>
<li class="chapter" data-level="A.5" data-path="appendexA.html"><a href="appendexA.html#chapter-20"><i class="fa fa-check"></i><b>A.5</b> Chapter 20</a>
<ul>
<li class="chapter" data-level="A.5.1" data-path="appendexA.html"><a href="appendexA.html#exercise-20.1"><i class="fa fa-check"></i><b>A.5.1</b> Exercise 20.1</a></li>
<li class="chapter" data-level="A.5.2" data-path="appendexA.html"><a href="appendexA.html#exercise-20.2"><i class="fa fa-check"></i><b>A.5.2</b> Exercise 20.2</a></li>
<li class="chapter" data-level="A.5.3" data-path="appendexA.html"><a href="appendexA.html#exercise-20.3"><i class="fa fa-check"></i><b>A.5.3</b> Exercise 20.3</a></li>
<li class="chapter" data-level="A.5.4" data-path="appendexA.html"><a href="appendexA.html#exercise-20.4"><i class="fa fa-check"></i><b>A.5.4</b> Exercise 20.4</a></li>
<li class="chapter" data-level="A.5.5" data-path="appendexA.html"><a href="appendexA.html#exercise-20.5"><i class="fa fa-check"></i><b>A.5.5</b> Exercise 20.5</a></li>
</ul></li>
<li class="chapter" data-level="A.6" data-path="appendexA.html"><a href="appendexA.html#chapter-23"><i class="fa fa-check"></i><b>A.6</b> Chapter 23</a>
<ul>
<li class="chapter" data-level="A.6.1" data-path="appendexA.html"><a href="appendexA.html#exercise-23.1"><i class="fa fa-check"></i><b>A.6.1</b> Exercise 23.1</a></li>
<li class="chapter" data-level="A.6.2" data-path="appendexA.html"><a href="appendexA.html#exercise-23.2"><i class="fa fa-check"></i><b>A.6.2</b> Exercise 23.2</a></li>
<li class="chapter" data-level="A.6.3" data-path="appendexA.html"><a href="appendexA.html#exercise-23.3"><i class="fa fa-check"></i><b>A.6.3</b> Exercise 23.3</a></li>
<li class="chapter" data-level="A.6.4" data-path="appendexA.html"><a href="appendexA.html#exercise-23.4"><i class="fa fa-check"></i><b>A.6.4</b> Exercise 23.4</a></li>
<li class="chapter" data-level="A.6.5" data-path="appendexA.html"><a href="appendexA.html#exercise-23.5"><i class="fa fa-check"></i><b>A.6.5</b> Exercise 23.5</a></li>
</ul></li>
<li class="chapter" data-level="A.7" data-path="appendexA.html"><a href="appendexA.html#chapter-28"><i class="fa fa-check"></i><b>A.7</b> Chapter 28</a>
<ul>
<li class="chapter" data-level="A.7.1" data-path="appendexA.html"><a href="appendexA.html#exercise-28.1"><i class="fa fa-check"></i><b>A.7.1</b> Exercise 28.1</a></li>
<li class="chapter" data-level="A.7.2" data-path="appendexA.html"><a href="appendexA.html#exercise-28.2"><i class="fa fa-check"></i><b>A.7.2</b> Exercise 28.2</a></li>
<li class="chapter" data-level="A.7.3" data-path="appendexA.html"><a href="appendexA.html#exercise-28.3"><i class="fa fa-check"></i><b>A.7.3</b> Exercise 28.3</a></li>
<li class="chapter" data-level="A.7.4" data-path="appendexA.html"><a href="appendexA.html#exercise-28.4"><i class="fa fa-check"></i><b>A.7.4</b> Exercise 28.4</a></li>
</ul></li>
<li class="chapter" data-level="A.8" data-path="appendexA.html"><a href="appendexA.html#chapter-31"><i class="fa fa-check"></i><b>A.8</b> Chapter 31</a>
<ul>
<li class="chapter" data-level="A.8.1" data-path="appendexA.html"><a href="appendexA.html#exercise-31.1"><i class="fa fa-check"></i><b>A.8.1</b> Exercise 31.1</a></li>
<li class="chapter" data-level="A.8.2" data-path="appendexA.html"><a href="appendexA.html#exercise-31.2"><i class="fa fa-check"></i><b>A.8.2</b> Exercise 31.2</a></li>
<li class="chapter" data-level="A.8.3" data-path="appendexA.html"><a href="appendexA.html#exercise-31.3"><i class="fa fa-check"></i><b>A.8.3</b> Exercise 31.3</a></li>
<li class="chapter" data-level="A.8.4" data-path="appendexA.html"><a href="appendexA.html#exercise-31.4"><i class="fa fa-check"></i><b>A.8.4</b> Exercise 31.4</a></li>
<li class="chapter" data-level="A.8.5" data-path="appendexA.html"><a href="appendexA.html#exercise-31.5"><i class="fa fa-check"></i><b>A.8.5</b> Exercise 31.5</a></li>
</ul></li>
<li class="chapter" data-level="A.9" data-path="appendexA.html"><a href="appendexA.html#chapter-34"><i class="fa fa-check"></i><b>A.9</b> Chapter 34</a>
<ul>
<li class="chapter" data-level="A.9.1" data-path="appendexA.html"><a href="appendexA.html#exercise-34.1"><i class="fa fa-check"></i><b>A.9.1</b> Exercise 34.1</a></li>
<li class="chapter" data-level="A.9.2" data-path="appendexA.html"><a href="appendexA.html#exercise-34.2"><i class="fa fa-check"></i><b>A.9.2</b> Exercise 34.2</a></li>
<li class="chapter" data-level="A.9.3" data-path="appendexA.html"><a href="appendexA.html#exercise-34.3"><i class="fa fa-check"></i><b>A.9.3</b> Exercise 34.3</a></li>
<li class="chapter" data-level="A.9.4" data-path="appendexA.html"><a href="appendexA.html#exercise-34.4"><i class="fa fa-check"></i><b>A.9.4</b> Exercise 34.4</a></li>
<li class="chapter" data-level="A.9.5" data-path="appendexA.html"><a href="appendexA.html#exercise-33.5"><i class="fa fa-check"></i><b>A.9.5</b> Exercise 33.5</a></li>
</ul></li>
</ul></li>
<li class="chapter" data-level="B" data-path="uncertainty_derivation.html"><a href="uncertainty_derivation.html"><i class="fa fa-check"></i><b>B</b> Uncertainty derivation</a>
<ul>
<li class="chapter" data-level="B.1" data-path="uncertainty_derivation.html"><a href="uncertainty_derivation.html#propagation-of-error-for-addition-and-subtraction"><i class="fa fa-check"></i><b>B.1</b> Propagation of error for addition and subtraction</a></li>
<li class="chapter" data-level="B.2" data-path="uncertainty_derivation.html"><a href="uncertainty_derivation.html#propagation-of-error-for-multiplication-and-division"><i class="fa fa-check"></i><b>B.2</b> Propagation of error for multiplication and division</a></li>
</ul></li>
<li class="chapter" data-level="" data-path="references.html"><a href="references.html"><i class="fa fa-check"></i>References</a></li>
<li class="divider"></li>
<li><a href="https://github.com/rstudio/bookdown" target="blank">Published with bookdown</a></li>
</ul>
</nav>
</div>
<div class="book-body">
<div class="body-inner">
<div class="book-header" role="navigation">
<h1>
<i class="fa fa-circle-o-notch fa-spin"></i><a href="./">Fundamental statistical concepts and techniques in the biological and environmental sciences: With jamovi</a>
</h1>
</div>
<div class="page-wrapper" tabindex="-1" role="main">
<div class="page-inner">
<section class="normal" id="section-">
<div id="Chapter_22" class="section level1 hasAnchor" number="22">
<h1><span class="header-section-number">Chapter 22</span> The t-test<a href="Chapter_22.html#Chapter_22" class="anchor-section" aria-label="Anchor link to header"></a></h1>
<p>A t-test is a simple and widely used statistical hypothesis test that relies on the t-distribution introduced in <a href="Chapter_19.html#Chapter_19">Chapter 19</a>.
In this chapter, we will look at three types of t-tests: (1) the one sample t-test, (2) the independent samples t-test, and (3) the paired samples t-test.
We will also look at non-parametric alternatives to t-tests (Wilcoxon and Mann-Whitney tests), which become relevant when the assumptions of t-tests are violated.
The use of all of these tests in jamovi will be demonstrated in <a href="Chapter_23.html#Chapter_23">Chapter 23</a>.</p>
<div id="one-sample-t-test" class="section level2 hasAnchor" number="22.1">
<h2><span class="header-section-number">22.1</span> One sample t-test<a href="Chapter_22.html#one-sample-t-test" class="anchor-section" aria-label="Anchor link to header"></a></h2>
<p>Suppose that a biology teacher has created a new approach to teaching and wants to test whether or not their new approach results in student test scores that are higher than the reported national average of 60.
This teacher should first define their null and alternative hypotheses.</p>
<ul>
<li><span class="math inline">\(H_{0}\)</span>: The mean of student test scores equals 60</li>
<li><span class="math inline">\(H_{A}\)</span>: The mean of student test scores is greater than 60</li>
</ul>
<p>Note that this is a one-sided hypothesis.
The teacher is not interested in whether or not the mean test score of their students is below 60.
They just want to find out if the mean test scores are greater than 60.
Suppose the teacher has 10 students with the following test scores (out of 100).</p>
<pre><code>49.3, 62.9, 73.7, 65.5, 69.6, 70.7, 61.5, 73.4, 61.1, 78.1</code></pre>
<p>The teacher can use a one sample t-test to test <span class="math inline">\(H_{0}\)</span>.
The one sample t-test will test whether the sample mean of test scores (<span class="math inline">\(\bar{y} = 66.58\)</span>) is significantly greater than the reported national average, <span class="math inline">\(\mu_{0} = 60\)</span>.
How does this work?
Recall from <a href="Chapter_16.html#Chapter_16">Chapter 16</a> that, due to the central limit theorem, the distribution of sample means (<span class="math inline">\(\bar{y}\)</span>) will be normally distributed around the true mean <span class="math inline">\(\mu\)</span> as sample size <span class="math inline">\(N\)</span> increases.
At low <span class="math inline">\(N\)</span>, when we need to estimate the true standard deviation (<span class="math inline">\(\sigma\)</span>) from the sample standard deviation (<span class="math inline">\(s\)</span>), we need to correct for a bias and use the t-distribution (see <a href="Chapter_19.html#Chapter_19">Chapter 19</a>).
The logic here is to use the t-distribution as the null distribution for <span class="math inline">\(\bar{y}\)</span>.
If we subtract <span class="math inline">\(\mu_{0}\)</span> from <span class="math inline">\(\bar{y}\)</span>, then we can centre the mean of the null distribution at 0.
We can then divide by the standard error of test scores so that we can compare the deviation of <span class="math inline">\(\bar{y}\)</span> from <span class="math inline">\(\mu_{0}\)</span> in terms of the t-distribution.
This is the same idea as calculating a z-score from <a href="Chapter_16.html#probability-and-z-scores">Section 16.2</a>.
In fact, the equations look almost the same,</p>
<p><span class="math display">\[t_{\bar{y}} = \frac{\bar{y} - \mu_{0}}{\mathrm{SE}(\bar{y})}.\]</span></p>
<p>In the above equation, <span class="math inline">\(\mathrm{SE}(\bar{y})\)</span> is the standard error of <span class="math inline">\(\bar{y}\)</span>.</p>
<p>If the sample mean of test scores is really the same as the population mean <span class="math inline">\(\mu_{0} = 60\)</span>, then <span class="math inline">\(\bar{y}\)</span> should have a t-distribution.
Consequently, values of <span class="math inline">\(t_{\bar{y}}\)</span> far from zero would suggest that the sample mean is improbable given the null distribution predicted if <span class="math inline">\(H_{0}: \mu_{0} = \bar{y}\)</span> is true.
We can calculate <span class="math inline">\(t_{\bar{y}}\)</span> for our above sample (note, <span class="math inline">\(\mathrm{SE}(\bar{y}) = s/\sqrt{N} = 8.334373 / \sqrt{10} = 2.63556\)</span>),</p>
<p><span class="math display">\[t_{\bar{y}} = \frac{66.58 - 60}{2.63556} = 2.496623.\]</span></p>
<p>Our t-statistic is therefore 2.496623 (note that a t-statistic can also be negative; this would just mean that our sample mean is less than <span class="math inline">\(\mu_{0}\)</span>, instead of greater than <span class="math inline">\(\mu_{0}\)</span>, but nothing about the t-test changes if this is the case).
We can see where this value falls on the t-distribution with 9 degrees of freedom in Figure 22.1.</p>
<div class="figure"><span style="display:block;" id="fig:unnamed-chunk-82"></span>
<img src="bookdown-demo_files/figure-html/unnamed-chunk-82-1.png" alt="A bell curve of the t-distribution is shown with an arrow pointing downward on the x-axis value about halfway between 2 and 3." width="672" />
<p class="caption">
Figure 22.1: A t-distribution is shown with a calculated t-statistic of 2.49556 indicated with a downward arrow.
</p>
</div>
<p>The t-distribution in Figure 22.1 is the probability distribution if <span class="math inline">\(H_{0}\)</span> is true (i.e., the student test scores were sampled from a distribution with a mean of <span class="math inline">\(\mu_{0} = 60\)</span>).
The arrow pointing to the calculated <span class="math inline">\(t_{\bar{y}} = 2.496623\)</span> indicates that if <span class="math inline">\(H_{0}\)</span> is true, then the sample mean of student test scores <span class="math inline">\(\bar{y} = 66.58\)</span> would be very unlikely.
This is because only a small proportion of the probability distribution in Figure 22.1 is greater than or equal to our t-statistic, <span class="math inline">\(t_{\bar{y}} = 2.496623\)</span>.
In fact, the proportion of t-statistics greater than 2.496623 is only about <span class="math inline">\(P =\)</span> 0.017.
Hence, if our null hypothesis is true, then the probability of getting a mean student test score of 66.58 or higher is <span class="math inline">\(P =\)</span> 0.017 (this is our p-value).
It is important to understand the relationship between the t-statistic and the p-value; an interactive application<a href="#fn45" class="footnote-ref" id="fnref45"><sup>45</sup></a> can help visualise.
Typically, we set a threshold level of <span class="math inline">\(\alpha = 0.05\)</span>, below which we conclude that our p-value is statistically significant (see <a href="Chapter_21.html#Chapter_21">Chapter 21</a>).
Consequently, because our p-value is less than 0.05, we reject our null hypothesis and conclude that student test scores are higher than the reported national average.</p>
</div>
<div id="independent-samples-t-test" class="section level2 hasAnchor" number="22.2">
<h2><span class="header-section-number">22.2</span> Independent samples t-test<a href="Chapter_22.html#independent-samples-t-test" class="anchor-section" aria-label="Anchor link to header"></a></h2>
<p>Perhaps the biology teacher is not actually interested in comparing their students’ test results with those of the reported national average.
After all, there might be many reasons their students score differently from the national average that have nothing to do with their new approach to teaching.
To see if their new approach is working, the teacher might instead decide that a better hypothesis to test is whether or not the mean test score from the current year is higher than the mean test score from the class that they taught in the previous year.
We can use <span class="math inline">\(\bar{y}_{1}\)</span> to denote the mean of test scores from the current year, and <span class="math inline">\(\bar{y}_{2}\)</span> to denote the mean of test scores from the previous year.
The test scores of the current year (<span class="math inline">\(y_{1}\)</span>) therefore remain the same as in the example of the one sample t-test from the previous section.</p>
<pre><code>49.3, 62.9, 73.7, 65.5, 69.6, 70.7, 61.5, 73.4, 61.1, 78.1</code></pre>
<p>Suppose that in the previous year, there were 9 students in the class (i.e., one fewer than the current year).
These 9 students received the following test scores (<span class="math inline">\(y_{2}\)</span>).</p>
<pre><code>57.4, 52.4, 70.5, 71.6, 46.1, 60.4, 70.0, 64.5, 58.8</code></pre>
<p>The mean score from last year was <span class="math inline">\(\bar{y}_{2} = 61.30\)</span>, which does appear to be lower than the mean score of the current year, <span class="math inline">\(\bar{y}_{1} = 66.58\)</span>.
But is the difference between these two means statistically significant?
In other words, were the test scores from each year sampled from a population with the same mean, such that the population mean of the previous year (<span class="math inline">\(\mu_{2}\)</span>) and the current year (<span class="math inline">\(\mu_{1}\)</span>) are the same?
This is the null hypothesis, <span class="math inline">\(H_{0}: \mu_{1} = \mu_{2}\)</span>.</p>
<p>The general idea for testing this null hypothesis is the same as it was in the one sample t-test.
In both cases, we want to calculate a t-statistic, then see where it falls along the t-distribution to decide whether or not to reject <span class="math inline">\(H_{0}\)</span>.
In this case, our t-statistic (<span class="math inline">\(t_{\bar{y}_{1} - \bar{y}_{2}}\)</span>) is calculated slightly differently,</p>
<p><span class="math display">\[t_{\bar{y}_{1} - \bar{y}_{2}} = \frac{\bar{y}_{1} - \bar{y}_{2}}{\mathrm{SE}(\bar{y})}\]</span></p>
<p>The logic is the same as the one sample t-test.
If <span class="math inline">\(\mu_{1} = \mu_{2}\)</span>, then we also would expect <span class="math inline">\(\bar{y}_{1} = \bar{y}_{2}\)</span> (i.e., <span class="math inline">\(\bar{y}_{1} - \bar{y}_{2} = 0\)</span>).
Differences between <span class="math inline">\(\bar{y}_{1}\)</span> and <span class="math inline">\(\bar{y}_{2}\)</span> cause the t-statistic to be either above or below 0, and we can map this deviation of <span class="math inline">\(t_{\bar{y}_{1} - \bar{y}_{2}}\)</span> from 0 to the probability density of the t-distribution after standardising by the standard error (<span class="math inline">\(\mathrm{SE}(\bar{y})\)</span>).</p>
<p>What is <span class="math inline">\(\mathrm{SE}(\bar{y})\)</span> in this case?
After all, there are two different samples <span class="math inline">\(y_{1}\)</span> and <span class="math inline">\(y_{2}\)</span>, so could the two samples not have <em>different</em> standard errors?
This could indeed be the case, and how we actually conduct the independent samples t-test depends on whether or not we are willing to assume that the two samples came from populations with the same variance (i.e., <span class="math inline">\(\sigma_{1} = \sigma_{2}\)</span>).
If we are willing to make this assumption, then we can pool the variances (<span class="math inline">\(s^{2}_{p}\)</span>) together to get a combined (more accurate) estimate of the standard error <span class="math inline">\(\mathrm{SE}(\bar{y})\)</span> from both samples<a href="#fn46" class="footnote-ref" id="fnref46"><sup>46</sup></a><span class="math inline">\(^{,}\)</span><a href="#fn47" class="footnote-ref" id="fnref47"><sup>47</sup></a>.
This version of the independent samples t-test is called the ‘Student’s t-test’.</p>
<p>If we are unwilling to assume that <span class="math inline">\(y_{1}\)</span> and <span class="math inline">\(y_{2}\)</span> have the same variance, then we need to use an alternative version of the independent samples t-test.
This alternative version is called the Welch’s t-test <span class="citation">(<a href="#ref-Welch1938" role="doc-biblioref">Welch, 1938</a>)</span>, also known as the unequal variances t-test <span class="citation">(<a href="#ref-Dytham2011" role="doc-biblioref">Dytham, 2011</a>; <a href="#ref-Ruxton2006" role="doc-biblioref">Ruxton, 2006</a>)</span>.
In contrast to the Student’s t-test, the Welch’s t-test does not pool the variances of the samples together<a href="#fn48" class="footnote-ref" id="fnref48"><sup>48</sup></a>.
While there are some mathematical differences between the Student’s and Welch’s independent samples t-tests, the general concept is the same.</p>
<p>This raises the question, when is it acceptable to assume that <span class="math inline">\(y_{1}\)</span> and <span class="math inline">\(y_{2}\)</span> have the same variance?
The sample variance of <span class="math inline">\(s^{2}_{1} = 69.46\)</span> and <span class="math inline">\(s^{2}_{2} = 76.15\)</span>.
Is this close enough to treat them as the same?
Like a lot of choices in statistics, there is no clear right or wrong answer.
In theory, if both samples do come from a population with the same variance (<span class="math inline">\(\sigma^{2}_{1} = \sigma^{2}_{2}\)</span>), then the pooled variance is better because it gives us a bit more statistical power; we can correctly reject the null hypothesis more often when it is actually false (i.e., it decreases the probability of a Type II error).
Nevertheless, the increase in statistical power is quite low, and the risk of pooling the variances when they actually are not the same increases the risk that we reject the null hypothesis when it is actually true (i.e., it increases the probability of a Type I error, which we definitely do not want!).
For this reason, some researchers advocate using the Welch’s t-test by default, unless there is a very good reason to believe <span class="math inline">\(y_{1}\)</span> and <span class="math inline">\(y_{2}\)</span> are sampled from populations with the same variance <span class="citation">(<a href="#ref-Delacre2017" role="doc-biblioref">Delacre et al., 2017</a>; <a href="#ref-Ruxton2006" role="doc-biblioref">Ruxton, 2006</a>)</span>.</p>
<p>Here we will adopt the traditional approach of first testing the null hypothesis that <span class="math inline">\(\sigma^{2}_{1} = \sigma^{2}_{2}\)</span> using a homogeneity of variances test.
If we fail to reject this null hypothesis (i.e., <span class="math inline">\(P > 0.05\)</span>), then we will use the Student’s t-test, and if we reject it (i.e., <span class="math inline">\(P < 0.05\)</span>), then we will use the Welch’s t-test.
This approach is mostly used for pedagogical reasons; in practice, defaulting to the Welch’s t-test is fine <span class="citation">(<a href="#ref-Delacre2017" role="doc-biblioref">Delacre et al., 2017</a>; <a href="#ref-Ruxton2006" role="doc-biblioref">Ruxton, 2006</a>)</span>.
Testing for homogeneity of variances is quite straightforward in most statistical programs, and we will save the conceptual and mathematical details of this for when we look at the F-distribution in <a href="Chapter_24.html#Chapter_24">Chapter 24</a>.
But the general idea is that if <span class="math inline">\(\sigma^{2}_{1} = \sigma^{2}_{2}\)</span>, then the ratio of variances (<span class="math inline">\(\sigma^{2}_{1}/\sigma^{2}_{2}\)</span>) has its own null distribution (like the normal distribution, or the t-distribution), and we can see the probability of getting a deviation of <span class="math inline">\(\sigma^{2}_{1}/\sigma^{2}_{2}\)</span> from 1 if <span class="math inline">\(\sigma^{2}_{1} = \sigma^{2}_{2}\)</span> is true.</p>
<p>In the case of the test scores from the two samples of students (<span class="math inline">\(y_{1}\)</span> and <span class="math inline">\(y_{2}\)</span>), a homogeneity of variance test reveals no evidence that <span class="math inline">\(s^{2}_{1} = 69.46\)</span> and <span class="math inline">\(s^{2}_{2} = 76.15\)</span> are significantly different (<span class="math inline">\(P = 0.834\)</span>).
We can therefore use the pooled variance and the Student’s independent samples t-test.
We can calculate <span class="math inline">\(\mathrm{SE}(\bar{y}) = 3.915144\)</span> using the formula for <span class="math inline">\(s_{p}\)</span> (again, this is not something that ever actually needs to be done by hand), then find <span class="math inline">\(t_{\bar{y}_{1} - \bar{y}_{2}}\)</span>,</p>
<p><span class="math display">\[t_{\bar{y}_{1} - \bar{y}_{2}} = \frac{\bar{y}_{1} - \bar{y}_{2}}{\mathrm{SE}(\bar{y})} = \frac{66.58 - 61.3}{3.915144} = 1.348609.\]</span></p>
<p>As with the one-sample t-test, we can identify the position of <span class="math inline">\(t_{\bar{y}_{1} - \bar{y}_{2}}\)</span> on the t-distribution (Figure 22.2).</p>
<div class="figure"><span style="display:block;" id="fig:unnamed-chunk-83"></span>
<img src="bookdown-demo_files/figure-html/unnamed-chunk-83-1.png" alt="A bell curve of the t-distribution is shown with an arrow pointing downward on the x-axis value around 1.3." width="672" />
<p class="caption">
Figure 22.2: A t-distribution is shown with a calculated t-statistic of 1.348609 indicated with a downward arrow.
</p>
</div>
<p>The proportion of t-scores that are higher than <span class="math inline">\(t_{\bar{y}_{1} - \bar{y}_{2}} = 1.348609\)</span> is about 0.098.
In other words, given that the null hypothesis is true, the probability of getting a t-statistic this high is <span class="math inline">\(P = 0.098\)</span>.
Because this p-value exceeds our critical value of <span class="math inline">\(\alpha = 0.05\)</span>, we do not reject the null hypothesis.
We therefore should conclude that the mean of test scores from the current year (<span class="math inline">\(\bar{y}_{1}\)</span>) is not significantly different from the mean of test scores in the previous year (<span class="math inline">\(\bar{y}_{2}\)</span>).
The biology teacher in our example might therefore conclude that mean test results have not improved from the previous year.</p>
</div>
<div id="paired-samples-t-test" class="section level2 hasAnchor" number="22.3">
<h2><span class="header-section-number">22.3</span> Paired samples t-test<a href="Chapter_22.html#paired-samples-t-test" class="anchor-section" aria-label="Anchor link to header"></a></h2>
<p>There is one more type of t-test to consider.
The paired samples t-test is applied when the data points in one sample can be naturally paired with those in another sample.
In this case, data points between samples are not independent.
For example, we can consider the student test scores (<span class="math inline">\(y_{1}\)</span>) yet again.</p>
<pre><code>49.3, 62.9, 73.7, 65.5, 69.6, 70.7, 61.5, 73.4, 61.1, 78.1</code></pre>
<p>Suppose that the teacher gave these same 10 students (S1–S10) a second test and wanted to see if the mean student score changed from one test to the next (i.e., a two-sided hypothesis).</p>
<table style="width:100%;">
<caption><strong>TABLE 22.1</strong> Test scores from 10 students (S1–S10) for two different tests in a hypothetical biology education example.</caption>
<colgroup>
<col width="15%" />
<col width="8%" />
<col width="8%" />
<col width="8%" />
<col width="8%" />
<col width="8%" />
<col width="8%" />
<col width="8%" />
<col width="8%" />
<col width="8%" />
<col width="8%" />
</colgroup>
<thead>
<tr class="header">
<th align="center"> </th>
<th align="center">S1</th>
<th align="center">S2</th>
<th align="center">S3</th>
<th align="center">S4</th>
<th align="center">S5</th>
<th align="center">S6</th>
<th align="center">S7</th>
<th align="center">S8</th>
<th align="center">S9</th>
<th align="center">S10</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td align="center"><strong>Test 1</strong></td>
<td align="center">49.3</td>
<td align="center">62.9</td>
<td align="center">73.7</td>
<td align="center">65.5</td>
<td align="center">69.6</td>
<td align="center">70.7</td>
<td align="center">61.5</td>
<td align="center">73.4</td>
<td align="center">61.1</td>
<td align="center">78.1</td>
</tr>
<tr class="even">
<td align="center"><strong>Test 2</strong></td>
<td align="center">46.6</td>
<td align="center">62.7</td>
<td align="center">73.8</td>
<td align="center">58.3</td>
<td align="center">66.8</td>
<td align="center">69.7</td>
<td align="center">64.5</td>
<td align="center">71.3</td>
<td align="center">64.5</td>
<td align="center">78.8</td>
</tr>
<tr class="odd">
<td align="center"><strong>Change</strong></td>
<td align="center">-2.7</td>
<td align="center">-0.2</td>
<td align="center">0.1</td>
<td align="center">-7.2</td>
<td align="center">-2.8</td>
<td align="center">-1</td>
<td align="center">3</td>
<td align="center">-2.1</td>
<td align="center">3.4</td>
<td align="center">0.7</td>
</tr>
</tbody>
</table>
<p>In this case, what we are really interested in is the <em>change</em> in scores from Test 1 to Test 2.
We want to test the null hypothesis that this change is zero.
This is actually the same test as the one-sample t-test.
We are just substituting the mean difference in values (i.e., ‘Change’ in Table 22.1) for <span class="math inline">\(\bar{y}\)</span> and setting <span class="math inline">\(\mu_{0} = 0\)</span>.
We can calculate <span class="math inline">\(\bar{y} = -0.88\)</span> and <span class="math inline">\(\mathrm{SE}(\bar{y})=0.9760237\)</span>, then set up the t-test as before,</p>
<p><span class="math display">\[t_{\bar{y}} = \frac{-0.88 - 0}{0.9760237} = -0.9016175.\]</span></p>
<p>Again, we can find the location of our t-statistic <span class="math inline">\(t_{\bar{y}} = -0.9016175\)</span> on the t-distribution (Figure 22.3).</p>
<div class="figure"><span style="display:block;" id="fig:unnamed-chunk-85"></span>
<img src="bookdown-demo_files/figure-html/unnamed-chunk-85-1.png" alt="A bell curve of the t-distribution is shown with an arrow pointing downward on the x-axis value around -0.9." width="672" />
<p class="caption">
Figure 22.3: A t-distribution is shown with a calculated t-statistic of <span class="math inline">\(-0.9016175\)</span> indicated with a downward arrow.
</p>
</div>
<p>Since this is a two-sided hypothesis, we want to know the probability of getting a t-statistic as extreme as <span class="math inline">\(-0.9016175\)</span> (i.e., either <span class="math inline">\(\pm 0.9016175\)</span>) given that the null distribution is true.
In the above t-distribution, 95% of the probability density lies between <span class="math inline">\(t = -2.26\)</span> and <span class="math inline">\(t = 2.26\)</span>.
Consequently, our calculated <span class="math inline">\(t_{\bar{y}} = -0.9016175\)</span> is not sufficiently extreme to reject the null hypothesis.
The p-value associated with <span class="math inline">\(t_{\bar{y}} = -0.9016175\)</span> is <span class="math inline">\(P = 0.391\)</span>.
We therefore fail to reject <span class="math inline">\(H_{0}\)</span> and conclude that there is no significant difference in student test scores from Test 1 to Test 2.</p>
</div>
<div id="assumptions-of-t-tests" class="section level2 hasAnchor" number="22.4">
<h2><span class="header-section-number">22.4</span> Assumptions of t-tests<a href="Chapter_22.html#assumptions-of-t-tests" class="anchor-section" aria-label="Anchor link to header"></a></h2>
<p>We make some potentially important assumptions when using t-tests.
A consequence of violating these assumptions is a misleading Type I error rate.
That is, if our data do not fit the assumptions of our statistical test, then we might not actually be rejecting our null hypothesis at the <span class="math inline">\(\alpha = 0.05\)</span> level.
We might unknowingly be rejecting <span class="math inline">\(H_{0}\)</span> when it is true at a much higher <span class="math inline">\(\alpha\)</span> value, and therefore concluding that we have evidence supporting the alternative hypothesis <span class="math inline">\(H_{A}\)</span> when we really do not.
It is important to recognise the assumptions that we are making when using any statistical test (including t-tests).
If our assumptions are violated, we might need to use a different test, or perhaps apply some kind of transformation on the data.
Assumptions that we make when conducting a t-test are as follows:</p>
<ul>
<li>Data are continuous (i.e., not count or categorical data)</li>
<li>Sample observations are a random sample from the population</li>
<li>Sample means are normally distributed around the true mean</li>
</ul>
<p>Note that if we are running a Student’s independent samples t-test that pools sample variances (rather than a Welch’s t-test), then we are also assuming that sample variances are the same (i.e., homogeneity of variance).
The last bullet point concerning normally distributed sample means is frequently misunderstood to mean that the sample data themselves need to be normally distributed.
This is not the case <span class="citation">(<a href="#ref-Johnson1995" role="doc-biblioref">Johnson, 1995</a>; <a href="#ref-Lumley2002" role="doc-biblioref">Lumley et al., 2002</a>)</span>.
Instead, what we are really concerned with is the distribution of sample means (<span class="math inline">\(\bar{y}\)</span>) around the true mean (<span class="math inline">\(\mu\)</span>).
And given a sufficiently large sample size, a normal distribution is assured due to the central limit theorem (see <a href="Chapter_16.html#Chapter_16">Chapter 16</a>).</p>
<p>Moreover, while a normally distributed variable is not <em>necessary</em> for satisfying the assumptions of a t-test (or many other tests introduced in this book), it is <em>sufficient</em>.
In other words, if the variable being measured is normally distributed, then the sample means will also be normally distributed around the true mean (even for a low sample size).
So when is a sample size large enough, or close enough to being normally distributed, for the assumption of normality to be satisfied?
There really is not a definitive answer to this question, and the truth is that most statisticians will prefer to use a histogram (or some other visualisation approach) and their best judgement to decide if the assumption of normality is likely to be violated.</p>
<p>This book will take the traditional approach of running a statistical test called the Shapiro-Wilk test to test the null hypothesis that data are normally distributed.
If we reject the null hypothesis (when <span class="math inline">\(P < 0.05\)</span>), then we will conclude that the assumption of normality is violated, and the t-test is not appropriate.
The details of how the Shapiro-Wilk test works are not important for now, but the test can be easily run using jamovi <span class="citation">(<a href="#ref-Jamovi2022" role="doc-biblioref">The jamovi project, 2024</a>)</span>.
If we reject the null hypothesis that the data are normally distributed, then we can use one of two methods to run our statistical test.</p>
<ol style="list-style-type: decimal">
<li>Transform the data in some way (e.g., take the log of all values) to improve normality.</li>
<li>Use a non-parametric alternative test.</li>
</ol>
<p>The word ‘non-parametric’ in this context just means that there are no assumptions (or very few) about the shape of the distribution <span class="citation">(<a href="#ref-Dytham2011" role="doc-biblioref">Dytham, 2011</a>)</span>.
We will consider the non-parametric equivalents of the one-sample t-test (the Wilcoxon test) and independent samples t-test (Mann-Whitney U test) in the next section.
But first, we can show how transformations can be used to improve the fit of the data to satisfy model assumptions.</p>
<p>Often data will have a skewed distribution (see <a href="Chapter_13.html#Chapter_13">Chapter 13</a>).
For example, in Figure 22.4A, we have a dataset (sample size <span class="math inline">\(N = 200\)</span>) with a large positive skew (i.e., it is right-skewed).
Most values are in the same general area, but with some values being especially high.</p>
<div class="figure"><span style="display:block;" id="fig:unnamed-chunk-86"></span>
<img src="bookdown-demo_files/figure-html/unnamed-chunk-86-1.png" alt="A two paneled figure in which a histogram with a skewed distribution is shown to the left and a histogram with a normal distribution is shown to the right." width="672" />
<p class="caption">
Figure 22.4: Set of values with a high positive skew (A), which, when log-transformed (i.e., when we take the natural log of all values), have a normal distribution (B).
</p>
</div>
<p>Using a t-test on the variable <span class="math inline">\(X\)</span> shown in Figure 22.4A is probably not a good idea.
But taking the natural log of all the values of <span class="math inline">\(X\)</span> makes the dataset more normally distributed (Figure 22.4B), thereby more convincingly satisfying the normality assumption required by the t-test.
This might seem a bit suspicious at first.
Is it really okay to just take the logarithm of all the data instead of the actual values that were measured?
Actually, there is no real scientific or statistical reason that we need to use the original scale <span class="citation">(<a href="#ref-Sokal1995" role="doc-biblioref">Sokal & Rohlf, 1995</a>)</span>.
Using the log or the square-root of a set of numbers is perfectly fine if it helps satisfy the assumptions of a statistical test.</p>
</div>
<div id="non-parametric-alternatives" class="section level2 hasAnchor" number="22.5">
<h2><span class="header-section-number">22.5</span> Non-parametric alternatives<a href="Chapter_22.html#non-parametric-alternatives" class="anchor-section" aria-label="Anchor link to header"></a></h2>
<p>If we find that the assumption of normality is not satisfied, and a transformation of the data cannot help, then we can consider using non-parametric alternatives to a t-test.
These alternatives include the Wilcoxon test and the Mann-Whitney U test.</p>
<div id="wilcoxon-test" class="section level3 hasAnchor" number="22.5.1">
<h3><span class="header-section-number">22.5.1</span> Wilcoxon test<a href="Chapter_22.html#wilcoxon-test" class="anchor-section" aria-label="Anchor link to header"></a></h3>
<p>The Wilcoxon test (also called the ‘Wilcoxon signed-rank test’) is the non-parametric alternative to a one sample t-test (or a paired t-test).
Instead of using the actual data, the Wilcoxon test ranks all of the values in the dataset, then sums up their signs (either positive or negative).
The general idea is that we can compare the sum of the <em>ranks</em> of the actual data with what would be predicted by the null hypothesis.
It tests the null hypothesis that the <em>median</em> (<span class="math inline">\(M\)</span>) is significantly different from some given value<a href="#fn49" class="footnote-ref" id="fnref49"><sup>49</sup></a>.
An example will make it easier to see how it works.
We can use the same hypothetical dataset on student test scores.</p>
<pre><code>49.3, 62.9, 73.7, 65.5, 69.6, 70.7, 61.5, 73.4, 61.1, 78.1</code></pre>
<p>The first step is to subtract the null hypothesis value (<span class="math inline">\(M = 60\)</span>, if we again set <span class="math inline">\(H_{0}\)</span> to be that the average student test score equals 60) from each value (<span class="math inline">\(49.3 - 60 = -10.7\)</span>, <span class="math inline">\(62.9 - 60 = 2.9\)</span>, etc.).</p>
<pre><code>-10.7, 2.9, 13.7, 5.5, 9.6, 10.7, 1.5, 13.4, 1.1, 18.1</code></pre>
<p>We need to note the sign of each value as negative (<span class="math inline">\(-\)</span>) or positive (<span class="math inline">\(+\)</span>).</p>
<pre><code>-, +, +, +, +, +, +, +, +, +</code></pre>
<p>Next, we need to compute the absolute values of the numbers (i.e., <span class="math inline">\(|-10.7| = 10.7\)</span>, <span class="math inline">\(|2.9| = 2.9\)</span>, <span class="math inline">\(|13.7| = 13.7\)</span>, etc.).</p>
<pre><code>10.7, 2.9, 13.7, 5.5, 9.6, 10.7, 1.5, 13.4, 1.1, 18.1</code></pre>
<p>We then rank these values from lowest to highest and record the sign of each value.</p>
<pre><code>6.5, 3.0, 9.0, 4.0, 5.0, 6.5, 2.0, 8.0, 1.0, 10.0</code></pre>
<p>Note that both the first and sixth position had the same value (10.7), so instead of ranking them as 6 and 7, we split the difference and rank both as 6.5.
Now, we can calculate the sum of the negative ranks (<span class="math inline">\(W^{-}\)</span>), and the positive ranks <span class="math inline">\(W^{+}\)</span>.
In this case, the negative ranks are easy; there is only one value (the first one), so the sum is just 6.5,</p>
<p><span class="math display">\[W^{-} = 6.5\]</span></p>
<p>The positive ranks are in positions 2–10, and the rank values in these positions are 3, 9, 4, 5, 6.5, 2, 8, 1, and 10.
The sum of our positive ranks is therefore,</p>
<p><span class="math display">\[W^{+} = 3.0 + 9.0 + 4.0 + 5.0 + 6.5 + 2.0 + 8.0 + 1.0 + 10.0 = 48.5\]</span></p>
<p>Note that <span class="math inline">\(W^{-}\)</span> plus <span class="math inline">\(W^{+}\)</span> (i.e., 6.5 + 48.5 = 55 in the example here) will always be the same for a given sample size <span class="math inline">\(N\)</span> (in this case, <span class="math inline">\(N = 10\)</span>),</p>
<p><span class="math display">\[W = \frac{N \left(N + 1 \right)}{2}.\]</span></p>
<p>What the Wilcoxon test is doing is calculating the probability of getting a value of <span class="math inline">\(W^{+}\)</span> as or more extreme than would be the case if the null hypothesis is true.
Note that if, e.g., there are an equal number of values above and below the median, then both <span class="math inline">\(W^{-}\)</span> and <span class="math inline">\(W^{+}\)</span> will be relatively low and about the same value.
This is because the ranks of the values below 0 (which we multiply by <span class="math inline">\(-1\)</span>) and above 0 (which we multiply by 1) will be about the same.
But if there are a lot more values above the median than expected (as with the example above), then <span class="math inline">\(W^{+}\)</span> will be relatively high.
And if there are a lot more values below the median than expected, then <span class="math inline">\(W^{+}\)</span> will be relatively low.</p>
<p>To find the probability of <span class="math inline">\(W^{+}\)</span> being as low or high as it is given that the null hypothesis is true (i.e., the p-value), we need to compare the test statistic <span class="math inline">\(W^{+}\)</span> to its distribution under the null hypothesis (note that we can also conduct a one-tailed hypothesis, in which case we are testing if <span class="math inline">\(W^{+}\)</span> is either higher or lower than expected given <span class="math inline">\(H_{0}\)</span>).
The old way of doing this is to compare the calculated <span class="math inline">\(W^{+}\)</span> to threshold values from a Wilcoxon Signed-Ranks Table.
This critical value table is no longer necessary, and statistical software such as jamovi will calculate a p-value for us.
For the example above, the p-value associated with <span class="math inline">\(W^{+} = 48.5\)</span> and <span class="math inline">\(N = 10\)</span> is <span class="math inline">\(P = 0.037\)</span>.
Since this p-value is less than our threshold of <span class="math inline">\(\alpha = 0.05\)</span>, we can reject the null hypothesis and conclude that the median of our dataset is significantly different from 60.</p>
<p>Note that we can also use a Wilcoxon signed rank test as a non-parametric equivalent to a paired t-test.
In this case, instead of subtracting out the null hypothesis of our median value (e.g., <span class="math inline">\(H_{0}: M = 60\)</span> in the example above), we just need to subtract the paired values.
Consider again the example of the two different tests introduced for the <a href="#paired-sample-t-test">paired samples t-test</a> above (Table 22.2).</p>
<table style="width:100%;">
<caption><strong>TABLE 22.2</strong> Test scores from 10 students (S1–S10) for two different tests in a hypothetical biology education example.</caption>
<colgroup>
<col width="15%" />
<col width="8%" />
<col width="8%" />
<col width="8%" />
<col width="8%" />
<col width="8%" />
<col width="8%" />
<col width="8%" />
<col width="8%" />
<col width="8%" />
<col width="8%" />
</colgroup>
<thead>
<tr class="header">
<th align="center"> </th>
<th align="center">S1</th>
<th align="center">S2</th>
<th align="center">S3</th>
<th align="center">S4</th>
<th align="center">S5</th>
<th align="center">S6</th>
<th align="center">S7</th>
<th align="center">S8</th>
<th align="center">S9</th>
<th align="center">S10</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td align="center"><strong>Test 1</strong></td>
<td align="center">49.3</td>
<td align="center">62.9</td>
<td align="center">73.7</td>
<td align="center">65.5</td>
<td align="center">69.6</td>
<td align="center">70.7</td>
<td align="center">61.5</td>
<td align="center">73.4</td>
<td align="center">61.1</td>
<td align="center">78.1</td>
</tr>
<tr class="even">
<td align="center"><strong>Test 2</strong></td>
<td align="center">46.6</td>
<td align="center">62.7</td>
<td align="center">73.8</td>
<td align="center">58.3</td>
<td align="center">66.8</td>
<td align="center">69.7</td>
<td align="center">64.5</td>
<td align="center">71.3</td>
<td align="center">64.5</td>
<td align="center">78.8</td>
</tr>
<tr class="odd">
<td align="center"><strong>Change</strong></td>
<td align="center">-2.7</td>
<td align="center">-0.2</td>
<td align="center">0.1</td>
<td align="center">-7.2</td>
<td align="center">-2.8</td>
<td align="center">-1</td>
<td align="center">3</td>
<td align="center">-2.1</td>
<td align="center">3.4</td>
<td align="center">0.7</td>
</tr>
</tbody>
</table>
<p>If the ‘Change’ values in Table 22.2 were not normally distributed, then we could apply a Wilcoxon test to test the null hypothesis that the median value of <span class="math inline">\(Test\:2 - Test\:1 = 0\)</span> (note that a Shapiro-Wilk normality test does not reject the null hypothesis that the difference between test scores is normally distributed, so the paired t-test would be preferred in this case).
To do this, we would first note the sign of each value as negative or positive.</p>
<pre><code>-, -, +, -, -, -, +, -, +, +</code></pre>
<p>Next, we would rank the absolute values of the changes.</p>
<pre><code>6, 2, 1, 10, 7, 4, 8, 5, 9, 3</code></pre>
<p>If we then sum the ranks, we get <span class="math inline">\(W^{-} = 6 + 2 + 10 + 7 + 4 + 5 = 34\)</span> and <span class="math inline">\(W^{+} = 1 + 8 + 9 + 3 = 21\)</span>.
The p-value associated with <span class="math inline">\(W^{+} = 21\)</span> and <span class="math inline">\(N = 10\)</span> in a two-tailed test is <span class="math inline">\(P = 0.557\)</span>, so we do not reject the null hypothesis that Test 1 and Test 2 have the same median.</p>
</div>
<div id="mann-whitney-u-test" class="section level3 hasAnchor" number="22.5.2">
<h3><span class="header-section-number">22.5.2</span> Mann-Whitney U test<a href="Chapter_22.html#mann-whitney-u-test" class="anchor-section" aria-label="Anchor link to header"></a></h3>
<p>A non-parametric alternative to the independent samples t-test is the Mann-Whitney U test.
That is, a Mann-Whitney U test can be used if we want to know whether the median of two independent groups is significantly different.
Like the Wilcoxon test, the Mann-Whitney U test uses the ranks of values rather than the values themselves.
In the Mann-Whitney U test, the general idea is to rank all of the data across both groups, then see if the sum of the ranks is significantly different <span class="citation">(<a href="#ref-Fryer1966" role="doc-biblioref">Fryer, 1966</a>; <a href="#ref-Sokal1995" role="doc-biblioref">Sokal & Rohlf, 1995</a>)</span>.
To demonstrate this, we can again consider the same hypothetical dataset used when demonstrating the <a href="Chapter_22.html#independent-samples-t-test">independent samples t-test</a> above.
Test scores from the current year (<span class="math inline">\(y_{1}\)</span>) are below.</p>
<pre><code>49.3, 62.9, 73.7, 65.5, 69.6, 70.7, 61.5, 73.4, 61.1, 78.1</code></pre>
<p>We want to know if the median of the above scores is significantly different from the median scores in the previous year (<span class="math inline">\(y_{2}\)</span>) shown below.</p>
<pre><code>57.4, 52.4, 70.5, 71.6, 46.1, 60.4, 70.0, 64.5, 58.8</code></pre>
<p>There are 19 values in total, 10 values for <span class="math inline">\(y_{1}\)</span> and 9 values for <span class="math inline">\(y_{2}\)</span>.
We therefore rank <em>all</em> of the above values from 1 to 19.
For <span class="math inline">\(y_{1}\)</span>, the ranks are below.</p>
<pre><code>2, 9, 18, 11, 12, 15, 8, 17, 7, 19</code></pre>
<p>For <span class="math inline">\(y_{2}\)</span>, the ranks are below.</p>
<pre><code>4, 3, 14, 16, 1, 6, 13, 10, 5</code></pre>
<p>This might be easier to see if we present it as a table showing the test Year (<span class="math inline">\(y_{1}\)</span> versus <span class="math inline">\(y_{2}\)</span>), test Score, and test Rank (Table 22.3).</p>
<table style="width:32%;">
<caption><strong>TABLE 22.3</strong> Test scores from different students across 2 years, and the overall rank of each test score, in a hypothetical biology education example.</caption>
<colgroup>
<col width="9%" />
<col width="11%" />
<col width="11%" />
</colgroup>
<thead>
<tr class="header">
<th align="center">Year</th>
<th align="center">Score</th>
<th align="center">Rank</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td align="center">1</td>
<td align="center">49.3</td>
<td align="center">2</td>
</tr>
<tr class="even">
<td align="center">1</td>
<td align="center">62.9</td>
<td align="center">9</td>
</tr>
<tr class="odd">
<td align="center">1</td>
<td align="center">73.7</td>
<td align="center">18</td>
</tr>
<tr class="even">
<td align="center">1</td>
<td align="center">65.5</td>
<td align="center">11</td>
</tr>
<tr class="odd">
<td align="center">1</td>
<td align="center">69.6</td>
<td align="center">12</td>
</tr>
<tr class="even">
<td align="center">1</td>
<td align="center">70.7</td>
<td align="center">15</td>
</tr>
<tr class="odd">
<td align="center">1</td>
<td align="center">61.5</td>
<td align="center">8</td>
</tr>
<tr class="even">
<td align="center">1</td>
<td align="center">73.4</td>
<td align="center">17</td>
</tr>
<tr class="odd">
<td align="center">1</td>
<td align="center">61.1</td>
<td align="center">7</td>
</tr>
<tr class="even">
<td align="center">1</td>
<td align="center">78.1</td>
<td align="center">19</td>
</tr>
<tr class="odd">
<td align="center">2</td>
<td align="center">57.4</td>
<td align="center">4</td>
</tr>
<tr class="even">
<td align="center">2</td>
<td align="center">52.4</td>
<td align="center">3</td>
</tr>
<tr class="odd">
<td align="center">2</td>
<td align="center">70.5</td>
<td align="center">14</td>
</tr>
<tr class="even">
<td align="center">2</td>
<td align="center">71.6</td>
<td align="center">16</td>
</tr>
<tr class="odd">
<td align="center">2</td>
<td align="center">46.1</td>
<td align="center">1</td>
</tr>
<tr class="even">
<td align="center">2</td>
<td align="center">60.4</td>
<td align="center">6</td>
</tr>
<tr class="odd">
<td align="center">2</td>
<td align="center">70</td>
<td align="center">13</td>
</tr>
<tr class="even">
<td align="center">2</td>
<td align="center">64.5</td>
<td align="center">10</td>
</tr>
<tr class="odd">
<td align="center">2</td>
<td align="center">58.8</td>
<td align="center">5</td>
</tr>
</tbody>
</table>
<p>What we need to do now is sum the ranks for <span class="math inline">\(y_{1}\)</span> and <span class="math inline">\(y_{2}\)</span>.
If we add up the <span class="math inline">\(y_{1}\)</span> ranks, then we get a value of <span class="math inline">\(R_{1}=\)</span> 118.
If we add up the <span class="math inline">\(y_{2}\)</span> ranks, then we get a value of <span class="math inline">\(R_{2}=\)</span> 72.
We can then calculate a value <span class="math inline">\(U_{1}\)</span> from <span class="math inline">\(R_{1}\)</span> and the sample size of <span class="math inline">\(y_{1}\)</span> (<span class="math inline">\(N_{1}\)</span>),</p>
<p><span class="math display">\[U_{1} = R_{1} - \frac{N_{1}\left(N_{1} + 1 \right)}{2}.\]</span></p>