btdtr.c 997 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /* btdtr.c
  2. *
  3. * Beta distribution
  4. *
  5. *
  6. *
  7. * SYNOPSIS:
  8. *
  9. * double a, b, x, y, btdtr();
  10. *
  11. * y = btdtr( a, b, x );
  12. *
  13. *
  14. *
  15. * DESCRIPTION:
  16. *
  17. * Returns the area from zero to x under the beta density
  18. * function:
  19. *
  20. *
  21. * x
  22. * - -
  23. * | (a+b) | | a-1 b-1
  24. * P(x) = ---------- | t (1-t) dt
  25. * - - | |
  26. * | (a) | (b) -
  27. * 0
  28. *
  29. *
  30. * This function is identical to the incomplete beta
  31. * integral function incbet(a, b, x).
  32. *
  33. * The complemented function is
  34. *
  35. * 1 - P(1-x) = incbet( b, a, x );
  36. *
  37. *
  38. * ACCURACY:
  39. *
  40. * See incbet.c.
  41. *
  42. */
  43. /* btdtr() */
  44. /*
  45. Cephes Math Library Release 2.8: June, 2000
  46. Copyright 1984, 1987, 1995, 2000 by Stephen L. Moshier
  47. */
  48. #include "mconf.h"
  49. #ifdef ANSIPROT
  50. extern double incbet(double, double, double);
  51. #else
  52. double incbet();
  53. #endif
  54. double btdtr(a, b, x) double a, b, x;
  55. { return (incbet(a, b, x)); }