I have forgotten
my Password

Or login with:

  • Facebookhttp://facebook.com/
  • Googlehttps://www.google.com/accounts/o8/id
  • Yahoohttps://me.yahoo.com
get GPL
COST (GBP)
this unit 0.94
sub units 5.11
+
0

CDF

Evaluates the Angle distribution CDF.
Controller: CodeCogs

get GPL add to cart

Dependents

Info

Interface

C++
Excel
HTML

CDF

 
doubleCDFdoublex
intn )[inline]
This component evaluates the CDF of the Angle distribution with given arguments. x is an angle between 0 and \pi, corresponding to the angle made in an n dimensional space, between a fixed line passing through the origin, and an arbitrary line that also passes through the origin, which is specified by choosing any point on the n dimensional sphere with uniform probability.

The Angle CDF is defined by the following formula

and for all

The following figure illustrates the typical shape of the Angle distribution for a range of n:
\graph  x=0:3.5, n=2:6:5

Example 1

In the given example, the CDF is evaluated using a fixed value for n, equal to 4, while the first argument x takes values from 0 up to 2 with a step equal to 0.2. The maximum number of precision digits, implicitly set to 17, may be changed through the <em> PRECISION </em> define.
#include <codecogs/stats/dists/continuous/angle/cdf.h>
#include <iostream>
#include <iomanip>
 
#define PRECISION 17
 
int main()
{
  std::cout << "The values of the Angle CDF with n = 4 and";
  std::cout << std::endl;
  std::cout << "x = {0, 0.2, 0.4, ..., 1.8, 2} are" << std::endl;
  std::cout << std::endl;
  for (double x = 0; x < 2.1; x += 0.2)
  {
    std::cout << std::setprecision(2);
    std::cout << "x = " << std::setw(3) << x << " : ";
    std::cout << std::setprecision(PRECISION);
    std::cout << Stats::Dists::Continuous::Angle::CDF(x, 4);
    std::cout << std::endl;
  }
  return 0;
}

Output

The values of the Angle CDF with n = 4 and
x = {0, 0.2, 0.4, ..., 1.8, 2} are
 
x =   0 : 0
x = 0.2 : 0.001684123127684655
x = 0.4 : 0.013153186649778228
x = 0.6 : 0.042647304023738355
x = 0.8 : 0.095560829038801032
x =   1 : 0.1735907059637424
x = 1.2 : 0.27446855935925973
x = 1.4 : 0.39231882068278456
x = 1.6 : 0.51858635136931963
x = 1.8 : 0.64338711110041569
x =   2 : 0.75706863044011896

References

John Burkardt's library of statistical C++ routines, http://www.csit.fsu.edu/~burkardt/cpp_src/prob/prob.html

Parameters

xthe argument of the CDF
nthe spatial dimension (must be at least 2)

Returns

the value of the Angle CDF evaluated with the given arguments

Authors

Lucian Bentea (September 2005)
Source Code

Source code is available when you agree to a GP Licence or buy a Commercial Licence.

Not a member, then Register with CodeCogs. Already a Member, then Login.