package stat
The stat
package contains classes, traits and objects for basic statistical
functions and analyses. The package object itself defines an implicit
conversion from scalation.linalgebra.VectorD
to StatVector
.
- Alphabetic
- By Inheritance
- stat
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
class
Anova extends AnyRef
The Anova class provides the functions necessary for performing a one-way ANalysis Of VAriance (ANOVA) on the input data matrix x.
The Anova class provides the functions necessary for performing a one-way ANalysis Of VAriance (ANOVA) on the input data matrix x. The data matrix: row i - i-th group/treatment column j - j-th replica
-
class
BatchVector extends AnyRef
The
BatchVector
class contains aVectorD
for maintaining experimental data in multiple batches and methods for computing statistics on these data.The
BatchVector
class contains aVectorD
for maintaining experimental data in multiple batches and methods for computing statistics on these data. Ex: It can be used to support the Method of Batch Means (MBM). -
class
Canvas extends Panel
Create a canvas on which to draw the histogram.
-
class
FramelessHistogram extends AnyRef
The
FramelessHistogram
class should be used in embedded applications. -
class
GoodnessOfFit_CS extends Error
The
GoodnessOfFit_CS
class is used to fit data to probability distributions.The
GoodnessOfFit_CS
class is used to fit data to probability distributions. Choosing the number of 'intervals' can be challenging and can affect the result: Suggestions: each interval should have 'E_i = n*p_i >= 5' and intervals >= sqrt (n). It uses the Chi-square goodness of fit test with equal width intervals.- See also
www.eg.bucknell.edu/~xmeng/Course/CS6337/Note/master/node66.html Compute the following for each interval and sum over all intervals. (O_i - E_i)^2 / E_i where O_i and E_i are the observed and expected counts for interval 'i', respectively.
-
class
GoodnessOfFit_CS2 extends Error
The
GoodnessOfFit_CS2
class is used to fit data to probability distributions.The
GoodnessOfFit_CS2
class is used to fit data to probability distributions. Suggestions: each interval should have 'E_i = n*p_i >= 5' and intervals >= sqrt (n). It uses the Chi-square goodness of fit test with equal probability intervals.- See also
www.eg.bucknell.edu/~xmeng/Course/CS6337/Note/master/node66.html Compute the following for each interval and sum over all intervals. (O_i - E_i)^2 / E_i where O_i and E_i are the observed and expected counts for interval 'i', respectively.
-
class
GoodnessOfFit_KS extends Error
The
GoodnessOfFit_KS
class is used to fit data to a probability distribution.The
GoodnessOfFit_KS
class is used to fit data to a probability distribution. It uses the Kolmogorov-Smirnov Goodness of Fit Test. Determine the maximum absolute difference 'd_max' between the data points 'd_i' and the theoretical value from a CDF F,d_max = max 1≤i≤n {|Fe(d_i) - F(d_i)|} (concept)
d_max = max 1≤i≤n {F(d_i) − (i−1)/n, i/n − F(d_i)} (calculation)
where 'Fe(.)' is the empirical distribution and 'F(.)' is the theoretical distribution. If 'd_max' is large, the fit should be rejected.
- See also
www.itl.nist.gov/div898/handbook/eda/section3/eda35g.htm ---------------------------------------------------------------------------------
www.eg.bucknell.edu/~xmeng/Course/CS6337/Note/master/node66.html
-
class
Histogram extends VizFrame
The
Histogram
class takes a vector of values, counts the number of values in each of several intervals and displays the counts vertically in a histogram. -
final
class
MM_StatVector extends AnyVal
The
MM_StatVector
value class provides methods for computing statistics on data vectors.The
MM_StatVector
value class provides methods for computing statistics on data vectors. Both maximum likelihood and unbiased estimators are supported. Unbiased should only be used on sample (not population) data. Ex: It can be used to support the Method of Independent Replications (MIR). For efficiency,MM_StatVector
is a value class that enriches theVectorD
. The corresponding implicit conversion in thestat
package object.- See also
stackoverflow.com/questions/14861862/how-do-you-enrich-value-classes-without-overhead -----------------------------------------------------------------------------
-
class
StatTable extends Frame
The
StatTable
class display statistical results in a frame's table. -
final
class
StatVector extends AnyVal
The
StatVector
value class provides methods for computing statistics on data vectors.The
StatVector
value class provides methods for computing statistics on data vectors. Both maximum likelihood and unbiased estimators are supported. Unbiased should only be used on sample (not population) data. Ex: It can be used to support the Method of Independent Replications (MIR). For efficiency,StatVector
is a value class that enriches theVectorD
. The corresponding implicit conversion in thestat
package object.- See also
stackoverflow.com/questions/14861862/how-do-you-enrich-value-classes-without-overhead -----------------------------------------------------------------------------
-
final
class
StatVectorI extends AnyVal
The
StatVectorI
value class provides methods for computing statistics on integer values data vectors.The
StatVectorI
value class provides methods for computing statistics on integer values data vectors. Both maximum likelihood and unbiased estimators are supported. Unbiased should only be used on sample (not population) data. For efficiency,StatVectorI
is a value class that enriches theVectorI
. The corresponding implicit conversion in thestat
package object.- See also
stackoverflow.com/questions/14861862/how-do-you-enrich-value-classes-without-overhead -----------------------------------------------------------------------------
-
class
Statistic extends Error
The
Statistic
class is used to collect values and compute sample statistics on them (e.g., waiting time).The
Statistic
class is used to collect values and compute sample statistics on them (e.g., waiting time). Contrast withTimeStatistic
defined below. -
class
TTest extends AnyRef
The
TTest
class is used to test whether the means, 'μ1' and 'μ2', of two data samples, 'x' and 'y', are different, 'μ1 ≠ μ2', using a Two-Sample, Independent t-test.The
TTest
class is used to test whether the means, 'μ1' and 'μ2', of two data samples, 'x' and 'y', are different, 'μ1 ≠ μ2', using a Two-Sample, Independent t-test. Assumes samples are drawn from Normal distributions. The error in the test is measured by the conditional probability 'p' that a "difference is detected" when there "actually is none".p = P(different | μ1 = μ2)
The power of the test is the ability to detect actual differences. '1 - power' is measured by the conditional probability 'q' that a "difference is not detected" when there "actually is one".
q = P(! different | μ1 ≠ μ2)
These are called type I (measured by p) and type II (measured by q) errors.
- See also
en.wikipedia.org/wiki/Type_I_and_type_II_errors -----------------------------------------------------------------------------
-
class
TimeStatistic extends Statistic
The
TimeStatistic
class is used to collect values and compute time-persistent statistics on them (e.g., Number in Queue).The
TimeStatistic
class is used to collect values and compute time-persistent statistics on them (e.g., Number in Queue).- See also
staff.unak.is/andy/Year%203%20Simulation/Laboratories/v4manual/internal.htm
Value Members
-
implicit
def
vectorC2StatVector(x: VectorC): StatVector
Implicit conversion from
VectorD
toStatVector
, which supports more advanced statistical operations on vectors (e.g., covariance).Implicit conversion from
VectorD
toStatVector
, which supports more advanced statistical operations on vectors (e.g., covariance). Other vector types require to conversion toVectorD
via 'toDouble'. Caveat: won't work for vectors of string numbers (VectorS
) since there not a meaningful conversion for general strings.- x
the vector to be enriched
- implicit def vectorD2StatVector(x: VectorD): StatVector
- implicit def vectorI2StatVector(x: VectorI): StatVectorI
- implicit def vectorL2StatVector(x: VectorL): StatVector
- implicit def vectorQ2StatVector(x: VectorQ): StatVector
- implicit def vectorR2StatVector(x: VectorR): StatVector
- implicit def vectorT2StatVector(x: VectorT): StatVector
-
object
AnovaTest extends App
This object is used to test the Anova class.
This object is used to test the Anova class.
- See also
wiki.uiowa.edu/display/bstat/One-way+fixed+effects+ANOVA > runMain scalation.stat.AnovaTest
-
object
BatchVectorTest extends App
The
BatchVectorTest
object provides an example of how to use theBatchVector
class to implement the Method of Batch Means (MBM). -
object
Conversions
The
Conversions
object provide implicit conversion from memory mapped vectors toStatVectors
. -
object
GoodnessOfFit_CS
The
GoodnessOfFit_CS
companion object provides two discrepancy metrics to capture the differences between observed 'o' and expected 'o' counts.The
GoodnessOfFit_CS
companion object provides two discrepancy metrics to capture the differences between observed 'o' and expected 'o' counts.- See also
en.wikipedia.org/wiki/G-test
-
object
GoodnessOfFit_CS2Test extends App
The
GoodnessOfFit_CS2Test
object is used to test theGoodnessOfFit_CS
class.The
GoodnessOfFit_CS2Test
object is used to test theGoodnessOfFit_CS
class.- See also
www.seattlecentral.edu/qelp/sets/057/057.html > runMain scalation.stat.GoodnessOfFit_CS2Test
-
object
GoodnessOfFit_CSTest extends App
The
GoodnessOfFit_CSTest
object is used to test theGoodnessOfFit_CS
class.The
GoodnessOfFit_CSTest
object is used to test theGoodnessOfFit_CS
class.- See also
www.seattlecentral.edu/qelp/sets/057/057.html > runMain scalation.stat.GoodnessOfFit_CSTest
-
object
GoodnessOfFit_KS
The
GoodnessOfFit_KS
object provides methods to approximate the critical values/p-values for the KS Test.The
GoodnessOfFit_KS
object provides methods to approximate the critical values/p-values for the KS Test.P(D_n < d)
- See also
sa-ijas.stat.unipd.it/sites/sa-ijas.stat.unipd.it/files/IJAS_3-4_2009_07_Facchinetti.pdf
www.jstatsoft.org/article/view/v008i18/kolmo.pdf
-
object
GoodnessOfFit_KSTest extends App
The
GoodnessOfFit_KSTest
object is used to test theGoodnessOfFit_KS
class.The
GoodnessOfFit_KSTest
object is used to test theGoodnessOfFit_KS
class.- See also
www.seattlecentral.edu/qelp/sets/057/057.html > runMain scalation.stat.GoodnessOfFit_KSTest
-
object
GoodnessOfFit_KSTest2 extends App
The
GoodnessOfFit_KSTest2
object is used to test theGoodnessOfFit_KS
object.The
GoodnessOfFit_KSTest2
object is used to test theGoodnessOfFit_KS
object.- See also
www.utdallas.edu/~herve/Abdi-Lillie2007-pretty.pdf > runMain scalation.stat.GoodnessOfFit_KSTest2
-
object
GoodnessOfFit_KSTest3 extends App
The
GoodnessOfFit_KSTest3
object is used to test theGoodnessOfFit_KS
object.The
GoodnessOfFit_KSTest3
object is used to test theGoodnessOfFit_KS
object.- See also
www.jstatsoft.org/article/view/v008i18/kolmo.pdf > runMain scalation.stat.GoodnessOfFit_KSTest3
-
object
GoodnessOfFit_KSTest4 extends App
The
GoodnessOfFit_KSTest4
object is used to test theGoodnessOfFit_KS
object.The
GoodnessOfFit_KSTest4
object is used to test theGoodnessOfFit_KS
object. Fifty data points generated by a random variate generator for the Normal distribution are tested to see if they pass the Normality test. > runMain scalation.stat.GoodnessOfFit_KSTest4 -
object
HistogramTest extends App
The
HistogramTest
object is used to test theHistogram
class.The
HistogramTest
object is used to test theHistogram
class. As 'k' increases, the sum of Uniform approaches Normal. > runMain scalation.stat.HistogramTest -
object
MM_StatVectorTest extends App
The
MM_StatVectorTest
object is used to test theMM_StatVector
class.The
MM_StatVectorTest
object is used to test theMM_StatVector
class. > runMain scalation.stat.MM_StatVectorTest -
object
MM_StatVectorTest2 extends App
The
MM_StatVectorTest2
object provides an example of how to use theMM_StatVector
class to implement the Method of Independent Replications (MIR) following a simple two-stage procedure. -
object
MethodOfMoments
The
MethodOfMoments
object provides methods for estimating parameters for popular probability distributions using the Method of Moments (MOM).The
MethodOfMoments
object provides methods for estimating parameters for popular probability distributions using the Method of Moments (MOM). The main alternative is to use Maximum Likelihood Estimators (MLE).- See also
www.math.uah.edu/stat/point/Moments.html
-
object
Normality
The
Normality
object provides methods for testing Normality based on skewness and kurtosis.The
Normality
object provides methods for testing Normality based on skewness and kurtosis. Such test are more suitable for large sample sizes where more powerful goodness-of-fit tests tend to frequently reject Normality.- See also
en.wikipedia.org/wiki/D%27Agostino%27s_K-squared_test
stats.stackexchange.com/questions/2492/is-normality-testing-essentially-useless
stats.stackexchange.com/questions/29731/regression-when-the-ols-residuals-are-not-normally-distributed
-
object
NormalityTest extends App
The
NormalityTest
object is used to test theNormality
object.The
NormalityTest
object is used to test theNormality
object.- See also
www.seattlecentral.edu/qelp/sets/057/057.html > runMain scalation.stat.NormalityTest
-
object
Q_Q_Plot extends Error
The
Q_Q_Plot
object produces Quantile-Quantile plots that are used to compare probability distributions. -
object
Q_Q_PlotTest extends App
The
Q_Q_PlotTest
object is used to test theQ_Q_Plot
object: distribution vs.The
Q_Q_PlotTest
object is used to test theQ_Q_Plot
object: distribution vs. distribution. > runMain scalation.stat.Q_Q_PlotTest -
object
Q_Q_PlotTest2 extends App
The
Q_Q_PlotTest2
object is used to test theQ_Q_Plot
object: data vector vs.The
Q_Q_PlotTest2
object is used to test theQ_Q_Plot
object: data vector vs. distribution. > runMain scalation.stat.Q_Q_PlotTest2 -
object
StatTableTest extends App
The
StatTableTest
is used to test theStatTable
class. -
object
StatVector
The
StatVector
companion object extends statistics vector operations to matrices. -
object
StatVectorITest extends App
The
StatVectorITest
object is used to test theStatVectorI
class.The
StatVectorITest
object is used to test theStatVectorI
class.- See also
www.mathworks.com/help/stats/skewness.html > runMain scalation.stat.StatVectorITest
-
object
StatVectorTest extends App
The
StatVectorTest
object is used to test theStatVector
class.The
StatVectorTest
object is used to test theStatVector
class.- See also
www.mathworks.com/help/stats/skewness.html > runMain scalation.stat.StatVectorTest
-
object
StatVectorTest2 extends App
The
StatVectorTest2
object provides an example of how to use theStatVector
class to implement the Method of Independent Replications (MIR) following a simple two-stage procedure.The
StatVectorTest2
object provides an example of how to use theStatVector
class to implement the Method of Independent Replications (MIR) following a simple two-stage procedure. > runMain scalation.stat.StatVectorTest2 -
object
StatVectorTest3 extends App
The
StatVectorTest3
object is used to test theStatVector
companion object by computing covariance, correlation and cosine matrices.The
StatVectorTest3
object is used to test theStatVector
companion object by computing covariance, correlation and cosine matrices.- See also
www.itl.nist.gov/div898/handbook/pmc/section5/pmc541.htm > runMain scalation.stat.StatVectorTest3
-
object
StatVectorTest4 extends App
The
StatVectorTest4
object is used to test theStatVector
companion object by computing covariance, correlation and cosine matrices.The
StatVectorTest4
object is used to test theStatVector
companion object by computing covariance, correlation and cosine matrices.- See also
www.itl.nist.gov/div898/software/dataplot/refman2/auxillar/corrmatr.htm > runMain scalation.stat.StatVectorTest4
-
object
StatVectorTest5 extends App
The
StatVectorTest5
object is used to test theStatVector
companion object by analyzing a time-series vector.The
StatVectorTest5
object is used to test theStatVector
companion object by analyzing a time-series vector. > runMain scalation.stat.StatVectorTest5 -
object
StatVectorTest6 extends App
The
StatVectorTest6
object is used to test theStatVector
class by computing point and interval statistics on a data vector/sample.The
StatVectorTest6
object is used to test theStatVector
class by computing point and interval statistics on a data vector/sample.- See also
Data Science Using ScalaTion, Chapter 2, Example Problems > runMain scalation.stat.StatVectorTest6
-
object
StatVectorTest7 extends App
The
StatVectorTest7
object is used to test theStatVector
class by computing point and interval statistics on a data vector/sample.The
StatVectorTest7
object is used to test theStatVector
class by computing point and interval statistics on a data vector/sample. It tests the success rates of confidence intervals based on the z- and t-distributions.- See also
Data Science Using ScalaTion, Chapter 2, Example Problems > runMain scalation.stat.StatVectorTest7
-
object
Statistic extends Error
The
Statistic
companion object provides additional values and functions. -
object
StatisticTest extends App
The
StatisticTest
object is used to test theStatistic
andTimeStatistic
classes.The
StatisticTest
object is used to test theStatistic
andTimeStatistic
classes. > runMain scalation.stat.StatisticTest -
object
TTest
The
TTest
companion object provides a convenient method for performing t-test. -
object
TTestTest extends App
The
TTestTest
object is used to test theTTest
class.The
TTestTest
object is used to test theTTest
class.- See also
www.isixsigma.com/tools-templates/hypothesis-testing/making-sense-two-sample-t-test/ > runMain scalation.stat.TTestTest
-
object
TimeStatistic extends Error
The
TimeStatistic
companion object provides additional functions.