A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://TheAlgorithms.github.io/C-Plus-Plus/d6/db0/binomial__dist_8cpp_source.html below:

TheAlgorithms/C++: probability/binomial_dist.cpp Source File

Go to the documentation of this file. 47double nCr

(

double

n,

double

r) {

49 double

denominator = r;

51 for

(

int

i = n - 1; i >= ((n - r) + 1); i--) {

55 for

(

int

i = 1; i < r; i++) {

59 return

numerator / denominator;

66 return nCr

(n, x) * std::pow(p, x) * std::pow(1 - p, n - x);

77 for

(

int

i = lower_bound; i <= upper_bound; i++) {

78 probability

+=

nCr

(n, i) * std::pow(p, i) * std::pow(1 - p, n - i);

90

std::cout <<

"standard deviation : " 96

std::cout <<

"45 or more successes : "

double binomial_x_successes(double n, double p, double x)

double binomial_expected(double n, double p)

double binomial_range_successes(double n, double p, double lower_bound, double upper_bound)

double nCr(double n, double r)

double binomial_variance(double n, double p)

double binomial_standard_deviation(double n, double p)


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4