2X faster development
The ultimate WinForms UI toolkit to boost your development speed.
Using UtilityFunctions class we can perform Gamma, factorial, Beta and other functions used in statistical distributions formulas. We can perform the following utility analysis in chart,
C#//Perform T Cumulative Distribution : Initializes the T distribution series. series = this.chartControl1.Model.NewSeries("T Distribution",ChartSeriesType.SplineArea); series.Text = series.Name; //Set the degree of freedom. n = 2; //Calculates the Beta function. beta = UtilityFunctions.Beta(0.5, n / 2.0); // Calculate coefficient of T Distribution. coef = Math.Pow(n, -0.5) / beta; // Calculate Data Points for (int x = -120; x <= 120; x++) { doubleX = x / 10.0; y = coef / Math.Pow(1.0 + doubleX * doubleX / n, (n + 1.0) / 2.0); //Add data points to the series. series.Points.Add(doubleX, y); } //Add the series to the chart series collection. this.chartControl1.Series.Add(series); VB'Perform T Cumulative Distribution : Initializes the T distribution series. series = Me.chartControl1.Model.NewSeries("T Distribution",ChartSeriesType.SplineArea) series.Text = series.Name 'Set the degree of freedom. n = 2 'Calculates the Beta function. beta = UtilityFunctions.Beta(0.5, n / 2.0) ' Calculate coefficient of T Distribution. coef = Math.Pow(n, -0.5) / beta ' Calculate Data Points Do doubleX = x / 10.0 y = coef / Math.Pow(1.0 + doubleX * doubleX / n, (n + 1.0) / 2.0) 'Add data points to the series. series.Points.Add(doubleX, y) Loop 'Add the series to the chart series collection. Me.chartControl1.Series.Add(series) This is illustrated in the Chart UG in this topic: |
2X faster development
The ultimate WinForms UI toolkit to boost your development speed.
This page will automatically be redirected to the sign-in page in 10 seconds.