Class Statistics
consists of a set of static methods to do elementary statistics
NOTE: Much of stats to do with a normal distribution is in the NormDist CLASS.
Assembly: TowseyLibrary.dll
Syntax
Methods
|
Improve this Doc
View Source
AnalyzeClustersOfHits(Int32[], Int32, Double, Int32, out Double[], out Double, out Double)
Analyzes an array of events or hits, represented by a binary of matrix.
Assumes a Poisson distribution
Returns an array of Z-scores indicating the probability at any time or frame that the number of hits occuring
in the window centered on that point could have occured by chance.
Declaration
public static void AnalyzeClustersOfHits(int[] hits, int window, double thresholdZ, int thresholdCount, out double[] zScores, out double expectedHits, out double sd)
Parameters
|
Improve this Doc
View Source
bayesBoundary(Int32, Double, Double, Int32, Double, Double)
Declaration
public static double[] bayesBoundary(int countC1, double meanC1, double sdC1, int countC2, double meanC2, double sdC2)
Parameters
Returns
|
Improve this Doc
View Source
CreateInverseProbabilityDistribution(Int32)
Declaration
public static double[] CreateInverseProbabilityDistribution(int length)
Parameters
Type |
Name |
Description |
Int32 |
length |
|
Returns
|
Improve this Doc
View Source
CreateQuadraticProbabilityDistribution(Int32)
Declaration
public static double[] CreateQuadraticProbabilityDistribution(int length)
Parameters
Type |
Name |
Description |
Int32 |
length |
|
Returns
|
Improve this Doc
View Source
Declaration
public static double GetMedian(double[] v)
Parameters
Type |
Name |
Description |
Double[] |
v |
|
Returns
|
Improve this Doc
View Source
GetNthPercentileBin(Int32[], Int32)
Declaration
public static int GetNthPercentileBin(int[] distribution, int percentile)
Parameters
Type |
Name |
Description |
Int32[] |
distribution |
|
Int32 |
percentile |
|
Returns
|
Improve this Doc
View Source
GetPercentileValue(Double[], Int32)
NOTE: The sort routine sorts in descending order.
Therefore the percentile value has to be reversed.
Declaration
public static double GetPercentileValue(double[] v, int percentile)
Parameters
Returns
|
Improve this Doc
View Source
quadraticRoots(Double, Double, Double)
Declaration
public static double[] quadraticRoots(double A, double B, double C)
Parameters
Returns
|
Improve this Doc
View Source
RandomSamplingUsingProbabilityDistribution(Int32, Int32, Int32)
Declaration
public static Tuple<int[], int[]> RandomSamplingUsingProbabilityDistribution(int distributionlength, int sampleCount, int seed)
Parameters
Type |
Name |
Description |
Int32 |
distributionlength |
|
Int32 |
sampleCount |
|
Int32 |
seed |
|
Returns
|
Improve this Doc
View Source
TestGetNthPercentileBin()
This method is a test for ensuring correct bin ID is chosen for some degenerate cases.
Declaration
public static void TestGetNthPercentileBin()
|
Improve this Doc
View Source
tStatistic(Double, Double, Int32, Double, Double, Int32)
Declaration
public static double tStatistic(double m1, double sd1, int count1, double m2, double sd2, int count2)
Parameters
Returns
|
Improve this Doc
View Source
tStatisticAlpha(Double, Int32)
Declaration
public static double tStatisticAlpha(double t, int df)
Parameters
Returns
|
Improve this Doc
View Source
tStatisticAndSignificance(Double, Double, Int32, Double, Double, Int32)
Declaration
public static string tStatisticAndSignificance(double m1, double sd1, int count1, double m2, double sd2, int count2)
Parameters
Returns
Extension Methods