forked from saundersg/Statistics-Notebook
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindex.Rmd
executable file
·536 lines (248 loc) · 13.7 KB
/
index.Rmd
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
---
title: "Statistics Notebook"
---
<!-- You can delete the following copyright statement if you wish: -->
<div style="color:gray;"><!-- Code to change the following paragraphs to gray text -->
This page, and all pages of this notebook, are meant to be customized to become a useful *Guide to Statistical Analysis* in R for your *current* and *future* self.
<div style="font-size:.8em;"><!-- Code to shrink font-size of following paragraph -->
To begin customizing, [download](https://github.com/saundersg/Statistics-Notebook) your own copy of the book <span style="font-size:.8em;">(if you haven't already)</span>. Please note the [GNU General Public License](https://choosealicense.com/licenses/gpl-3.0/) when downloading. You are free to delete this commentary in your own copy of the notebook.
</div><!-- Ends smaller font-size section -->
</div><!-- End gray text section -->
<!-- End of download and copyright instructions. -->
## Table of Contents
<!-- This is how to comment text out. You can comment out the above instructions if you wish. Comments allow the text to remain in the Rmd file, but not be displayed in the html file. -->
## {.tabset .tabset-fade}
### Hide
### Show Notes
<!-- This is a great place to add general notes, then "Knit" the file to have your notes show up in your Statistics-Notebook. --------------- -->
Wow! I typed some words. Some <span style="color:blue;">blue words</span>, some <span style="background-color:yellow;">highlighted words</span>, some <span style="font-size:2em;">big words</span>.
Make a link to a meaningful page of the Statistics-Notebook: [Customization Help](RMarkdownHints.html) <- Read through this page!
Or to a page on the internet: [R Colors](http://www.stat.columbia.edu/~tzheng/files/Rcolor.pdf)
```{r}
mean(airquality$Temp)
```
<!-- End your notes before here. ------------------------------------- -->
##
----
<div style="float:left;width:125px;" align=center class="tooltipimage">
<img src="./Images/QuantY.png" width=35px;>
<span class="tooltipimagetext">Y is a single quantitative variable of interest. This would be like "heights" of BYU-Idaho students.</span>
</div>
## One Quantitative Response Variable Y {.tabset .tabset-pills}
### Graphics
<div style="padding-left:125px;color:lightgray;">
<!-- Add your customizations in the area below: -->
Add your own notes about graphics to use for this type of data here.
<a href="GraphicalSummaries.html#histogram">
<img class="myhover" src="./Images/histogram.png" alt="Histogram" title="Histogram">
</a>
<a href="GraphicalSummaries.html#dot-plots">
<img class="myhover" src="./Images/dotplotsingle.png" alt="Dot Plot" title="Dot Plot">
</a>
<a href="GraphicalSummaries.html#boxplots">
<img class="myhover" src="./Images/boxplotsingle.png" alt="Boxplot" title="Boxplot">
</a>
<!--- End your notes before here. ------------------>
</div>
### Tests
<div style="padding-left:125px;color:lightgray;">
<!-- Add your customizations in the area below: -->
Add your own notes about appropriate inferential procedures for this type of data here.
<!--- End of Add content area. ------------------>
</div>
#
<div style="clear:both;"></div>
----
<div style="float:left;width:125px;" align=center class="tooltipimage">
<img src="./Images/QuantYQualXg2.png" width=59px;>
<span class="tooltipimagetext">Y is a single quantitative variable of interest. This would be like "heights" of BYU-Idaho students. X is a qualitative (categorical) variable of interest like "gender" that has just two groups "A" and "B". So this logo represents situtations where we would want to compare heights of male (group A) and female (group B) students.</span>
</div>
## Quantitative Y | Categorical X (2 Groups) {.tabset .tabset-pills}
### Graphics
<div style="padding-left:125px;color:lightgray;">
<!-- Add your customizations in the area below: -->
Add your own notes about graphics to use for this type of data here.
<a href="GraphicalSummaries.html#boxplots">
<img class="myhover" src="./Images/boxplot.png" alt="Side-by-side Boxplots" title="Side-by-side Boxplots">
</a>
<a href="GraphicalSummaries.html#dot-plots">
<img class="myhover" src="./Images/dotplotdouble.png" alt="Dot Plot" title="Side-by-side Dot Plots">
</a>
<!--- End of Add content area. ------------------>
</div>
### Tests
<div style="padding-left:125px;color:lightgray;">
<!-- Add your customizations in the area below: -->
<!--- End of Add content area. ------------------>
</div>
##
<div style="clear:both;"></div>
----
<div style="float:left;width:125px;" align=center class="tooltipimage">
<img src="./Images/QuantYQualXg3plus.png" width=59px;>
<span class="tooltipimagetext">Y is a single quantitative variable of interest, like "heights" of BYU-Idaho students. X is a categorical (qualitative) variable like which Math 221 you took, 221A, 221B, or 221C. In other words, X has three or more groups. So "Classrank" could be X, with groups "Freshman", "Sophomore", "Junior", and "Senior".</span>
</div>
## Quantitative Y | Categorical X (3+ Groups) {.tabset .tabset-pills}
### Graphics
<div style="padding-left:125px;color:lightgray;">
<!-- Add your customizations in the area below: -->
Add your own notes about graphics to use for this type of data here.
<a href="GraphicalSummaries.html#boxplots">
<img class="myhover" src="./Images/boxplotthree.png" alt="Side-by-side Boxplots" title="Side-by-side Boxplots 3+ Groups">
</a>
<a href="GraphicalSummaries.html#dot-plots">
<img class="myhover" src="./Images/dotplottriple.png" alt="Side-by-side Dot Plots" title="Side-by-side Dot Plots 3+ Groups">
</a>
<!--- End of Add content area. ------------------>
</div>
### Tests
<div style="padding-left:125px;color:lightgray;">
<!-- Add your customizations in the area below: -->
Add your own notes about appropriate inferential procedures for this type of data here.
<!--- End of Add content area. ------------------>
</div>
#
<div style="clear:both;"></div>
----
<div style="float:left;width:125px;" align=center class="tooltipimage">
<img src="./Images/QuantYMultQualX.png" width=80px;>
<span class="tooltipimagetext">Y is a single quantitative variable of interest, like "heights" of BYU-Idaho students. X1 is a categorical (qualitative) variable like gender, with levels "boy" and "girl." X2 is another categorical (qualitative) variable like "Classrank" with levels "Freshman", "Sophomore", and "Junior". Of course, both X1 and X2 can have as many levels as you want to work with, but must have at least two levels each.</span>
</div>
## Quantitative Y | Multiple Categorical X {.tabset .tabset-pills}
### Graphics
<div style="padding-left:125px;color:lightgray;">
<!-- Add your customizations in the area below: -->
Add your own notes about graphics to use for this type of data here.
<a href="GraphicalSummaries.html#boxplots">
<img class="myhover" src="./Images/boxplotthree.png" alt="Side-by-side Boxplots" title="Side-by-side Boxplots 3+ Groups">
</a>
<a href="GraphicalSummaries.html#dot-plots">
<img class="myhover" src="./Images/dotplottriple.png" alt="Side-by-side Dot Plots" title="Side-by-side Dot Plots 3+ Groups">
</a>
<!--- End of Add content area. ------------------>
</div>
### Tests
<div style="padding-left:125px;color:lightgray;">
<!-- Add your customizations in the area below: -->
Add your own notes about appropriate inferential procedures for this type of data here.
<!--- End of Add content area. ------------------>
</div>
#
<div style="clear:both;"></div>
----
<div style="float:left;width:125px;" align=center class="tooltipimage">
<img src="./Images/QuantYQuantX.png" width=59px;>
<span class="tooltipimagetext">Y is a single quantitative variable of interest, like "height". X is another single quantitative variable of interest, like "shoe-size". This would imply we are using "shoe-size" (X) to explain "height" (Y).</span>
</div>
## Quantitative Y | Quantitative X {.tabset .tabset-pills}
### Graphics
<div style="padding-left:125px;color:lightgray;">
<!-- Add your customizations in the area below: -->
Add your own notes about graphics to use for this type of data here.
<a href="GraphicalSummaries.html#scatterplots">
<img class="myhover" src="./Images/scatterplot.png" alt="Scatterplot" title="Scatterplot">
</a>
<!--- End of Add content area. ------------------>
</div>
### Tests
<div style="padding-left:125px;color:lightgray;">
<!-- Add your customizations in the area below: -->
Add your own notes about appropriate inferential procedures for this type of data here.
<!--- End of Add content area. ------------------>
</div>
#
<div style="clear:both;"></div>
----
<div style="float:left;width:125px;" align=center class="tooltipimage">
<img src="./Images/QuantYMultX.png" width=100px;>
<span class="tooltipimagetext">Y is a single quantitative variable of interest, like height. While we could use an X1 of "shoe-size" to explain height, we might also want to use a second x-variable, X2, like "gender" to help explain height. Further x-variables could also be used.</span>
</div>
## Quantitative Y | Multiple X {.tabset .tabset-pills}
### Graphics
<div style="padding-left:125px;color:lightgray;">
<!-- Add your customizations in the area below: -->
Add your own notes about graphics to use for this type of data here.
<a href="GraphicalSummaries.html#scatterplots">
<img class="myhover" src="./Images/scatterplotmany.png" alt="Scatterplot" title="Scatterplot with Color and Sizing">
</a>
<!--- End of Add content area. ------------------>
</div>
### Tests
<div style="padding-left:125px;color:lightgray;">
<!-- Add your customizations in the area below: -->
Add your own notes about appropriate inferential procedures for this type of data here.
<!--- End of Add content area. ------------------>
</div>
#
<div style="clear:both;"></div>
----
<div style="float:left;width:125px;" align=center class="tooltipimage">
<img src="./Images/BinomYQuantX.png" width=59px;>
<span class="tooltipimagetext">Y is a single categorical (qualitative) variable of interest where 1 (success) or 0 (failure) are the only possible values for Y. This would be like "getting an A in Math 325" where 1 means you got an A and 0 means you didn't. We might use an explanatory variable X of "height" to see if taller students are more likely to get an A in Math 325 than shorter students. (They aren't, if you were wondering.)</span>
</div>
## Binomial Y | Quantitative X {.tabset .tabset-pills}
### Graphics
<div style="padding-left:125px;color:lightgray;">
<!-- Add your customizations in the area below: -->
Add your own notes about graphics to use for this type of data here.
<a href="GraphicalSummaries.html#scatterplots">
<img class="myhover" src="./Images/scatterplotbinomY.png" alt="Scatterplot with Binomial Y" title="Scatterplot with Binomial Y">
</a>
<!--- End of Add content area. ------------------>
</div>
### Tests
<div style="padding-left:125px;color:lightgray;">
<!-- Add your customizations in the area below: -->
Add your own notes about appropriate inferential procedures for this type of data here.
<!--- End of Add content area. ------------------>
</div>
#
<div style="clear:both;"></div>
----
<div style="float:left;width:125px;" align=center class="tooltipimage">
<img src="./Images/BinomYMultX.png" width=100px;>
<span class="tooltipimagetext">Y is a single categorical (qualitative) variable of interest where 1 (success) or 0 (failure) are the only possible values for Y. This would be like "getting an A in Math 325" where 1 means you got an A and 0 means you didn't. We might use an explanatory variable X1 of "height" and a second explanatory variable X2 of "gender" to try to predict whether or not a student will get an A in Math 325.</span>
</div>
## Binomial Y | Multiple X {.tabset .tabset-pills}
### Graphics
<div style="padding-left:125px;color:lightgray;">
<!-- Add your customizations in the area below: -->
Add your own notes about graphics to use for this type of data here.
<a href="GraphicalSummaries.html#scatterplots">
<img class="myhover" src="./Images/scatterplotbinomYmult.png" alt="Scatterplot with Binomial Y" title="Scatterplot with Binomial Y, including coloring and shading">
</a>
<!--- End of Add content area. ------------------>
</div>
### Tests
<div style="padding-left:125px;color:lightgray;">
<!-- Add your customizations in the area below: -->
Add your own notes about appropriate inferential procedures for this type of data here.
<!--- End of Add content area. ------------------>
</div>
#
<div style="clear:both;"></div>
----
<div style="float:left;width:125px;" align=center class="tooltipimage">
<img src="./Images/QualYQualX.png" width=59px;>
<span class="tooltipimagetext">Y is a single categorical variable of interest, like gender. X is another categorical variable of interest, like "hair color". This type of data would help us understand if men or women are more likely to have certain hair colors than the other gender.</span>
</div>
## Categorical Y | Categorical X {.tabset .tabset-pills}
### Graphics
<div style="padding-left:125px;color:lightgray;">
<!-- Add your customizations in the area below: -->
Add your own notes about graphics to use for this type of data here.
<a href="GraphicalSummaries.html#bar-charts">
<img class="myhover" src="./Images/barplot.png" alt="Bar Chart" title="Bar Chart">
</a>
<!--- End of Add content area. ------------------>
</div>
### Tests
<div style="padding-left:125px;color:lightgray;">
<!-- Add your customizations in the area below: -->
Add your own notes about appropriate inferential procedures for this type of data here.
<!--- End of Add content area. ------------------>
</div>
#
<div style="clear:both;"></div>
----
<footer></footer>