This repository has been archived by the owner on Jun 3, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathResultsLog_statistics-distributions-001_js.txt
156 lines (130 loc) · 4.79 KB
/
ResultsLog_statistics-distributions-001_js.txt
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
/*Results with "statistics-distributions-001.js" on 2016-07-31.
* The all code was tested on Firebug 2.0.17
* in Firefox 47.0 (32-bit Ubuntu 14.04).
*
* 2016 Yuji SODE <[email protected]>
*
* Updated on 2017-02-15.
* The updated code was tested on The Web Console
* in Firefox 51.0.1(32-bit)(32-bit Ubuntu 14.04).
*/
/*
* info: Example
* tested code etc.
* result
*/
/*===examples SYNOPSIS in "statistics-distributions-001.js"===*/
//info: Chi-squared-crit (2 degrees of freedom, 95th percentile = 0.05 level
chisqrdistr(2, .05);
//5.9915
//info: u-crit (95th percentile = 0.05 level)
udistr(.05);
//1.6449
//info: t-crit (1 degree of freedom, 99.5th percentile = 0.005 level)
tdistr(1,.005);
//ReferenceError: i is not defined
//info: F-crit (1 degree of freedom in numerator, 3 degrees of freedom
// in denominator, 99th percentile = 0.01 level)
fdistr(1,3,.01);
//ReferenceError: i is not defined
//info: upper probability of the u distribution (u = -0.85): Q(u) = 1-G(u)
uprob(-0.85);
//0.80234
//info: upper probability of the chi-square distribution
// (3 degrees of freedom, chi-squared = 6.25): Q = 1-G
chisqrprob(3,6.25);
//0.10006
//info: upper probability of the t distribution
// (3 degrees of freedom, t = 6.251): Q = 1-G
tprob(3,6.251);
//ReferenceError: i is not defined
//info: upper probability of the F distribution
// (3 degrees of freedom in numerator, 5 degrees of freedom in
// denominator, F = 6.25): Q = 1-G
fprob(3,5,.625);
//ReferenceError: i is not defined
//additional test
//info: upper probability of the F distribution
// (3 degrees of freedom in numerator, 5 degrees of freedom in
// denominator, F = 6.25): Q = 1-G
fprob(3,5,6.25);
//ReferenceError: i is not defined
/*===additional examples===*/
/* example data cited:
* Ishii, S., 1975. Seibutu Toukeigaku Nyuumon
* (English title: An Introduction to Biostatistics).
* Tokyo, Japan, BAIFUKAN CO., LTD.
* (in Japanese)
*
* ISBN: 9784563037345
* NCID: BN04347526
*/
//info: Chi-squared-crit (2 degrees of freedom, p value = 0.05).
// According to Ishii (1975),
// 5.991
//info: u-crit (p value = 0.049471; u-distribution approximated with
// standard normal distribution when sample size > 20).
// According to Ishii (1975),
// 1.65
//info: t-crit (1 degree of freedom, p value = 0.005).
// According to Ishii (1975),
// 127.32(two-tailed test)
// 63.657(one-tailed test)
//info: F-crit (1 degree of freedom in numerator, 3 degrees of freedom
// in denominator, p value = 0.01)
// According to Ishii (1975),
// 55.55(two-tailed test)
// 34.12(one-tailed test)
//info: upper probability of the u distribution (u = -0.85; u-distribution
// approximated with standard normal distribution when sample size > 20).
// According to Ishii (1975),
// 1-p(z >= 0.85) = 1-0.19766 = 0.80234
//info: upper probability of the chi-square distribution
// (3 degrees of freedom, chi-squared = 6.25).
// According to Ishii (1975),
// 0.10
//info: upper probability of the t distribution
// (3 degrees of freedom, t = 5.841).
// According to Ishii (1975),
// 0.01(two-tailed test)
// 0.005(one-tailed test)
//info: upper probability of the t distribution
// (3 degrees of freedom, t = 7.453).
// According to Ishii (1975),
// 0.005(two-tailed test)
// 0.0025(one-tailed test)
//info: upper probability of the F distribution (3 degrees of freedom
// in numerator, 5 degrees of freedom in denominator, F = 5.41).
// According to Ishii (1975),
// 0.025(two-tailed test)
// 0.05(one-tailed test)
//info: upper probability of the F distribution (3 degrees of freedom
// in numerator, 5 degrees of freedom in denominator, F = 7.76).
// According to Ishii (1975),
// 0.0125(two-tailed test)
// 0.025(one-tailed test)
/*==============================================================
* Reports by Oakley E. Gordon in mail from Ben Tilly(Feb 14, 2017 at 10:08 AM)
* on: February 13, 2017 at 10:07:52 AM MST and Feb 13, 2017 at 10:13 AM
* ==============================================================
*/
//info: upper probability of the F distribution
// (6 degrees of freedom in numerator, 60 degrees of freedom in
// denominator, F = 2): Q = 1-G
fprob(6,60,2);
//1
//info: upper probability of the F distribution
// (6 degrees of freedom in numerator, 61 degrees of freedom in
// denominator, F = 2): Q = 1-G
fprob(6,61,2);
//0.079403
//info: upper probability of the F distribution
// (6 degrees of freedom in numerator, 59 degrees of freedom in
// denominator, F = 2): Q = 1-G
fprob(6,59,2);
//0.079988
//info: upper probability of the F distribution
// (1 degrees of freedom in numerator, 10 degrees of freedom in
// denominator, F = 25): Q = 1-G
fprob(1,10,25);
//0.18041