-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathtest.html
More file actions
235 lines (161 loc) · 12.3 KB
/
test.html
File metadata and controls
235 lines (161 loc) · 12.3 KB
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
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Test - jStat Documentation</title>
<link rel="stylesheet" href="assets/style.css" />
<link rel="stylesheet" href="assets/sh.css" />
</head>
<body>
<div id="container">
<header>
<h1>jStat v1.9.3 Documentation</h1>
<div id="gtoc">
<p><a href="index.html">Index</a> | <a href="all.html">View on single page</a></p>
</div>
<hr />
</header>
<div id="toc"><h2>Table Of Contents</h2><ul><li><a href="#statistical_Tests">Statistical Tests</a></li><li><a href="#statistics_Instance_Functionality">Statistics Instance Functionality</a><ul><li><a href="#zscore">zscore( value[, flag] )</a></li><li><a href="#ztest">ztest( value, sides[, flag] )</a></li><li><a href="#tscore">tscore( value )</a></li><li><a href="#ttest">ttest( value, sides )</a></li><li><a href="#anovafscore">anovafscore()</a></li><li><a href="#anovaftest">anovaftest()</a></li></ul></li><li><a href="#static_Methods">Static Methods</a></li><li><a href="#z_Statistics">Z Statistics</a><ul><li><a href="#jStat.zscore">jStat.zscore( value, mean, sd )</a></li><li><a href="#jStat.zscore">jStat.zscore( value, array[, flag] )</a></li><li><a href="#jStat.ztest">jStat.ztest( value, mean, sd, sides )</a></li><li><a href="#jStat.ztest">jStat.ztest( zscore, sides )</a></li><li><a href="#jStat.ztest">jStat.ztest( value, array, sides[, flag] )</a></li></ul></li><li><a href="#t_Statistics">T Statistics</a><ul><li><a href="#jStat.tscore">jStat.tscore( value, mean, sd, n )</a></li><li><a href="#jStat.tscore">jStat.tscore( value, array )</a></li><li><a href="#jStat.ttest">jStat.ttest( value, mean, sd, n, sides )</a></li><li><a href="#jStat.ttest">jStat.ttest( tscore, n, sides )</a></li><li><a href="#jStat.ttest">jStat.ttest( value, array, sides )</a></li></ul></li><li><a href="#f_Statistics">F Statistics</a><ul><li><a href="#jStat.anovafscore">jStat.anovafscore( array1, array2, ..., arrayn )</a></li><li><a href="#jStat.anovafscore">jStat.anovafscore( [array1,array2, ...,arrayn] )</a></li><li><a href="#jStat.anovaftest">jStat.anovaftest( array1, array2, ...., arrayn )</a></li><li><a href="#jStat.ftest">jStat.ftest( fscore, df1, df2)</a></li></ul></li><li><a href="#tukey_s_Range_Test">Tukey's Range Test</a><ul><li><a href="#jStat.qscore">jStat.qscore( mean1, mean2, n1, n2, sd )</a></li><li><a href="#jStat.qscore">jStat.qscore( array1, array2, sd )</a></li><li><a href="#jStat.qtest">jStat.qtest( qscore, n, k )</a></li><li><a href="#jStat.qtest">jStat.qtest( mean1, mean2, n1, n2, sd, n, k )</a></li><li><a href="#jStat.qtest">jStat.qtest( array1, array2, sd, n, k )</a></li><li><a href="#jStat.tukeyhsd">jStat.tukeyhsd( arrays )</a></li></ul></li><li><a href="#confidence_Intervals">Confidence Intervals</a><ul><li><a href="#jStat.normalci">jStat.normalci( value, alpha, sd, n )</a></li><li><a href="#jStat.normalci">jStat.normalci( value, alpha, array )</a></li><li><a href="#jStat.tci">jStat.tci( value, alpha, sd, n )</a></li><li><a href="#jStat.tci">jStat.tci( value, alpha, array )</a></li><li><a href="#jStat.fn.oneSidedDifferenceOfProportions">jStat.fn.oneSidedDifferenceOfProportions( p1, n1, p2, n2 )</a></li><li><a href="#jStat.fn.twoSidedDifferenceOfProportions">jStat.fn.twoSidedDifferenceOfProportions( p1, n1, p2, n2 )</a></li></ul></li></ul><hr /></div>
<h2 id="statistical_Tests">Statistical Tests</h2>
<p>The test module includes methods that enact popular statistical tests.
The tests that are implemented are Z tests, T tests, and F tests.
Also included are methods for developing confidence intervals. Currently
regression is not included but it should be included soon (once matrix
inversion is fixed).</p>
<h2 id="statistics_Instance_Functionality">Statistics Instance Functionality</h2>
<h3 id="zscore">zscore( value[, flag] )</h3>
<p>Returns the z-score of <code>value</code> taking the jStat object as the observed
values. <code>flag===true</code> denotes use of sample standard deviation.</p>
<h3 id="ztest">ztest( value, sides[, flag] )</h3>
<p>Returns the p-value of <code>value</code> taking the jStat object as the observed
values. <code>sides</code> is an integer value 1 or 2 denoting a 1 or 2 sided z-test.
The test defaults to a 2 sided z-test if <code>sides</code> is not specified. <code>flag===true</code>
denotes use of sample standard deviation.</p>
<h3 id="tscore">tscore( value )</h3>
<p>Returns the t-score of <code>value</code> taking the jStat object as the observed
values.</p>
<h3 id="ttest">ttest( value, sides )</h3>
<p>Returns the p-value of <code>value</code> taking the jStat object as the observed
values. <code>sides</code> is an integer value 1 or 2 denoting a 1 or 2 sided t-test.
The test defaults to a 2 sided t-test if <code>sides</code> is not specified.</p>
<h3 id="anovafscore">anovafscore()</h3>
<p>Returns the f-score of the ANOVA test on the arrays of the jStat object.</p>
<h3 id="anovaftest">anovaftest()</h3>
<p>Returns the p-value of an ANOVA test on the arrays of the jStat object.</p>
<h2 id="static_Methods">Static Methods</h2>
<h2 id="z_Statistics">Z Statistics</h2>
<h3 id="jStat.zscore">jStat.zscore( value, mean, sd )</h3>
<p>Returns the z-score of <code>value</code> given the <code>mean</code> mean and the <code>sd</code> standard deviation
of the test.</p>
<h3 id="jStat.zscore">jStat.zscore( value, array[, flag] )</h3>
<p>Returns the z-score of <code>value</code> given the data from <code>array</code>. <code>flag===true</code> denotes
use of the sample standard deviation.</p>
<h3 id="jStat.ztest">jStat.ztest( value, mean, sd, sides )</h3>
<p>Returns the p-value of a the z-test of <code>value</code> given the <code>mean</code> mean and <code>sd</code> standard
deviation of the test. <code>sides</code> is an integer value 1 or 2 denoting a
one or two sided z-test. If <code>sides</code> is not specified the test defaults
to a two sided z-test.</p>
<h3 id="jStat.ztest">jStat.ztest( zscore, sides )</h3>
<p>Returns the p-value of the <code>zscore</code> z-score. <code>sides</code> is an integer value 1 or 2
denoting a one or two sided z-test. If <code>sides</code> is not specified the test
defaults to a two sided z-test</p>
<h3 id="jStat.ztest">jStat.ztest( value, array, sides[, flag] )</h3>
<p>Returns the p-value of <code>value</code> given the data from <code>array</code>. <code>sides</code> is
an integer value 1 or 2 denoting a one or two sided z-test. If <code>sides</code>
is not specified the test defaults to a two sided z-test. <code>flag===true</code>
denotes the use of the sample standard deviation.</p>
<h2 id="t_Statistics">T Statistics</h2>
<h3 id="jStat.tscore">jStat.tscore( value, mean, sd, n )</h3>
<p>Returns the t-score of <code>value</code> given the <code>mean</code> mean, <code>sd</code> standard deviation,
and the sample size <code>n</code>.</p>
<h3 id="jStat.tscore">jStat.tscore( value, array )</h3>
<p>Returns the t-score of <code>value</code> given the data from <code>array</code>.</p>
<h3 id="jStat.ttest">jStat.ttest( value, mean, sd, n, sides )</h3>
<p>Returns the p-value of <code>value</code> given the <code>mean</code> mean, <code>sd</code> standard deviation,
and the sample size <code>n</code>. <code>sides</code> is an integer value 1 or 2 denoting
a one or two sided t-test. If <code>sides</code> is not specified the test
defaults to a two sided t-test.</p>
<h3 id="jStat.ttest">jStat.ttest( tscore, n, sides )</h3>
<p>Returns the p-value of the <code>tscore</code> t-score given the sample size <code>n</code>. <code>sides</code>
is an integer value 1 or 2 denoting a one or two sided t-test.
If <code>sides</code> is not specified the test defaults to a two sided t-test.</p>
<h3 id="jStat.ttest">jStat.ttest( value, array, sides )</h3>
<p>Returns the p-value of <code>value</code> given the data in <code>array</code>.
<code>sides</code> is an integer value 1 or 2 denoting a one or two sided
t-test. If <code>sides</code> is not specified the test defaults to a two
sided t-test.</p>
<h2 id="f_Statistics">F Statistics</h2>
<h3 id="jStat.anovafscore">jStat.anovafscore( array1, array2, ..., arrayn )</h3>
<p>Returns the f-score of an ANOVA on the arrays.</p>
<h3 id="jStat.anovafscore">jStat.anovafscore( [array1,array2, ...,arrayn] )</h3>
<p>Returns the f-score of an ANOVA on the arrays.</p>
<h3 id="jStat.anovaftest">jStat.anovaftest( array1, array2, ...., arrayn )</h3>
<p>Returns the p-value of the f-statistic from the ANOVA
test on the arrays.</p>
<h3 id="jStat.ftest">jStat.ftest( fscore, df1, df2)</h3>
<p>Returns the p-value for the <code>fscore</code> f-score with a <code>df1</code> numerator degrees
of freedom and a <code>df2</code> denominator degrees of freedom.</p>
<h2 id="tukey_39_s_Range_Test">Tukey's Range Test</h2>
<h3 id="jStat.qscore">jStat.qscore( mean1, mean2, n1, n2, sd )</h3>
<p>Returns the q-score of a single pairwise comparison between arrays
of mean <code>mean1</code> and <code>mean2</code>, size <code>n1</code> and <code>n2</code>, and standard deviation (of
all vectors) <code>sd</code>.</p>
<h3 id="jStat.qscore">jStat.qscore( array1, array2, sd )</h3>
<p>Same as above, but the means and sizes are calculated automatically
from the arrays.</p>
<h3 id="jStat.qtest">jStat.qtest( qscore, n, k )</h3>
<p>Returns the p-value of the q-score given the total sample size <code>n</code>
and <code>k</code> number of populations.</p>
<h3 id="jStat.qtest">jStat.qtest( mean1, mean2, n1, n2, sd, n, k )</h3>
<p>Returns the p-value of a single pairwise comparison between arrays
of mean <code>mean1</code> and <code>mean2</code>, size <code>n1</code> and <code>n2</code>, and standard deviation (of
all vectors) <code>sd</code>, where the total sample size is <code>n</code> and the number of
populations is <code>k</code>.</p>
<h3 id="jStat.qtest">jStat.qtest( array1, array2, sd, n, k )</h3>
<p>Same as above, but the means and sizes are calculated automatically
from the arrays.</p>
<h3 id="jStat.tukeyhsd">jStat.tukeyhsd( arrays )</h3>
<p>Performs the full Tukey's range test returning p-values for every
pairwise combination of the arrays in the format of
<code>[[[index1, index2], pvalue], ...]</code></p>
<p>For example:</p>
<pre><code>> jStat.tukeyhsd([[1, 2], [3, 4, 5], [6], [7, 8]])
[ [ [ 0, 1 ], 0.10745283896120883 ],
[ [ 0, 2 ], 0.04374051946838586 ],
[ [ 0, 3 ], 0.007850804224287633 ],
[ [ 1, 2 ], 0.32191548545694226 ],
[ [ 1, 3 ], 0.03802747415485819 ],
[ [ 2, 3 ], 0.5528665999257486 ] ]</code></pre>
<h2 id="confidence_Intervals">Confidence Intervals</h2>
<h3 id="jStat.normalci">jStat.normalci( value, alpha, sd, n )</h3>
<p>Returns a 1-alpha confidence interval for <code>value</code> given
a normal distribution with a standard deviation <code>sd</code> and a
sample size <code>n</code></p>
<h3 id="jStat.normalci">jStat.normalci( value, alpha, array )</h3>
<p>Returns a 1-alpha confidence interval for <code>value</code> given
a normal distribution in the data from <code>array</code>.</p>
<h3 id="jStat.tci">jStat.tci( value, alpha, sd, n )</h3>
<p>Returns a 1-alpha confidence interval for <code>value</code> given
the standard deviation <code>sd</code> and the sample size <code>n</code>.</p>
<h3 id="jStat.tci">jStat.tci( value, alpha, array )</h3>
<p>Returns a 1-alpha confidence interval for <code>value</code> given
the data from <code>array</code>.</p>
<h3 id="jStat.fn.oneSidedDifferenceOfProportions">jStat.fn.oneSidedDifferenceOfProportions( p1, n1, p2, n2 )</h3>
<p>Returns the p-value for a 1-sided test for the difference
between two proportions. <code>p1</code> is the sample proportion for
the first sample, whereas <code>p2</code> is the sample proportion for
the second sample. Similiarly, <code>n1</code> is the sample size of the
first sample and <code>n2</code> is the sample size for the second sample.</p>
<h3 id="jStat.fn.twoSidedDifferenceOfProportions">jStat.fn.twoSidedDifferenceOfProportions( p1, n1, p2, n2 )</h3>
<p>Returns the p-value for a 2-sided test for the difference
between two proportions. <code>p1</code> is the sample proportion for
the first sample, whereas <code>p2</code> is the sample proportion for
the second sample. Similiarly, <code>n1</code> is the sample size of the
first sample and <code>n2</code> is the sample size for the second sample.</p>
</div>
<script src="assets/sh_main.js"></script>
<script src="assets/sh_javascript.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/jstat@latest/dist/jstat.min.js"></script>
<script>highlight(undefined, undefined, 'pre');</script>
</body>
</html>