Overload List
| # | Signature | Description |
|---|---|---|
| 1 | void BetaFit(TVec X, ref Double A, ref Double B, ref Double[] PCIA, ref Double[] PCIB, Int32 MaxIter, Double Tolerance, Double Alpha) | Calculate parameters for Beta distributed values. |
| 2 | void BetaFit(TVec X, ref Double A, ref Double B, Int32 MaxIter, Double Tolerance) | Calculate parameters for Beta distributed values using MLE. |
Overload 1: void BetaFit(TVec X, ref Double A, ref Double B, ref Double[] PCIA, ref Double[] PCIB, Int32 MaxIter, Double Tolerance, Double Alpha)
Calculate parameters for Beta distributed values.
| # | Name | Description |
|---|---|---|
| 1 | X | Stores data which is assumed to be Beta distributed. |
| 2 | A | Return Beta distribution parameter estimator a. |
| 3 | B | Return Beta distribution parameter estimator b. |
| 4 | MaxIter | Maximum number of iterations needed for deriving a and b. |
| 5 | Tolerance | Defines the acceptable tolerance for calculating a and b. |
| 6 | PCIA | a (1-Alpha)*100 percent confidence interval. |
| 7 | PCIB | b (1-Alpha)*100 percent confidence interval. |
| 8 | 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 v = new Vector(1000, false);
// first, generate 1000 randomly beta distributed
// numbers with parameters a = 3 and b = 2
Random rnd = new Random();
StatRandom.RandomBeta(3.0, 2.0, v, rnd.Next());
double esta, estb;
double[] cia = new double[2];
double[] cib = new double[2];
// Now extract the a,b and their 95% confidence intervals.
//Use at max 300 iterations and tolerance 0.001
Statistics.BetaFit(v, out esta, out estb, ref cia, ref cib, 300, 1.0e-3, 0.05);
See Also: StatRandom.RandomBeta, Probabilities.BetaStat
Overload 2: void BetaFit(TVec X, ref Double A, ref Double B, Int32 MaxIter, Double Tolerance)
Calculate parameters for Beta distributed values using MLE.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TVec | source TVec |
| 2 | A | Double (ref) | output |
| 3 | B | Double (ref) | output |
| 4 | MaxIter | Int32 | |
| 5 | Tolerance | Double | scalar |
Result: stored in self (calling object)