FUNCTION
variance
Evaluates the variance of the Arcsin distribution PDF.
Interface
#include <codecogs/statistics/distributions/continuous/arcsin/variance.h>
using namespace Statistics::Distributions::Continuous::Arcsin;
This function evaluates the variance of the Arcsin distribution PDF with given argument, defined by
$$\sigma^2 = \frac{a^2}{2} \quad (\forall) a > 0$$
(1)
In the example that follows, the variance is evaluated using values of the parameter from 0.1 up to 0.8 with a step equal to 0.1. The maximum number of precision digits, implicitly set to 17, may be changed through the <em> PRECISION </em> define.
Example 1
#include <codecogs/statistics/distributions/continuous/arcsin/variance.h>
#include <iostream>
#include <iomanip>
#define PRECISION 17
int main()
{
std::cout << "The variance of the Arcsin distribution PDF with";
std::cout << std::endl;
std::cout << "a = {0.1, 0.2, ... , 0.7, 0.8} is" << std::endl;
std::cout << std::endl;
for (double a = 0.1; a < 0.81; a += 0.1)
{
std::cout << std::setprecision(1);
std::cout << "a = " << std::setw(3) << a << " : ";
std::cout << std::setprecision(PRECISION);
std::cout << Statistics::Distributions::Continuous::Arcsin::variance(a);
std::cout << std::endl;
}
return 0;
}Output
The variance of the Arcsin distribution PDF with
a = {0.1, 0.2, ... , 0.7, 0.8} is
a = 0.1 : 0.005000000000000001
a = 0.2 : 0.020000000000000004
a = 0.3 : 0.045000000000000012
a = 0.4 : 0.080000000000000016
a = 0.5 : 0.125
a = 0.6 : 0.17999999999999999
a = 0.7 : 0.24499999999999997
a = 0.8 : 0.31999999999999995Parameters
a
the parameter of the PDF (must be stricly positive)
Returns
the variance of the Arcsin distribution PDF
References
John Burkardt's library of statistical C++ routines, http://www.csit.fsu.edu/~burkardt/cpp_src/prob/prob.html
Interactive Calculator
a
Result
Computing…
Set a range above first to export a graph.
This function's source code is only visible to registered users — documentation and the calculator above are free to use either way. Sign in to see it.