Overload List
| # | Signature | Description |
|---|---|---|
| 1 | void PoissonFit(TVec X, ref Double lambda) | Calculate parameters for Poisson distributed values. |
| 2 | void PoissonFit(TVec X, ref Double lambda, ref Double[] lambdaConfInt, Double Alpha) | Calculate parameters for Poisson distributed values. |
Overload 1: void PoissonFit(TVec X, ref Double lambda)
Calculate parameters for Poisson distributed values.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TVec | source TVec |
| 2 | lambda | Double (ref) | output |
Result: stored in self (calling object)
Overload 2: void PoissonFit(TVec X, ref Double lambda, ref Double[] lambdaConfInt, Double Alpha)
Calculate parameters for Poisson distributed values.
| # | Name | Description |
|---|---|---|
| 1 | X | Stores data which is assumed to be Poisson distributed. |
| 2 | lambda | Returns Poisson distribution parameter estimator. |
| 3 | lambdaConfInt | Lambda (1-Alpha)*100 percent confidence interval. |
| 4 | Alpha | Confidence interval percentage. |
Result: stored in self (calling object)
Examples
using Dew.Math;
using Dew.Stats;
using Dew.Stats.Units;
namespace Dew.Examples;
{
private void Example()
{
Vector vec1 = new Vector(500,false);
// first, generate 500 randomly Poiss. distributed
// numbers with parameter lambda=1.17
StatRandom.RandomPoisson(1.17,vec1,-1);
// Now, extract the lambda and its 95%
// confidence interval
double resLambda;
double[] CILambda = new double[2];
Statistics.PoissonFit(vec1,out resLambda,out CILambda,0.05);
}
}
See Also: StatRandom.RandomPoisson, Probabilities.PoissonStat