Mercurial > hg > octave-lyh
annotate doc/interpreter/stats.txi @ 16385:a1690c3e93eb
move hook_function constructor to .cc file
* hook-fcn.cc: New file. Move hook_function::hook_function definition
here from hook-fcn.h.
* libinterp/interpfcn/module.mk (INTERPFCN_SRC): Include hook-fcn.cc
in the list.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 28 Mar 2013 02:52:18 -0400 |
parents | 72c96de7a403 |
children | 7eff3032d144 |
rev | line source |
---|---|
14138
72c96de7a403
maint: update copyright notices for 2012
John W. Eaton <jwe@octave.org>
parents:
14105
diff
changeset
|
1 @c Copyright (C) 1996-2012 John W. Eaton |
7018 | 2 @c |
3 @c This file is part of Octave. | |
4 @c | |
5 @c Octave is free software; you can redistribute it and/or modify it | |
6 @c under the terms of the GNU General Public License as published by the | |
7 @c Free Software Foundation; either version 3 of the License, or (at | |
8 @c your option) any later version. | |
9 @c | |
10 @c Octave is distributed in the hope that it will be useful, but WITHOUT | |
11 @c ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
12 @c FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
13 @c for more details. | |
14 @c | |
15 @c You should have received a copy of the GNU General Public License | |
16 @c along with Octave; see the file COPYING. If not, see | |
17 @c <http://www.gnu.org/licenses/>. | |
3294 | 18 |
4167 | 19 @node Statistics |
3294 | 20 @chapter Statistics |
21 | |
6754 | 22 Octave has support for various statistical methods. This includes |
11436
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
23 basic descriptive statistics, probability distributions, statistical tests, |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
24 random number generation, and much more. |
6754 | 25 |
11573
6f8ffe2c6f76
Grammarcheck txi files for 3.4 release.
Rik <octave@nomad.inbox5.com>
parents:
11544
diff
changeset
|
26 The functions that analyze data all assume that multi-dimensional data |
6754 | 27 is arranged in a matrix where each row is an observation, and each |
11436
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
28 column is a variable. Thus, the matrix defined by |
6754 | 29 |
30 @example | |
9069
634274aaa183
Cleanup documentation for stats.texi
Rik <rdrider0-list@yahoo.com>
parents:
8932
diff
changeset
|
31 @group |
6754 | 32 a = [ 0.9, 0.7; |
33 0.1, 0.1; | |
34 0.5, 0.4 ]; | |
9069
634274aaa183
Cleanup documentation for stats.texi
Rik <rdrider0-list@yahoo.com>
parents:
8932
diff
changeset
|
35 @end group |
6754 | 36 @end example |
37 | |
38 @noindent | |
39 contains three observations from a two-dimensional distribution. | |
40 While this is the default data arrangement, most functions support | |
41 different arrangements. | |
42 | |
8828 | 43 It should be noted that the statistics functions don't test for data |
11436
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
44 containing NaN, NA, or Inf. These values need to be detected and dealt |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
45 with explicitly. See @ref{doc-isnan,,isnan}, @ref{doc-isna,,isna}, |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
46 @ref{doc-isinf,,isinf}, @ref{doc-isfinite,,isfinite}. |
6754 | 47 |
3453 | 48 @menu |
6754 | 49 * Descriptive Statistics:: |
50 * Basic Statistical Functions:: | |
51 * Statistical Plots:: | |
11436
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
52 * Correlation and Regression Analysis:: |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
53 * Distributions:: |
3454 | 54 * Tests:: |
6754 | 55 * Random Number Generation:: |
3453 | 56 @end menu |
57 | |
6754 | 58 @node Descriptive Statistics |
59 @section Descriptive Statistics | |
60 | |
11436
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
61 One principal goal of descriptive statistics is to represent the essence of a |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
62 large data set concisely. Octave provides the mean, median, and mode functions |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
63 which all summarize a data set with just a single number corresponding to |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
64 the central tendency of the data. |
3453 | 65 |
3367 | 66 @DOCSTRING(mean) |
3294 | 67 |
3367 | 68 @DOCSTRING(median) |
3294 | 69 |
11436
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
70 @DOCSTRING(mode) |
7643
0220da981c2a
Modified statistics to calculate consistent median.
Ben Abbott <bpabbott@mac.com>
parents:
7081
diff
changeset
|
71 |
11436
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
72 Using just one number, such as the mean, to represent an entire data set may |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
73 not give an accurate picture of the data. One way to characterize the fit is |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
74 to measure the dispersion of the data. Octave provides several functions for |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
75 measuring dispersion. |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
76 |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
77 @DOCSTRING(range) |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
78 |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
79 @DOCSTRING(iqr) |
7643
0220da981c2a
Modified statistics to calculate consistent median.
Ben Abbott <bpabbott@mac.com>
parents:
7081
diff
changeset
|
80 |
6754 | 81 @DOCSTRING(meansq) |
82 | |
3367 | 83 @DOCSTRING(std) |
3294 | 84 |
11436
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
85 In addition to knowing the size of a dispersion it is useful to know the shape |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
86 of the data set. For example, are data points massed to the left or right |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
87 of the mean? Octave provides several common measures to describe the shape |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
88 of the data set. Octave can also calculate moments allowing arbitrary shape |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
89 measures to be developed. |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
90 |
6754 | 91 @DOCSTRING(var) |
92 | |
11436
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
93 @DOCSTRING(skewness) |
3294 | 94 |
3367 | 95 @DOCSTRING(kurtosis) |
3294 | 96 |
11436
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
97 @DOCSTRING(moment) |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
98 |
12569
6ef23b4a3402
Add quantile, prctile functions to documentation.
Rik <octave@nomad.inbox5.com>
parents:
12532
diff
changeset
|
99 @DOCSTRING(quantile) |
6ef23b4a3402
Add quantile, prctile functions to documentation.
Rik <octave@nomad.inbox5.com>
parents:
12532
diff
changeset
|
100 |
6ef23b4a3402
Add quantile, prctile functions to documentation.
Rik <octave@nomad.inbox5.com>
parents:
12532
diff
changeset
|
101 @DOCSTRING(prctile) |
6ef23b4a3402
Add quantile, prctile functions to documentation.
Rik <octave@nomad.inbox5.com>
parents:
12532
diff
changeset
|
102 |
11436
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
103 A summary view of a data set can be generated quickly with the |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
104 @code{statistics} function. |
6754 | 105 |
106 @DOCSTRING(statistics) | |
107 | |
108 @node Basic Statistical Functions | |
109 @section Basic Statistical Functions | |
110 | |
11436
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
111 Octave supports various helpful statistical functions. Many are useful as |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
112 initial steps to prepare a data set for further analysis. Others provide |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
113 different measures from those of the basic descriptive statistics. |
3294 | 114 |
6754 | 115 @DOCSTRING(center) |
3453 | 116 |
12586
f9b7aa3b88f8
Deprecate studentize(), replace with zscore().
Rik <octave@nomad.inbox5.com>
parents:
12569
diff
changeset
|
117 @DOCSTRING(zscore) |
3453 | 118 |
11436
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
119 @DOCSTRING(histc) |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
120 |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
121 @c FIXME: really want to put a reference to unique here |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
122 @c @DOCSTRING(values) |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
123 |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
124 @DOCSTRING(nchoosek) |
8932
2d0f8692a82e
Add the 'histc' function
Soren Hauberg <hauberg@gmail.com>
parents:
8920
diff
changeset
|
125 |
6550 | 126 @DOCSTRING(perms) |
127 | |
11436
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
128 @DOCSTRING(ranks) |
3453 | 129 |
130 @DOCSTRING(run_count) | |
131 | |
12532
06cebc991966
Add runlength function to documentation.
Rik <octave@nomad.inbox5.com>
parents:
12495
diff
changeset
|
132 @DOCSTRING(runlength) |
06cebc991966
Add runlength function to documentation.
Rik <octave@nomad.inbox5.com>
parents:
12495
diff
changeset
|
133 |
3453 | 134 @DOCSTRING(probit) |
135 | |
6754 | 136 @DOCSTRING(logit) |
3453 | 137 |
6754 | 138 @DOCSTRING(cloglog) |
3453 | 139 |
11436
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
140 @DOCSTRING(mahalanobis) |
3453 | 141 |
11436
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
142 @DOCSTRING(table) |
3453 | 143 |
6754 | 144 @node Statistical Plots |
145 @section Statistical Plots | |
146 | |
147 @c Should hist be moved to here, or perhaps the qqplot and ppplot | |
148 @c functions should be moved to the Plotting Chapter? | |
3453 | 149 |
6754 | 150 Octave can create Quantile Plots (QQ-Plots), and Probability Plots |
151 (PP-Plots). These are simple graphical tests for determining if a | |
152 data set comes from a certain distribution. | |
3453 | 153 |
8828 | 154 Note that Octave can also show histograms of data |
6754 | 155 using the @code{hist} function as described in |
6888 | 156 @ref{Two-Dimensional Plots}. |
6754 | 157 |
158 @DOCSTRING(qqplot) | |
159 | |
160 @DOCSTRING(ppplot) | |
3453 | 161 |
11436
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
162 @node Correlation and Regression Analysis |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
163 @section Correlation and Regression Analysis |
3453 | 164 |
11436
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
165 @c FIXME: Need Intro Here |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
166 |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
167 @DOCSTRING(cov) |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
168 |
12856
cad4cba03f19
Deprecate corrcoef, cor and replace with Matlab equivalent corr
Rik <octave@nomad.inbox5.com>
parents:
12586
diff
changeset
|
169 @DOCSTRING(corr) |
11436
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
170 |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
171 @DOCSTRING(spearman) |
6754 | 172 |
11436
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
173 @DOCSTRING(kendall) |
3454 | 174 |
11436
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
175 @c FIXME: Need discussion of ols & gls and references to them in optim.txi |
3454 | 176 |
3453 | 177 |
3454 | 178 @DOCSTRING(logistic_regression) |
179 | |
4167 | 180 @node Distributions |
3453 | 181 @section Distributions |
3456 | 182 |
6754 | 183 Octave has functions for computing the Probability Density Function |
184 (PDF), the Cumulative Distribution function (CDF), and the quantile | |
11436
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
185 (the inverse of the CDF) for a large number of distributions. |
6754 | 186 |
187 The following table summarizes the supported distributions (in | |
188 alphabetical order). | |
189 | |
7081 | 190 @tex |
191 \vskip 6pt | |
192 {\hbox to \hsize {\hfill\vbox{\offinterlineskip \tabskip=0pt | |
193 \halign{ | |
194 \vrule height2.0ex depth1.ex width 0.6pt #\tabskip=0.3em & | |
195 # \hfil & \vrule # & # \hfil & \vrule # & # \hfil & \vrule # & # \hfil & | |
196 # \vrule width 0.6pt \tabskip=0pt\cr | |
197 \noalign{\hrule height 0.6pt} | |
198 & {\bf Distribution} && {\bf PDF} && {\bf CDF} && {\bf Quantile}&\cr | |
199 \noalign{\hrule} | |
200 &Beta && betapdf && betacdf && betainv&\cr | |
201 &Binomial && binopdf && binocdf && binoinv&\cr | |
202 &Cauchy && cauchy\_pdf && cauchy\_cdf && cauchy\_inv&\cr | |
203 &Chi-Square && chi2pdf && chi2cdf && chi2inv&\cr | |
204 &Univariate Discrete && discrete\_pdf && discrete\_cdf && discrete\_inv&\cr | |
205 &Empirical && empirical\_pdf && empirical\_cdf && empirical\_inv&\cr | |
206 &Exponential && exppdf && expcdf && expinv&\cr | |
207 &F && fpdf && fcdf && finv&\cr | |
208 &Gamma && gampdf && gamcdf && gaminv&\cr | |
209 &Geometric && geopdf && geocdf && geoinv&\cr | |
12495
4675ce154a55
Correctly refer to "discrete uniform" distribution in documentation.
Rik <octave@nomad.inbox5.com>
parents:
11573
diff
changeset
|
210 &Hypergeometric && hygepdf && hygecdf && hygeinv&\cr |
7081 | 211 &Kolmogorov Smirnov && {\it Not Available} && kolmogorov\_&& {\it Not Available}&\cr |
212 & && && smirnov\_cdf &&&\cr | |
12495
4675ce154a55
Correctly refer to "discrete uniform" distribution in documentation.
Rik <octave@nomad.inbox5.com>
parents:
11573
diff
changeset
|
213 &Laplace && laplace\_pdf && laplace\_cdf && laplace\_inv&\cr |
4675ce154a55
Correctly refer to "discrete uniform" distribution in documentation.
Rik <octave@nomad.inbox5.com>
parents:
11573
diff
changeset
|
214 &Logistic && logistic\_pdf && logistic\_cdf && logistic\_inv&\cr |
7081 | 215 &Log-Normal && lognpdf && logncdf && logninv&\cr |
11544
8f90ffe3c5f9
Add stdnormal_xxx family of functions to documentation.
Rik <octave@nomad.inbox5.com>
parents:
11523
diff
changeset
|
216 &Univariate Normal && normpdf && normcdf && norminv&\cr |
7081 | 217 &Pascal && nbinpdf && nbincdf && nbininv&\cr |
218 &Poisson && poisspdf && poisscdf && poissinv&\cr | |
11544
8f90ffe3c5f9
Add stdnormal_xxx family of functions to documentation.
Rik <octave@nomad.inbox5.com>
parents:
11523
diff
changeset
|
219 &Standard Normal && stdnormal\_pdf && stdnormal\_cdf && stdnormal\_inv&\cr |
7081 | 220 &t (Student) && tpdf && tcdf && tinv&\cr |
12495
4675ce154a55
Correctly refer to "discrete uniform" distribution in documentation.
Rik <octave@nomad.inbox5.com>
parents:
11573
diff
changeset
|
221 &Uniform Discrete && unidpdf && unidcdf && unidinv&\cr |
7081 | 222 &Uniform && unifpdf && unifcdf && unifinv&\cr |
223 &Weibull && wblpdf && wblcdf && wblinv&\cr | |
224 \noalign{\hrule height 0.6pt} | |
225 }}\hfill}} | |
226 @end tex | |
227 @ifnottex | |
228 @multitable @columnfractions .31 .23 .23 .23 | |
11447
76f15f3da207
Use @headitem macro to create column heads for @multitable entries.
Rik <octave@nomad.inbox5.com>
parents:
11436
diff
changeset
|
229 @headitem Distribution |
76f15f3da207
Use @headitem macro to create column heads for @multitable entries.
Rik <octave@nomad.inbox5.com>
parents:
11436
diff
changeset
|
230 @tab PDF |
76f15f3da207
Use @headitem macro to create column heads for @multitable entries.
Rik <octave@nomad.inbox5.com>
parents:
11436
diff
changeset
|
231 @tab CDF |
76f15f3da207
Use @headitem macro to create column heads for @multitable entries.
Rik <octave@nomad.inbox5.com>
parents:
11436
diff
changeset
|
232 @tab Quantile |
6754 | 233 @item Beta Distribution |
234 @tab @code{betapdf} | |
235 @tab @code{betacdf} | |
236 @tab @code{betainv} | |
237 @item Binomial Distribution | |
238 @tab @code{binopdf} | |
239 @tab @code{binocdf} | |
240 @tab @code{binoinv} | |
241 @item Cauchy Distribution | |
242 @tab @code{cauchy_pdf} | |
243 @tab @code{cauchy_cdf} | |
244 @tab @code{cauchy_inv} | |
245 @item Chi-Square Distribution | |
246 @tab @code{chi2pdf} | |
247 @tab @code{chi2cdf} | |
248 @tab @code{chi2inv} | |
249 @item Univariate Discrete Distribution | |
250 @tab @code{discrete_pdf} | |
251 @tab @code{discrete_cdf} | |
252 @tab @code{discrete_inv} | |
253 @item Empirical Distribution | |
254 @tab @code{empirical_pdf} | |
255 @tab @code{empirical_cdf} | |
256 @tab @code{empirical_inv} | |
257 @item Exponential Distribution | |
258 @tab @code{exppdf} | |
259 @tab @code{expcdf} | |
260 @tab @code{expinv} | |
261 @item F Distribution | |
262 @tab @code{fpdf} | |
263 @tab @code{fcdf} | |
264 @tab @code{finv} | |
265 @item Gamma Distribution | |
266 @tab @code{gampdf} | |
267 @tab @code{gamcdf} | |
268 @tab @code{gaminv} | |
269 @item Geometric Distribution | |
270 @tab @code{geopdf} | |
271 @tab @code{geocdf} | |
272 @tab @code{geoinv} | |
273 @item Hypergeometric Distribution | |
274 @tab @code{hygepdf} | |
275 @tab @code{hygecdf} | |
276 @tab @code{hygeinv} | |
277 @item Kolmogorov Smirnov Distribution | |
278 @tab @emph{Not Available} | |
279 @tab @code{kolmogorov_smirnov_cdf} | |
280 @tab @emph{Not Available} | |
281 @item Laplace Distribution | |
282 @tab @code{laplace_pdf} | |
283 @tab @code{laplace_cdf} | |
284 @tab @code{laplace_inv} | |
285 @item Logistic Distribution | |
286 @tab @code{logistic_pdf} | |
287 @tab @code{logistic_cdf} | |
288 @tab @code{logistic_inv} | |
289 @item Log-Normal Distribution | |
290 @tab @code{lognpdf} | |
291 @tab @code{logncdf} | |
292 @tab @code{logninv} | |
11544
8f90ffe3c5f9
Add stdnormal_xxx family of functions to documentation.
Rik <octave@nomad.inbox5.com>
parents:
11523
diff
changeset
|
293 @item Univariate Normal Distribution |
8f90ffe3c5f9
Add stdnormal_xxx family of functions to documentation.
Rik <octave@nomad.inbox5.com>
parents:
11523
diff
changeset
|
294 @tab @code{normpdf} |
8f90ffe3c5f9
Add stdnormal_xxx family of functions to documentation.
Rik <octave@nomad.inbox5.com>
parents:
11523
diff
changeset
|
295 @tab @code{normcdf} |
8f90ffe3c5f9
Add stdnormal_xxx family of functions to documentation.
Rik <octave@nomad.inbox5.com>
parents:
11523
diff
changeset
|
296 @tab @code{norminv} |
6754 | 297 @item Pascal Distribution |
298 @tab @code{nbinpdf} | |
299 @tab @code{nbincdf} | |
300 @tab @code{nbininv} | |
301 @item Poisson Distribution | |
302 @tab @code{poisspdf} | |
303 @tab @code{poisscdf} | |
304 @tab @code{poissinv} | |
11544
8f90ffe3c5f9
Add stdnormal_xxx family of functions to documentation.
Rik <octave@nomad.inbox5.com>
parents:
11523
diff
changeset
|
305 @item Standard Normal Distribution |
14105 | 306 @tab @code{stdnormal_pdf} |
307 @tab @code{stdnormal_cdf} | |
308 @tab @code{stdnormal_inv} | |
6754 | 309 @item t (Student) Distribution |
310 @tab @code{tpdf} | |
311 @tab @code{tcdf} | |
312 @tab @code{tinv} | |
9069
634274aaa183
Cleanup documentation for stats.texi
Rik <rdrider0-list@yahoo.com>
parents:
8932
diff
changeset
|
313 @item Univariate Discrete Distribution |
6754 | 314 @tab @code{unidpdf} |
315 @tab @code{unidcdf} | |
316 @tab @code{unidinv} | |
317 @item Uniform Distribution | |
318 @tab @code{unifpdf} | |
319 @tab @code{unifcdf} | |
320 @tab @code{unifinv} | |
321 @item Weibull Distribution | |
322 @tab @code{wblpdf} | |
323 @tab @code{wblcdf} | |
324 @tab @code{wblinv} | |
325 @end multitable | |
7081 | 326 @end ifnottex |
6754 | 327 |
11436
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
328 @DOCSTRING(betapdf) |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
329 |
5412 | 330 @DOCSTRING(betacdf) |
3456 | 331 |
5412 | 332 @DOCSTRING(betainv) |
3456 | 333 |
11436
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
334 @DOCSTRING(binopdf) |
3456 | 335 |
5412 | 336 @DOCSTRING(binocdf) |
3456 | 337 |
5412 | 338 @DOCSTRING(binoinv) |
3456 | 339 |
11436
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
340 @DOCSTRING(cauchy_pdf) |
3456 | 341 |
342 @DOCSTRING(cauchy_cdf) | |
343 | |
344 @DOCSTRING(cauchy_inv) | |
345 | |
11436
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
346 @DOCSTRING(chi2pdf) |
3456 | 347 |
5412 | 348 @DOCSTRING(chi2cdf) |
3456 | 349 |
5412 | 350 @DOCSTRING(chi2inv) |
3456 | 351 |
11436
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
352 @DOCSTRING(discrete_pdf) |
3456 | 353 |
354 @DOCSTRING(discrete_cdf) | |
355 | |
356 @DOCSTRING(discrete_inv) | |
357 | |
11436
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
358 @DOCSTRING(empirical_pdf) |
3456 | 359 |
360 @DOCSTRING(empirical_cdf) | |
361 | |
362 @DOCSTRING(empirical_inv) | |
363 | |
11436
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
364 @DOCSTRING(exppdf) |
3456 | 365 |
5412 | 366 @DOCSTRING(expcdf) |
3456 | 367 |
5412 | 368 @DOCSTRING(expinv) |
3456 | 369 |
11436
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
370 @DOCSTRING(fpdf) |
3456 | 371 |
5412 | 372 @DOCSTRING(fcdf) |
3456 | 373 |
5412 | 374 @DOCSTRING(finv) |
3456 | 375 |
11436
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
376 @DOCSTRING(gampdf) |
3456 | 377 |
5412 | 378 @DOCSTRING(gamcdf) |
3456 | 379 |
5412 | 380 @DOCSTRING(gaminv) |
3456 | 381 |
11436
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
382 @DOCSTRING(geopdf) |
3456 | 383 |
5412 | 384 @DOCSTRING(geocdf) |
3456 | 385 |
5412 | 386 @DOCSTRING(geoinv) |
3456 | 387 |
11436
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
388 @DOCSTRING(hygepdf) |
3456 | 389 |
5412 | 390 @DOCSTRING(hygecdf) |
3456 | 391 |
5412 | 392 @DOCSTRING(hygeinv) |
3456 | 393 |
11436
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
394 @DOCSTRING(kolmogorov_smirnov_cdf) |
3456 | 395 |
11436
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
396 @DOCSTRING(laplace_pdf) |
3456 | 397 |
398 @DOCSTRING(laplace_cdf) | |
399 | |
400 @DOCSTRING(laplace_inv) | |
401 | |
11436
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
402 @DOCSTRING(logistic_pdf) |
3456 | 403 |
404 @DOCSTRING(logistic_cdf) | |
405 | |
406 @DOCSTRING(logistic_inv) | |
407 | |
11436
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
408 @DOCSTRING(lognpdf) |
3456 | 409 |
5412 | 410 @DOCSTRING(logncdf) |
3456 | 411 |
5412 | 412 @DOCSTRING(logninv) |
3456 | 413 |
11436
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
414 @DOCSTRING(nbinpdf) |
3456 | 415 |
6502 | 416 @DOCSTRING(nbincdf) |
417 | |
418 @DOCSTRING(nbininv) | |
419 | |
11436
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
420 @DOCSTRING(normpdf) |
6502 | 421 |
5412 | 422 @DOCSTRING(normcdf) |
3456 | 423 |
5412 | 424 @DOCSTRING(norminv) |
3456 | 425 |
11436
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
426 @DOCSTRING(poisspdf) |
3456 | 427 |
5412 | 428 @DOCSTRING(poisscdf) |
3456 | 429 |
5412 | 430 @DOCSTRING(poissinv) |
3456 | 431 |
11544
8f90ffe3c5f9
Add stdnormal_xxx family of functions to documentation.
Rik <octave@nomad.inbox5.com>
parents:
11523
diff
changeset
|
432 @DOCSTRING(stdnormal_pdf) |
8f90ffe3c5f9
Add stdnormal_xxx family of functions to documentation.
Rik <octave@nomad.inbox5.com>
parents:
11523
diff
changeset
|
433 |
8f90ffe3c5f9
Add stdnormal_xxx family of functions to documentation.
Rik <octave@nomad.inbox5.com>
parents:
11523
diff
changeset
|
434 @DOCSTRING(stdnormal_cdf) |
8f90ffe3c5f9
Add stdnormal_xxx family of functions to documentation.
Rik <octave@nomad.inbox5.com>
parents:
11523
diff
changeset
|
435 |
8f90ffe3c5f9
Add stdnormal_xxx family of functions to documentation.
Rik <octave@nomad.inbox5.com>
parents:
11523
diff
changeset
|
436 @DOCSTRING(stdnormal_inv) |
8f90ffe3c5f9
Add stdnormal_xxx family of functions to documentation.
Rik <octave@nomad.inbox5.com>
parents:
11523
diff
changeset
|
437 |
11436
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
438 @DOCSTRING(tpdf) |
3456 | 439 |
5412 | 440 @DOCSTRING(tcdf) |
3456 | 441 |
5412 | 442 @DOCSTRING(tinv) |
3456 | 443 |
11436
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
444 @DOCSTRING(unidpdf) |
3456 | 445 |
6502 | 446 @DOCSTRING(unidcdf) |
447 | |
448 @DOCSTRING(unidinv) | |
449 | |
11436
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
450 @DOCSTRING(unifpdf) |
6502 | 451 |
5412 | 452 @DOCSTRING(unifcdf) |
3456 | 453 |
5412 | 454 @DOCSTRING(unifinv) |
3456 | 455 |
11436
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
456 @DOCSTRING(wblpdf) |
3456 | 457 |
6502 | 458 @DOCSTRING(wblcdf) |
3456 | 459 |
6502 | 460 @DOCSTRING(wblinv) |
3456 | 461 |
11436
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
462 @node Tests |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
463 @section Tests |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
464 |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
465 Octave can perform many different statistical tests. The following |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
466 table summarizes the available tests. |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
467 |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
468 @tex |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
469 \vskip 6pt |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
470 {\hbox to \hsize {\hfill\vbox{\offinterlineskip \tabskip=0pt |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
471 \halign{ |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
472 \vrule height2.0ex depth1.ex width 0.6pt #\tabskip=0.3em & |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
473 # \hfil & \vrule # & # \hfil & # \vrule width 0.6pt \tabskip=0pt\cr |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
474 \noalign{\hrule height 0.6pt} |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
475 & @strong{Hypothesis} && {\bf Test Functions} &\cr |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
476 \noalign{\hrule} |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
477 & Equal mean values && anova, hotelling\_test2, t\_test\_2, &\cr |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
478 & && welch\_test, wilcoxon\_test, z\_test\_2 &\cr |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
479 & Equal medians && kruskal\_wallis\_test, sign\_test &\cr |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
480 & Equal variances && bartlett\_test, manova, var\_test &\cr |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
481 & Equal distributions && chisquare\_test\_homogeneity, &\cr |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
482 & && kolmogorov\_smirnov\_test\_2, u\_test &\cr |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
483 & Equal marginal frequencies && mcnemar\_test &\cr |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
484 & Equal success probabilities && prop\_test\_2 &\cr |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
485 & Independent observations && chisquare\_test\_independence, &\cr |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
486 & && run\_test &\cr |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
487 & Uncorrelated observations && cor\_test &\cr |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
488 & Given mean value && hotelling\_test, t\_test, z\_test &\cr |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
489 & Observations from distribution && kolmogorov\_smirnov\_test &\cr |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
490 & Regression && f\_test\_regression, t\_test\_regression &\cr |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
491 \noalign{\hrule height 0.6pt} |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
492 }}\hfill}} |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
493 @end tex |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
494 @ifnottex |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
495 @multitable @columnfractions .4 .5 |
11447
76f15f3da207
Use @headitem macro to create column heads for @multitable entries.
Rik <octave@nomad.inbox5.com>
parents:
11436
diff
changeset
|
496 @headitem Hypothesis |
76f15f3da207
Use @headitem macro to create column heads for @multitable entries.
Rik <octave@nomad.inbox5.com>
parents:
11436
diff
changeset
|
497 @tab Test Functions |
11436
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
498 @item Equal mean values |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
499 @tab @code{anova}, @code{hotelling_test2}, @code{t_test_2}, |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
500 @code{welch_test}, @code{wilcoxon_test}, @code{z_test_2} |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
501 @item Equal medians |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
502 @tab @code{kruskal_wallis_test}, @code{sign_test} |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
503 @item Equal variances |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
504 @tab @code{bartlett_test}, @code{manova}, @code{var_test} |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
505 @item Equal distributions |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
506 @tab @code{chisquare_test_homogeneity}, @code{kolmogorov_smirnov_test_2}, |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
507 @code{u_test} |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
508 @item Equal marginal frequencies |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
509 @tab @code{mcnemar_test} |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
510 @item Equal success probabilities |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
511 @tab @code{prop_test_2} |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
512 @item Independent observations |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
513 @tab @code{chisquare_test_independence}, @code{run_test} |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
514 @item Uncorrelated observations |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
515 @tab @code{cor_test} |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
516 @item Given mean value |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
517 @tab @code{hotelling_test}, @code{t_test}, @code{z_test} |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
518 @item Observations from given distribution |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
519 @tab @code{kolmogorov_smirnov_test} |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
520 @item Regression |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
521 @tab @code{f_test_regression}, @code{t_test_regression} |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
522 @end multitable |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
523 @end ifnottex |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
524 |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
525 The tests return a p-value that describes the outcome of the test. |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
526 Assuming that the test hypothesis is true, the p-value is the probability |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
527 of obtaining a worse result than the observed one. So large p-values |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
528 corresponds to a successful test. Usually a test hypothesis is accepted |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
529 if the p-value exceeds 0.05. |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
530 |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
531 @DOCSTRING(anova) |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
532 |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
533 @DOCSTRING(bartlett_test) |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
534 |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
535 @DOCSTRING(chisquare_test_homogeneity) |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
536 |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
537 @DOCSTRING(chisquare_test_independence) |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
538 |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
539 @DOCSTRING(cor_test) |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
540 |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
541 @DOCSTRING(f_test_regression) |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
542 |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
543 @DOCSTRING(hotelling_test) |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
544 |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
545 @DOCSTRING(hotelling_test_2) |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
546 |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
547 @DOCSTRING(kolmogorov_smirnov_test) |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
548 |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
549 @DOCSTRING(kolmogorov_smirnov_test_2) |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
550 |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
551 @DOCSTRING(kruskal_wallis_test) |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
552 |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
553 @DOCSTRING(manova) |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
554 |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
555 @DOCSTRING(mcnemar_test) |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
556 |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
557 @DOCSTRING(prop_test_2) |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
558 |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
559 @DOCSTRING(run_test) |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
560 |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
561 @DOCSTRING(sign_test) |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
562 |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
563 @DOCSTRING(t_test) |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
564 |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
565 @DOCSTRING(t_test_2) |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
566 |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
567 @DOCSTRING(t_test_regression) |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
568 |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
569 @DOCSTRING(u_test) |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
570 |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
571 @DOCSTRING(var_test) |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
572 |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
573 @DOCSTRING(welch_test) |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
574 |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
575 @DOCSTRING(wilcoxon_test) |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
576 |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
577 @DOCSTRING(z_test) |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
578 |
e151e23f73bc
Overhaul base statistics functions and documentation of same.
Rik <octave@nomad.inbox5.com>
parents:
11392
diff
changeset
|
579 @DOCSTRING(z_test_2) |
3456 | 580 |
6754 | 581 @node Random Number Generation |
582 @section Random Number Generation | |
583 | |
584 Octave can generate random numbers from a large number of distributions. | |
585 The random number generators are based on the random number generators | |
586 described in @ref{Special Utility Matrices}. | |
587 @c Should rand, randn, rande, randp, and randg be moved to here? | |
588 | |
589 The following table summarizes the available random number generators | |
590 (in alphabetical order). | |
591 | |
7081 | 592 @tex |
593 \vskip 6pt | |
594 {\hbox to \hsize {\hfill\vbox{\offinterlineskip \tabskip=0pt | |
595 \halign{ | |
596 \vrule height2.0ex depth1.ex width 0.6pt #\tabskip=0.3em & | |
597 # \hfil & \vrule # & # \hfil & # \vrule width 0.6pt \tabskip=0pt\cr | |
598 \noalign{\hrule height 0.6pt} | |
599 & {\bf Distribution} && {\bf Function} &\cr | |
600 \noalign{\hrule} | |
601 & Beta Distribution && betarnd &\cr | |
602 & Binomial Distribution && binornd &\cr | |
603 & Cauchy Distribution && cauchy\_rnd &\cr | |
604 & Chi-Square Distribution && chi2rnd &\cr | |
605 & Univariate Discrete Distribution && discrete\_rnd &\cr | |
606 & Empirical Distribution && empirical\_rnd &\cr | |
607 & Exponential Distribution && exprnd &\cr | |
608 & F Distribution && frnd &\cr | |
609 & Gamma Distribution && gamrnd &\cr | |
610 & Geometric Distribution && geornd &\cr | |
611 & Hypergeometric Distribution && hygernd &\cr | |
612 & Laplace Distribution && laplace\_rnd &\cr | |
613 & Logistic Distribution && logistic\_rnd &\cr | |
614 & Log-Normal Distribution && lognrnd &\cr | |
615 & Pascal Distribution && nbinrnd &\cr | |
616 & Univariate Normal Distribution && normrnd &\cr | |
617 & Poisson Distribution && poissrnd &\cr | |
11544
8f90ffe3c5f9
Add stdnormal_xxx family of functions to documentation.
Rik <octave@nomad.inbox5.com>
parents:
11523
diff
changeset
|
618 & Standard Normal Distribution && stdnormal\_rnd &\cr |
7081 | 619 & t (Student) Distribution && trnd &\cr |
620 & Univariate Discrete Distribution && unidrnd &\cr | |
621 & Uniform Distribution && unifrnd &\cr | |
622 & Weibull Distribution && wblrnd &\cr | |
623 & Wiener Process && wienrnd &\cr | |
624 \noalign{\hrule height 0.6pt} | |
625 }}\hfill}} | |
626 @end tex | |
627 @ifnottex | |
6754 | 628 @multitable @columnfractions .4 .3 |
11447
76f15f3da207
Use @headitem macro to create column heads for @multitable entries.
Rik <octave@nomad.inbox5.com>
parents:
11436
diff
changeset
|
629 @headitem Distribution @tab Function |
6754 | 630 @item Beta Distribution @tab @code{betarnd} |
631 @item Binomial Distribution @tab @code{binornd} | |
632 @item Cauchy Distribution @tab @code{cauchy_rnd} | |
633 @item Chi-Square Distribution @tab @code{chi2rnd} | |
634 @item Univariate Discrete Distribution @tab @code{discrete_rnd} | |
635 @item Empirical Distribution @tab @code{empirical_rnd} | |
636 @item Exponential Distribution @tab @code{exprnd} | |
637 @item F Distribution @tab @code{frnd} | |
638 @item Gamma Distribution @tab @code{gamrnd} | |
639 @item Geometric Distribution @tab @code{geornd} | |
640 @item Hypergeometric Distribution @tab @code{hygernd} | |
641 @item Laplace Distribution @tab @code{laplace_rnd} | |
642 @item Logistic Distribution @tab @code{logistic_rnd} | |
643 @item Log-Normal Distribution @tab @code{lognrnd} | |
644 @item Pascal Distribution @tab @code{nbinrnd} | |
645 @item Univariate Normal Distribution @tab @code{normrnd} | |
646 @item Poisson Distribution @tab @code{poissrnd} | |
11544
8f90ffe3c5f9
Add stdnormal_xxx family of functions to documentation.
Rik <octave@nomad.inbox5.com>
parents:
11523
diff
changeset
|
647 @item Standard Normal Distribution @tab @code{stdnormal_rnd} |
6754 | 648 @item t (Student) Distribution @tab @code{trnd} |
649 @item Univariate Discrete Distribution @tab @code{unidrnd} | |
650 @item Uniform Distribution @tab @code{unifrnd} | |
651 @item Weibull Distribution @tab @code{wblrnd} | |
652 @item Wiener Process @tab @code{wienrnd} | |
653 @end multitable | |
7081 | 654 @end ifnottex |
6754 | 655 |
656 @DOCSTRING(betarnd) | |
657 | |
658 @DOCSTRING(binornd) | |
659 | |
660 @DOCSTRING(cauchy_rnd) | |
661 | |
662 @DOCSTRING(chi2rnd) | |
663 | |
664 @DOCSTRING(discrete_rnd) | |
665 | |
666 @DOCSTRING(empirical_rnd) | |
667 | |
668 @DOCSTRING(exprnd) | |
669 | |
670 @DOCSTRING(frnd) | |
671 | |
672 @DOCSTRING(gamrnd) | |
673 | |
674 @DOCSTRING(geornd) | |
675 | |
676 @DOCSTRING(hygernd) | |
677 | |
678 @DOCSTRING(laplace_rnd) | |
679 | |
680 @DOCSTRING(logistic_rnd) | |
681 | |
682 @DOCSTRING(lognrnd) | |
683 | |
684 @DOCSTRING(nbinrnd) | |
685 | |
686 @DOCSTRING(normrnd) | |
687 | |
688 @DOCSTRING(poissrnd) | |
689 | |
11544
8f90ffe3c5f9
Add stdnormal_xxx family of functions to documentation.
Rik <octave@nomad.inbox5.com>
parents:
11523
diff
changeset
|
690 @DOCSTRING(stdnormal_rnd) |
8f90ffe3c5f9
Add stdnormal_xxx family of functions to documentation.
Rik <octave@nomad.inbox5.com>
parents:
11523
diff
changeset
|
691 |
6754 | 692 @DOCSTRING(trnd) |
693 | |
694 @DOCSTRING(unidrnd) | |
695 | |
696 @DOCSTRING(unifrnd) | |
697 | |
6502 | 698 @DOCSTRING(wblrnd) |
3456 | 699 |
5412 | 700 @DOCSTRING(wienrnd) |
6754 | 701 |