forked from danielkunin/Seeing-Theory
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
350 lines (314 loc) · 16.4 KB
/
index.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<title>Statistical Inference</title>
<!-- Bootstrap Core CSS -->
<link href="../css/bootstrap.min.css" rel="stylesheet">
<!-- Scrolling CSS -->
<link href="../css/scrolling-nav.css" rel="stylesheet">
<!-- Off Canvas CSS -->
<link href="../css/jasny-bootstrap.min.css" rel="stylesheet">
<!-- Slider CSS -->
<link href="../css/bootstrap-slider.min.css" rel="stylesheet">
<!-- Main CSS -->
<link href="../css/main.css" rel="stylesheet">
<!-- Visualization CSS -->
<link href="./statistical-inference.css" rel="stylesheet">
<!-- MathJax JS -->
<script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML"></script>
</head>
<!-- The #page-top ID is part of the scrolling feature - the data-spy and data-target are part of the built-in Bootstrap scrollspy function -->
<body id="page-top" data-spy="scroll" data-target=".navbar-fixed-top">
<!-- Off Canvas Menu -->
<nav id="offCanvasMenu" class="navmenu navmenu-default navmenu-fixed-right offcanvas" role="navigation">
<a class="navmenu-brand" href="../index.html"><b>Seeing Theory</b></a>
<ul class="nav navmenu-nav">
<li><a href="../basic-probability/index.html">Basic Probability</a></li>
<li><a href="../compound-probability/index.html">Compound Probability</a></li>
<li><a href="../distributions/index.html">Distributions</a></li>
<li class="active"><a href="../statistical-inference/index.html">Statistical Inference</a></li>
<li><a href="../regression/index.html">Regression</a></li>
</ul>
</nav>
<!-- Navigation -->
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<button type="button" class="navbar-toggle" data-toggle="offcanvas" data-target="#offCanvasMenu" data-canvas="body">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand page-scroll" href="#page-top">Statistical Inference</a>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse navbar-ex1-collapse">
<ul class="nav navbar-nav">
<!-- Hidden li included to remove active class from about link when scrolled up past about section -->
<li class="hidden">
<a class="page-scroll" href="#page-top"></a>
</li>
<li>
<a class="page-scroll" href="#first">Confidence Intervals</a>
</li>
<li>
<a class="page-scroll" href="#second">p-Values</a>
</li>
<li>
<a class="page-scroll" href="#third">Hypothesis Testing</a>
</li>
</ul>
</div>
<!-- /.navbar-collapse -->
</div>
<!-- /.container -->
</div>
<!-- Modal -->
<div class="modal fade" id="myModal" role="dialog">
<div class="modal-dialog modal-sm">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">Under Construction</h4>
</div>
<div class="modal-body">
<p>This unit is still under construction, but feel free to checkout what is currently being created.</p>
</div>
</div>
</div>
</div>
<!-- Intro Section -->
<section id="intro" class="intro-section">
<div class="container">
<div class="row">
<div class="col-xs-12">
<h1>Statistical Inference</h1>
<p class="text-center">Statistical inference is the process of deducing properties of an underlying distribution by analysis of data.</p>
</div>
</div>
<div class="row">
<div class="col-xs-4">
<a class="page-scroll" href="#first">
<div class="icon" id="confidenceInterval_img"></div>
<h3>Confidence Intervals</h3>
</a>
</div>
<div class="col-xs-4">
<a class="page-scroll" href="#second">
<div class="icon" id="pval_img"></div>
<h3>p-Values</h3>
</a>
</div>
<div class="col-xs-4">
<a class="page-scroll" href="#third">
<div class="icon" id="hypothesisTesting_img"></div>
<h3>Hypothesis Testing</h3>
</a>
</div>
</div>
</div>
<div class="nextSection">
<a class="page-scroll" href="#first">
<img src="../img/nextSection.png" width="50px"/>
</a>
</div>
</section>
<!-- Contact Section -->
<section id="first" class="first-section">
<div class="container">
<div class="row">
<div class="col-xs-4">
<h1>Confidence Intervals</h1>
<hr>
<p>A confidence intervals is an interval estimate for a distribution's mean \((\mu)\). It is parameterized by a confidence level, which determines how frequently the confidence interval will contain the true distribution mean.</p>
<ol>
<li><p> Choose a probability distribution to sample from.</p></li>
<div class="input-group">
<div class="input-group-btn">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Choose <span class="caret"></span></button>
<ul id="dist_ci" class="dropdown-menu">
<li><a value="uniform">Uniform</a></li>
<li><a value="normal">Normal</a></li>
<li><a value="studentt">Student T</a></li>
<li><a value="chisquare">Chi Squared</a></li>
<li><a value="exponential">Exponential</a></li>
<li><a value="centralF">Fisher–Snedecor</a></li>
<li role="separator" class="divider"></li>
<li><a value="">Clear</a></li>
</ul>
</div>
<input id="dist_name_ci" type="text" class="form-control" readonly>
</div>
<li><p> Choose a sample size \((n)\) and confidence level \((1-\alpha)\).</p></li>
<label for="samplesize" class="slider">
\(n\) = <span id="samplesize-value">5</span>
</label>
<input id="samplesize" data-slider-id="blueSlider" type="text" data-provide="slider" data-slider-min="3" data-slider-max="30" data-slider-step="1" data-slider-value="5" data-slider-tooltip="hide">
<br>
<label for="alpha" class="slider">
\(1-\alpha\) = <span id="alpha-value">0.50</span>
</label>
<input id="alpha" data-slider-id="greenSlider" type="text" data-provide="slider" data-slider-min="0" data-slider-max="1" data-slider-step="0.01" data-slider-value="0.50" data-slider-tooltip="hide">
<li><p> Start sampling to generate confidence intervals.</p></li>
<div id="ciDist"></div>
<div class="btn btn-default sample_btn" id="startCI">Start Sampling</div>
<div class="btn btn-default sample_btn" id="stopCI" style="display:none">Stop Sampling</div>
</ol>
</div>
<div id="svg_ci" class="col-xs-8">
</div>
</div>
</div>
<div class="nextSection">
<a class="page-scroll" href="#second">
<img src="../img/nextSection.png" width="50px"/>
</a>
</div>
</section>
<!-- About Section -->
<section id="second" class="second-section">
<div class="container">
<div class="row">
<div class="col-xs-8">
<div id="svg_pval"></div>
</div>
<div class="col-xs-4">
<h1>p-Values</h1>
<hr>
<p>The p-value is the probability that a statistical summary, such as mean, would be the same as or more extreme than an observed result given a probability distribution for the statistical summary.</p>
<ol>
<li><p> Choose a probability distribution for the statistical summary.</p></li>
<div class="input-group">
<div class="input-group-btn">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Choose <span class="caret"></span></button>
<ul id="distribution" class="dropdown-menu">
<li><a value="uniform">Uniform</a></li>
<li><a value="normal">Normal</a></li>
<li><a value="studentt">Student T</a></li>
<li><a value="chisquare">Chi Squared</a></li>
<li><a value="exponential">Exponential</a></li>
<li><a value="centralF">Fisher–Snedecor</a></li>
<li><a value="gamma">Gamma</a></li>
<li><a value="beta">Beta</a></li>
<li role="separator" class="divider"></li>
<li><a value="">Clear</a></li>
</ul>
</div>
<input id="dist_name" type="text" class="form-control" aria-label="...">
<span id="error_pval" style="display:none" class="alert-danger glyphicon glyphicon-remove form-control-feedback"></span>
</div>
<li><p> Decide what type of p-value to compute.</p></li>
<form id="tail_pval">
<label class="radio-inline">
<input type="radio" name="tail" value="1" checked>One-Tailed
</label>
<label class="radio-inline">
<input type="radio" name="tail" value="2">Two-Tailed
</label>
</form>
<li><p> Type in an observed result to visualize the p-value.</p></li>
<div>
<input type="number" step="0.01" class="form-control" id="observation" placeholder="Observation" required>
</div>
<p class="text-center">\(p\) = <span id="p_value"></span></p>
<li><p> Switch input from observation to a p-value and visualization computes the critical value....</p></li>
</ol>
</div>
</div>
</div>
<div class="nextSection">
<a class="page-scroll" href="#third">
<img src="../img/nextSection.png" width="50px"/>
</a>
</div>
</section>
<!-- Contact Section -->
<section id="third" class="third-section">
<div class="container">
<div class="row">
<div class="col-xs-4">
<h1>Hypothesis Testing</h1>
<hr>
<p><strong>Not Yet Implemented.</strong> Check out the following link for an example of the visualization: <a href="http://rpsychologist.com/d3/NHST/">Hypothesis Testing</a></p>
<ol>
<li><p> Choose an effect size \((d)\).</p></li>
<label for="effect_size" class="slider">
\(d\) = <span id="effect_size-value">0</span>
</label>
<input id="effect_size" data-slider-id="greenSlider" type="text" data-provide="slider" data-slider-min="-4" data-slider-max="4" data-slider-step="0.01" data-slider-value="0" data-slider-tooltip="hide">
<li><p> Choose type of hypothesis test and set the rejection region by dragging and dropping the critical value(s).</p></li>
<form id="tail_ht">
<label class="radio-inline">
<input type="radio" name="tail" value="1" checked>One-Tailed
</label>
<label class="radio-inline">
<input type="radio" name="tail" value="2">Two-Tailed
</label>
</form>
<li><p> Start sampling... Type I error... Type II error...</p></li>
<table id="table_ht" style="cursor:pointer" class="table table-bordered">
<colgroup></colgroup>
<colgroup class="click_h0"></colgroup>
<colgroup></colgroup>
<tbody>
<tr>
<td></td>
<td>\(H_{0}\) true</td>
<td>\(H_{A}\) true</td>
</tr>
<tr>
<td>accept</td>
<td>\(1-\alpha\)</td>
<td>\(\beta\)</td>
</tr>
<tr>
<td>reject</td>
<td>\(\alpha\)</td>
<td>\(1-\beta\)</td>
</tr>
</tbody>
</table>
<div class="btn btn-default sample_ht" id="start_ht">Start Sampling</div>
<div class="btn btn-default sample_ht" id="stop_ht" style="display:none">Stop Sampling</div>
</ol>
</div>
<div id="svg_ht" class="col-xs-8">
</div>
</div>
</div>
</section>
<!-- D3 -->
<script src="../js/d3.min.js"></script>
<!-- jQuery -->
<script src="../js/jquery.js"></script>
<!-- Bootstrap Core JavaScript -->
<script src="../js/bootstrap.min.js"></script>
<!-- Scrolling Nav JavaScript -->
<script src="../js/jquery.easing.min.js"></script>
<script src="../js/scrolling-nav.js"></script>
<!-- Off Canvas Menu JavaScript -->
<script src="../js/jasny-bootstrap.min.js"></script>
<!-- jstat -->
<script src="../js/jstat.min.js"></script>
<!-- Slider JavaScript -->
<script src="../js/bootstrap-slider.min.js"></script>
<!-- Tool Tip JavaScript -->
<script src="../js/d3.tip.v0.6.3.js"></script>
<!-- Main JavaScript -->
<script src="../js/main.js"></script>
<!-- Visualization JavaScript -->
<script src="./statistical-inference.js"></script>
<!-- Google Analytics -->
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-85617614-1', 'auto');
ga('send', 'pageview');
</script>
</body>
</html>