package math
Mathematical and statistical functions.
- Alphabetic
- By Inheritance
- math
- Operators
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
implicit
def
array2Matrix(matrix: Array[Array[Double]]): Matrix
- Definition Classes
- Operators
-
def
beta(x: Double, y: Double): Double
The beta function, also called the Euler integral of the first kind.
The beta function, also called the Euler integral of the first kind.
B(x, y) = ∫01 tx-1 (1-t)y-1dt
for x, y > 0 and the integration is over [0,1].The beta function is symmetric, i.e. B(x,y) = B(y,x).
- Definition Classes
- Operators
-
def
chisqtest(table: Array[Array[Int]]): CorTest
Given a two-dimensional contingency table in the form of an array of integers, returns Chi-square test for independence.
Given a two-dimensional contingency table in the form of an array of integers, returns Chi-square test for independence. The rows of contingency table are labels by the values of one nominal variable, the columns are labels by the values of the other nominal variable, and whose entries are non-negative integers giving the number of observed events for each combination of row and column. Continuity correction will be applied when computing the test statistic for 2x2 tables: one half is subtracted from all |O-E| differences. The correlation coefficient is calculated as Cramer's V.
- Definition Classes
- Operators
-
def
chisqtest(x: Array[Int], prob: Array[Double], constraints: Int = 1): ChiSqTest
One-sample chisq test.
One-sample chisq test. Given the array x containing the observed numbers of events, and an array prob containing the expected probabilities of events, and given the number of constraints (normally one), a small value of p-value indicates a significant difference between the distributions.
- Definition Classes
- Operators
-
def
chisqtest2(x: Array[Int], y: Array[Int], constraints: Int = 1): ChiSqTest
Two-sample chisq test.
Two-sample chisq test. Given the arrays x and y, containing two sets of binned data, and given one constraint, a small value of p-value indicates a significant difference between two distributions.
- Definition Classes
- Operators
-
def
digamma(x: Double): Double
The digamma function is defined as the logarithmic derivative of the gamma function.
The digamma function is defined as the logarithmic derivative of the gamma function.
- Definition Classes
- Operators
-
def
erf(x: Double): Double
The error function (also called the Gauss error function) is a special function of sigmoid shape which occurs in probability, statistics, materials science, and partial differential equations.
The error function (also called the Gauss error function) is a special function of sigmoid shape which occurs in probability, statistics, materials science, and partial differential equations. It is defined as:
erf(x) = ∫0x e-t2dt
The complementary error function, denoted erfc, is defined as erfc(x) = 1 - erf(x). The error function and complementary error function are special cases of the incomplete gamma function.
- Definition Classes
- Operators
-
def
erfc(x: Double): Double
The complementary error function.
The complementary error function.
- Definition Classes
- Operators
-
def
erfcc(x: Double): Double
The complementary error function with fractional error everywhere less than 1.2 × 10-7.
The complementary error function with fractional error everywhere less than 1.2 × 10-7. This concise routine is faster than erfc.
- Definition Classes
- Operators
-
def
ftest(x: Array[Double], y: Array[Double]): FTest
Test if the arrays x and y have significantly different variances.
Test if the arrays x and y have significantly different variances. Small values of p-value indicate that the two arrays have significantly different variances.
- Definition Classes
- Operators
-
def
gamma(x: Double): Double
Gamma function.
Gamma function. Lanczos approximation (6 terms).
- Definition Classes
- Operators
-
def
inverf(p: Double): Double
The inverse error function.
The inverse error function.
- Definition Classes
- Operators
-
def
inverfc(p: Double): Double
The inverse complementary error function.
The inverse complementary error function.
- Definition Classes
- Operators
-
def
kendalltest(x: Array[Double], y: Array[Double]): CorTest
Kendall rank correlation test.
Kendall rank correlation test. The Kendall Tau Rank Correlation Coefficient is used to measure the degree of correspondence between sets of rankings where the measures are not equidistant. It is used with non-parametric data. The p-value is calculated by approximation, which is good for n > 10.
- Definition Classes
- Operators
-
def
kstest(x: Array[Double], y: Array[Double]): KSTest
The two-sample KS test for the null hypothesis that the data sets are drawn from the same distribution.
The two-sample KS test for the null hypothesis that the data sets are drawn from the same distribution. Small values of p-value show that the cumulative distribution function of x is significantly different from that of y. The arrays x and y are modified by being sorted into ascending order.
- Definition Classes
- Operators
-
def
kstest(x: Array[Double], y: Distribution): KSTest
The one-sample KS test for the null hypothesis that the data set x is drawn from the given distribution.
The one-sample KS test for the null hypothesis that the data set x is drawn from the given distribution. Small values of p-value show that the cumulative distribution function of x is significantly different from the given distribution. The array x is modified by being sorted into ascending order.
- Definition Classes
- Operators
-
def
lgamma(x: Double): Double
log of the Gamma function.
log of the Gamma function. Lanczos approximation (6 terms)
- Definition Classes
- Operators
-
def
pearsontest(x: Array[Double], y: Array[Double]): CorTest
Pearson correlation coefficient test.
Pearson correlation coefficient test.
- Definition Classes
- Operators
-
def
spearmantest(x: Array[Double], y: Array[Double]): CorTest
Spearman rank correlation coefficient test.
Spearman rank correlation coefficient test. The Spearman Rank Correlation Coefficient is a form of the Pearson coefficient with the data converted to rankings (ie. when variables are ordinal). It can be used when there is non-parametric data and hence Pearson cannot be used.
The raw scores are converted to ranks and the differences between the ranks of each observation on the two variables are calculated.
The p-value is calculated by approximation, which is good for n > 10.
- Definition Classes
- Operators
-
def
ttest(x: Array[Double], y: Array[Double]): TTest
Given the paired arrays x and y, test if they have significantly different means.
Given the paired arrays x and y, test if they have significantly different means. Small values of p-value indicate that the two arrays have significantly different means.
- Definition Classes
- Operators
-
def
ttest(x: Array[Double], mean: Double): TTest
Independent one-sample t-test whether the mean of a normally distributed population has a value specified in a null hypothesis.
Independent one-sample t-test whether the mean of a normally distributed population has a value specified in a null hypothesis. Small values of p-value indicate that the array has significantly different mean.
- Definition Classes
- Operators
-
def
ttest2(x: Array[Double], y: Array[Double], equalVariance: Boolean = false): TTest
Test if the arrays x and y have significantly different means.
Test if the arrays x and y have significantly different means. Small values of p-value indicate that the two arrays have significantly different means.
- equalVariance
true if the data arrays are assumed to be drawn from populations with the same true variance. Otherwise, The data arrays are allowed to be drawn from populations with unequal variances.
- Definition Classes
- Operators
High level Smile operators in Scala.