-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
346 lines (317 loc) · 18.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
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<title>Z-Score Calculator</title>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0" />
<meta name="description" content="The Z-Score Calculator helps to get the z-score of a normal distribution, convert between z-score and probability, and get the probability between 2 z-scores.">
<link rel="preload" href="./assets/fonts/inter-v12-latin-regular.woff2" as="font" crossorigin type="font/woff2">
<link rel="preload" href="./assets/fonts/inter-v12-latin-500.woff2" as="font" crossorigin type="font/woff2">
<link rel="preload" href="./assets/fonts/inter-v12-latin-600.woff2" as="font" crossorigin type="font/woff2">
<link rel="preload" href="./assets/fonts/inter-v12-latin-800.woff2" as="font" crossorigin type="font/woff2">
<script type="text/javascript">
window._ = document.getElementById.bind(document);
window.$ = document.querySelector.bind(document);
window.$$ = document.querySelectorAll.bind(document);
window.defaultSystem = "imperial";
localStorage.setItem("theme", "light");
</script>
<link rel="stylesheet" href="./assets/css/main.min.css" />
<script src="./assets/js/all-calculators.js" defer></script>
</head>
<body style="background-color: transparent !important; min-height: 0 !important">
<div style="width: 100%;">
<div style="width:350px;float:left;padding: 15px;">
<div class="calculator-settings">
<div class="calculator-setting" id="calculator_form">
<div class="calculator-content col">
<div class="input-wrapper row">
<label class="input col standard-deviation-calculator,standard-deviation,variance-calculator,mean-calculator,percentile-calculator">
<div class="dropdown-wrapper">
<div class="input-field row " tabindex="0">
<select class="input-field__text" onchange="switchTab(this),toggleRelatedInputs(this)" id="switcher">
<option value="Z-score Calculator" >
Z-score Calculator
</option>
<option value="Probability Converter" >
Probability Converter
</option>
<option value="Two Z-scores" >
Two Z-scores
</option>
</select>
</div>
</div>
</label> </div>
<div class="input-wrapper row switcher related-to-switcher-0">
<label class="input col standard-deviation-calculator,standard-deviation,variance-calculator,mean-calculator,percentile-calculator ">
<p class="input__title">Raw Score (x)</p>
<div class="input-field row">
<input type="text" class="input-field__input" placeholder="" id="raw_score" value="5" />
</div>
</label> </div>
<div class="input-wrapper row switcher related-to-switcher-0">
<label class="input col standard-deviation-calculator,standard-deviation,variance-calculator,mean-calculator,percentile-calculator ">
<p class="input__title">Population Mean (μ)</p>
<div class="input-field row">
<input type="text" class="input-field__input" placeholder="" id="population_mean" value="3" />
</div>
</label> </div>
<div class="input-wrapper row switcher related-to-switcher-0">
<label class="input col standard-deviation-calculator,standard-deviation,variance-calculator,mean-calculator,percentile-calculator ">
<p class="input__title">Standard Deviation (σ)</p>
<div class="input-field row">
<input type="text" class="input-field__input" placeholder="" id="standart_deviation" value="2" />
</div>
</label> </div>
<div class="input-wrapper row related-item-hidden switcher related-to-switcher-1">
<label class="input col standard-deviation-calculator,standard-deviation,variance-calculator,mean-calculator,percentile-calculator">
<p class="input__title">Given</p>
<div class="dropdown-wrapper">
<div class="input-field row " tabindex="0">
<select class="input-field__text" onchange="toggleRelatedInputs(this)" id="score_or_pobability">
<option value="Z-score" >
Z-score
</option>
<option value="P(x<Z)" >
P(x<Z)
</option>
<option value="P(x>Z)" >
P(x>Z)
</option>
<option value="P(0<x<Z)" >
P(0<x<Z)
</option>
<option value="P(-Z<x<Z)" >
P(-Z<x<Z)
</option>
<option value="P(x<-Z or x>Z)" >
P(x<-Z or x>Z)
</option>
</select>
</div>
</div>
</label> <label class="input col standard-deviation-calculator,standard-deviation,variance-calculator,mean-calculator,percentile-calculator ">
<div class="input-field row">
<input type="text" class="input-field__input" placeholder="" id="probability_or_z_score" value="2" />
</div>
</label> </div>
<div class="input-wrapper row related-item-hidden switcher related-to-switcher-2">
<label class="input col standard-deviation-calculator,standard-deviation,variance-calculator,mean-calculator,percentile-calculator ">
<p class="input__title">Left Bound (z1)</p>
<div class="input-field row">
<input type="text" class="input-field__input" placeholder="" id="left_bound" value="-1" />
</div>
</label> <label class="input col standard-deviation-calculator,standard-deviation,variance-calculator,mean-calculator,percentile-calculator ">
<p class="input__title">Right Bound (z2)</p>
<div class="input-field row">
<input type="text" class="input-field__input" placeholder="" id="right_bound" value="0" />
</div>
</label> </div>
</div>
<div class="calculator-content calculator-content--gray calculator-content--footer calculator-content--small row " >
<button class="button button--primary ml-auto" onclick="calculate(this); animateElements();" data-action="calculate" id="action-button">Calculate</button>
</div>
<script type="text/javascript" src="./assets/js/lib/math.min.js" async></script>
<script type="text/javascript" src="./assets/js/calculator.js" defer></script>
</div>
</div>
</div>
<div style="float:left;padding: 15px; overflow: scroll;">
<div class="calculator-result calculator-result--error col" id="error-box">
<div class="row">
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M10 18C14.4183 18 18 14.4183 18 10C18 5.58172 14.4183 2 10 2C5.58172 2 2 5.58172 2 10C2 14.4183 5.58172 18 10 18ZM8.70711
7.29289C8.31658 6.90237 7.68342 6.90237 7.29289 7.29289C6.90237 7.68342 6.90237 8.31658 7.29289 8.70711L8.58579 10L7.29289 11.2929C6.90237 11.6834 6.90237 12.3166 7.29289
12.7071C7.68342 13.0976 8.31658 13.0976 8.70711 12.7071L10 11.4142L11.2929 12.7071C11.6834 13.0976 12.3166 13.0976 12.7071 12.7071C13.0976 12.3166 13.0976 11.6834 12.7071
11.2929L11.4142 10L12.7071 8.70711C13.0976 8.31658 13.0976 7.68342 12.7071 7.29289C12.3166 6.90237 11.6834 6.90237 11.2929 7.29289L10 8.58579L8.70711 7.29289Z" fill="#F87171" class="dark:fill-red-200"></path>
</svg>
<p class="calculator-error__title">There was an error with your calculation.</p>
</div>
<div class="col" id="error-list"></div>
</div> <span id="calculator_result"><div class="calculator-result col tab tab--active" data-tab="0">
<div class="result-table__wrapper">
<table class="result-table result-table--z-score">
<thead class="dark">
<tr>
<th class="dark indigo" colspan="3">Result</th>
</tr>
</thead>
<tbody>
<tr>
<th class="semibold">Z-score</th>
<td class="semibold animate" id="result_z_score">1</td>
<td class="semibold"></td>
</tr>
<tr>
<th>Probability of x<<span id="result_x">5</span></th>
<td id="result_lt_x" class="animate">0.84134</td>
<td class="short">
<svg width="60" height="40" viewBox="0 0 60 40" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M31 3.5L35 12V40H0L11 37L16.5 31L29 3.5H31Z" fill="#C4B5FD" />
<path d="M0 39H2.52037C8.88495 39 14.6443 35.2278 17.1875 29.3934L28.1666 4.20602C28.8645 2.60491 31.1355 2.60491 31.8334 4.20602L42.8125 29.3934C45.3557 35.2277 51.115 39 57.4796 39H60" stroke="#A78BFA" stroke-width="2" />
</svg>
</td>
</tr>
<tr>
<th>Probability of x><span id="result_x_2">5</span></th>
<td id="result_gt_x" class="animate">0.15866</td>
<td class="short">
<svg width="60" height="40" viewBox="0 0 60 40" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M39.5 21.5C39.1 21.1 36.3333 15 35 12V40H60L48 36.5L43 30.5C42 27.6667 39.9 21.9 39.5 21.5Z" fill="#C4B5FD" />
<path d="M0 39H2.52037C8.88495 39 14.6443 35.2278 17.1875 29.3934L28.1666 4.20602C28.8645 2.60491 31.1355 2.60491 31.8334 4.20602L42.8125 29.3934C45.3557 35.2277 51.115 39 57.4796 39H60" stroke="#A78BFA" stroke-width="2" />
</svg>
</td>
</tr>
<tr>
<th>Probability of <span id="result_lb">3</span><x<<span id="result_rb">5</span></th>
<td id="result_p" class="animate">0.34134</td>
<td class="short">
<svg width="60" height="40" viewBox="0 0 60 40" fill="none" xmlns="http://www.w3.org/2000/svg">
<defs></defs>
<path d="M 31.5 3.5 L 29.802 3.5 L 29.802 40 L 36.35 40 L 35.891 13.241 L 31.5 3.5 Z" fill="#C4B5FD"></path>
<path d="M0 39H2.52037C8.88495 39 14.6443 35.2278 17.1875 29.3934L28.1666 4.20602C28.8645 2.60491 31.1355 2.60491 31.8334 4.20602L42.8125 29.3934C45.3557 35.2277 51.115 39 57.4796 39H60" stroke="#A78BFA" stroke-width="2"></path>
</svg>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="calculator-result col tab" data-tab="1">
<div class="result-table__wrapper">
<table class="result-table result-table--z-score">
<thead class="dark">
<tr>
<th class="dark indigo" colspan="3">Result</th>
</tr>
</thead>
<tbody>
<tr>
<th class="semibold">Z-score</th>
<td class="semibold animate" id="result_z_score_2">2</td>
<td class="semibold"></td>
</tr>
<tr>
<th>P(x<Z)</th>
<td id="result_x_lt_z" class="animate">0.97725</td>
<td class="short">
<svg width="60" height="40" viewBox="0 0 60 40" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M31 3.5L35 12V40H0L11 37L16.5 31L29 3.5H31Z" fill="#C4B5FD" />
<path d="M0 39H2.52037C8.88495 39 14.6443 35.2278 17.1875 29.3934L28.1666 4.20602C28.8645 2.60491 31.1355 2.60491 31.8334 4.20602L42.8125 29.3934C45.3557 35.2277 51.115 39 57.4796 39H60" stroke="#A78BFA" stroke-width="2" />
</svg>
</td>
</tr>
<tr>
<th>P(x>Z)</th>
<td id="result_x_gt_z" class="animate">0.02275</td>
<td class="short">
<svg width="60" height="40" viewBox="0 0 60 40" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M39.5 21.5C39.1 21.1 36.3333 15 35 12V40H60L48 36.5L43 30.5C42 27.6667 39.9 21.9 39.5 21.5Z" fill="#C4B5FD" />
<path d="M0 39H2.52037C8.88495 39 14.6443 35.2278 17.1875 29.3934L28.1666 4.20602C28.8645 2.60491 31.1355 2.60491 31.8334 4.20602L42.8125 29.3934C45.3557 35.2277 51.115 39 57.4796 39H60" stroke="#A78BFA" stroke-width="2" />
</svg>
</td>
</tr>
<tr>
<th>P(0<x<Z)</th>
<td id="result_0_lt_x_lt_z" class="animate">0.47725</td>
<td class="short">
<svg width="60" height="40" viewBox="0 0 60 40" fill="none" xmlns="http://www.w3.org/2000/svg">
<defs></defs>
<path d="M 31.5 3.5 L 29.802 3.5 L 29.802 40 L 36.35 40 L 35.891 13.241 L 31.5 3.5 Z" fill="#C4B5FD"></path>
<path d="M0 39H2.52037C8.88495 39 14.6443 35.2278 17.1875 29.3934L28.1666 4.20602C28.8645 2.60491 31.1355 2.60491 31.8334 4.20602L42.8125 29.3934C45.3557 35.2277 51.115 39 57.4796 39H60" stroke="#A78BFA" stroke-width="2"></path>
</svg>
</td>
</tr>
<tr>
<th>P(-Z<x<Z)</th>
<td id="result_-z_lt_x_lt_z" class="animate">0.9545</td>
<td class="short">
<svg width="60" height="40" viewBox="0 0 60 40" fill="none" xmlns="http://www.w3.org/2000/svg">
<defs></defs>
<path d="M 31.5 3.5 L 28.542 3.557 L 24.588 13.272 L 23.9 40 L 36.407 40 L 35.892 13.298 L 31.5 3.5 Z" fill="#C4B5FD"></path>
<path d="M0 39H2.52037C8.88495 39 14.6443 35.2278 17.1875 29.3934L28.1666 4.20602C28.8645 2.60491 31.1355 2.60491 31.8334 4.20602L42.8125 29.3934C45.3557 35.2277 51.115 39 57.4796 39H60" stroke="#A78BFA" stroke-width="2"></path>
</svg>
</td>
</tr>
<tr>
<th>P(x<-Z or x>Z)</th>
<td id="result_x_lt_-z_or_x_gt_z" class="animate">0.0455</td>
<td class="short">
<svg width="60" height="40" viewBox="0 0 60 40" fill="none" xmlns="http://www.w3.org/2000/svg">
<defs></defs>
<path d="M 43.455 31.185 L 41.648 27.473 L 42.049 40 L 60 40 L 48.974 36.901 L 45.579 33.938 L 43.455 31.185 Z" fill="#C4B5FD"></path>
<path d="M 0.111 39.784 L -1.639 43.037 L -1.524 30.052 L 17 30.052 L 5.974 33.495 L 2.522 36.229 L 0.111 39.784 Z" fill="#C4B5FD" style="transform-box: fill-box; transform-origin: 50% 50%;" transform="matrix(-1, 0, 0, -1, 1.49, -3.036996)"></path>
<path d="M0 39H2.52037C8.88495 39 14.6443 35.2278 17.1875 29.3934L28.1666 4.20602C28.8645 2.60491 31.1355 2.60491 31.8334 4.20602L42.8125 29.3934C45.3557 35.2277 51.115 39 57.4796 39H60" stroke="#A78BFA" stroke-width="2"></path>
</svg>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="calculator-result col tab" data-tab="2">
<div class="result-table__wrapper">
<table class="result-table result-table--z-score">
<thead class="dark">
<tr>
<th class="dark indigo" colspan="3">Result</th>
</tr>
</thead>
<tbody>
<tr>
<th class="semibold">P(<span id="result_lb_3">-1</span><x<<span id="result_rb_3">0</span>)</th>
<td class="semibold animate" id="result_p_inner">0.34134</td>
<td class="semibold short">
<svg width="60" height="40" viewBox="0 0 60 40" fill="none" xmlns="http://www.w3.org/2000/svg">
<defs></defs>
<path d="M 31.5 3.5 L 28.542 3.557 L 24.588 13.272 L 23.9 40 L 36.407 40 L 35.892 13.298 L 31.5 3.5 Z" fill="#C4B5FD"></path>
<path d="M0 39H2.52037C8.88495 39 14.6443 35.2278 17.1875 29.3934L28.1666 4.20602C28.8645 2.60491 31.1355 2.60491 31.8334 4.20602L42.8125 29.3934C45.3557 35.2277 51.115 39 57.4796 39H60" stroke="#A78BFA" stroke-width="2"></path>
</svg>
</td>
</tr>
<tr>
<th>P(x<<span id="result_lb_3">-1</span> or x><span id="result_rb_3">0</span>)</th>
<td id="result_p_outer" class="animate">0.65866</td>
<td class="short">
<svg width="60" height="40" viewBox="0 0 60 40" fill="none" xmlns="http://www.w3.org/2000/svg">
<defs></defs>
<path d="M 43.455 31.185 L 41.648 27.473 L 42.049 40 L 60 40 L 48.974 36.901 L 45.579 33.938 L 43.455 31.185 Z" fill="#C4B5FD"></path>
<path d="M 0.111 39.784 L -1.639 43.037 L -1.524 30.052 L 17 30.052 L 5.974 33.495 L 2.522 36.229 L 0.111 39.784 Z" fill="#C4B5FD" style="transform-box: fill-box; transform-origin: 50% 50%;" transform="matrix(-1, 0, 0, -1, 1.49, -3.036996)"></path>
<path d="M0 39H2.52037C8.88495 39 14.6443 35.2278 17.1875 29.3934L28.1666 4.20602C28.8645 2.60491 31.1355 2.60491 31.8334 4.20602L42.8125 29.3934C45.3557 35.2277 51.115 39 57.4796 39H60" stroke="#A78BFA" stroke-width="2"></path>
</svg>
</td>
</tr>
<tr>
<th>P(x<<span id="result_lb_3">-1</span>)</th>
<td id="result_lt_lb" class="animate">0.15866</td>
<td class="short">
<svg width="60" height="40" viewBox="0 0 60 40" fill="none" xmlns="http://www.w3.org/2000/svg">
<defs></defs>
<path d="M 4.5 30.5 C 4.1 30.9 1.333 37 0 40 L 0 12 L 25 12 L 13 15.5 L 8 21.5 C 7 24.333 4.9 30.1 4.5 30.5 Z" fill="#C4B5FD" style="transform-box: fill-box; transform-origin: 50% 50%;" transform="matrix(-1, 0, 0, -1, -0.000001, -0.000001)"></path>
<path d="M0 39H2.52037C8.88495 39 14.6443 35.2278 17.1875 29.3934L28.1666 4.20602C28.8645 2.60491 31.1355 2.60491 31.8334 4.20602L42.8125 29.3934C45.3557 35.2277 51.115 39 57.4796 39H60" stroke="#A78BFA" stroke-width="2"></path>
</svg>
</td>
</tr>
<tr>
<th>P(x><span id="result_rb_3">0</span>)</th>
<td id="result_gt_rb" class="animate">0.5</td>
<td class="short">
<svg width="60" height="40" viewBox="0 0 60 40" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M39.5 21.5C39.1 21.1 36.3333 15 35 12V40H60L48 36.5L43 30.5C42 27.6667 39.9 21.9 39.5 21.5Z" fill="#C4B5FD" />
<path d="M0 39H2.52037C8.88495 39 14.6443 35.2278 17.1875 29.3934L28.1666 4.20602C28.8645 2.60491 31.1355 2.60491 31.8334 4.20602L42.8125 29.3934C45.3557 35.2277 51.115 39 57.4796 39H60" stroke="#A78BFA" stroke-width="2" />
</svg>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</span>
</div>
</div>
<script async src="./assets/js/lib/math.min.js"></script>
<script defer src="./assets/js/functions.js"></script>
</body>
</html>