Overload List
| # | Signature | Description |
|---|---|---|
| 1 | void BinomFit(TVec X, TVec N, TVec p) | |
| 2 | void BinomFit(TVec X, Double N, TVec p) | Calculate parameters for binomial distributed values. |
| 3 | void BinomFit(TVec X, Double N, TVec p, TVec Low, TVec High, Double Alpha) | Calculate parameters for binomial distributed values. |
| 4 | void BinomFit(TVec X, ref Int32 N, ref Double p) |
Overload 1: void BinomFit(TVec X, TVec N, TVec p)
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TVec | source TVec |
| 2 | N | TVec | source TVec |
| 3 | p | TVec | source TVec |
Result: stored in self (calling object)
Overload 2: void BinomFit(TVec X, Double N, TVec p)
Calculate parameters for binomial distributed values.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TVec | source TVec |
| 2 | N | Double | scalar |
| 3 | p | TVec | source TVec |
Result: stored in self (calling object)
Overload 3: void BinomFit(TVec X, Double N, TVec p, TVec Low, TVec High, Double Alpha)
Calculate parameters for binomial distributed values.
| # | Name | Description |
|---|---|---|
| 1 | X | Stores data which is assumed to be binomial distributed. |
| 2 | N | Defines binomial distribution n parameter. |
| 3 | p | Returns binomial distribution p parameter, estimated at each X value. |
| 4 | Low | |
| 5 | High | p (1-Alpha)*100 percent confidence intervals. Each pair of Low and High values defines lower and upper CI for corresponding p value. |
| 6 | 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(1000, false);
Vector LowInt = new Vector(0);
Vector HighInt = new Vector(0);
Vector p = new Vector(0);
StatRandom.RandomBinom(35, 0.25, vec1, -1);
// Now extract p-s and its 100*(1-Alpha)
// confidence intervals.
Statistics.BinomFit(vec1, 35, p, LowInt, HighInt, 0.05);
// vector p holds the p for each element in vec1,
// vectors LowInt and HighInt hold the lower and upper conf. int. limit
// for each element in p
}
}
See Also: StatRandom.RandomBinom, Probabilities.BinomStat
Overload 4: void BinomFit(TVec X, ref Int32 N, ref Double p)
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TVec | source TVec |
| 2 | N | Int32 (ref) | output |
| 3 | p | Double (ref) | output |
Result: stored in self (calling object)