Введение
Распределение вероятности
В теории вероятностей и статистике биномиальное распределение с параметрами n и p — это дискретное распределение вероятности числа успехов в последовательности из n независимых экспериментов, каждый из которых предполагает вопрос с ответом «да» или «нет», и каждый из которых имеет булевский результат: успех (с вероятностью p) или неудача (с вероятностью 1-p). Отдельный эксперимент с успехом или неудачей также называется испытанием Бернулли или экспериментом Бернулли, а последовательность результатов — процессом Бернулли; для одного испытания, то есть при n = 1, биномиальное распределение является распределением Бернулли. Биномиальное распределение служит основой для популярного биномиального теста статистической значимости. Биномиальное распределение часто используется для моделирования числа успехов в выборке размера n, отобранной с возвращением из генеральной совокупности размера N. Если отбор производится без возвращения, выборки не являются независимыми, и, следовательно, результирующее распределение является гипергеометрическим распределением, а не биномиальным. Однако, если N значительно больше, чем n, биномиальное распределение остаётся хорошим приближением и широко используется.
Функция массы вероятности
В общем случае, если случайная величина X следует биномиальному распределению с параметрами n ∈ и p ∈ [0,1], мы записываем X ~ B(n, p). Вероятность получения ровно k успехов в n независимых испытаниях Бернулли (с одинаковой вероятностью p) задается функцией массы вероятности:
for k = 0, 1, 2, , n, where
is the binomial coefficient, hence the name of the distribution. The formula can be understood as follows: is the probability of obtaining the sequence of Bernoulli trials in which the first trials are “successes“ and the remaining (last) trials result in “failure“. Since the trials are independent with probabilities remaining constant between them, any sequence (permutation) of trials with successes (and failures) has the same probability of being achieved (regardless of positions of successes within the sequence). There are such sequences, since counts the number of permutations (possible sequences) of objects of two types, with being the number of objects of one type (and the number of objects of the other type, with “type“ meaning a collection of identical objects and the two being “success“ and “failure“ here). The binomial distribution is concerned with the probability of obtaining any of these sequences, meaning the probability of obtaining one of them must be added times, hence
In creating reference tables for binomial distribution probability, usually the table is filled in up to n/2 values. This is because for k > n/2, the probability can be calculated by its complement as
Looking at the expression f(k, n, p) as a function of k, there is a k value that maximizes it. This k value can be found by calculating
and comparing it to 1. There is always an integer M that satisfies
f(k, n, p) is monotone increasing for k < M and monotone decreasing for k > M, with the exception of the case where (n + 1)p is an integer. In this case, there are two values for which f is maximal: (n + 1)p and (n + 1)p − 1. M is the most probable outcome (that is, the most likely, although this can still be unlikely overall) of the Bernoulli trials and is called the mode. Equivalently, Taking the floor function, we obtain Except the trivial case of , which must be checked separately.
для k = 0, 1, 2, ..., n, где
for k = 0, 1, 2, , n, where
is the binomial coefficient, hence the name of the distribution. The formula can be understood as follows: is the probability of obtaining the sequence of Bernoulli trials in which the first trials are “successes“ and the remaining (last) trials result in “failure“. Since the trials are independent with probabilities remaining constant between them, any sequence (permutation) of trials with successes (and failures) has the same probability of being achieved (regardless of positions of successes within the sequence). There are such sequences, since counts the number of permutations (possible sequences) of objects of two types, with being the number of objects of one type (and the number of objects of the other type, with “type“ meaning a collection of identical objects and the two being “success“ and “failure“ here). The binomial distribution is concerned with the probability of obtaining any of these sequences, meaning the probability of obtaining one of them must be added times, hence
In creating reference tables for binomial distribution probability, usually the table is filled in up to n/2 values. This is because for k > n/2, the probability can be calculated by its complement as
Looking at the expression f(k, n, p) as a function of k, there is a k value that maximizes it. This k value can be found by calculating
and comparing it to 1. There is always an integer M that satisfies
f(k, n, p) is monotone increasing for k < M and monotone decreasing for k > M, with the exception of the case where (n + 1)p is an integer. In this case, there are two values for which f is maximal: (n + 1)p and (n + 1)p − 1. M is the most probable outcome (that is, the most likely, although this can still be unlikely overall) of the Bernoulli trials and is called the mode. Equivalently, Taking the floor function, we obtain Except the trivial case of , which must be checked separately.
– биномиальный коэффициент, отсюда и название распределения. Формулу можно интерпретировать следующим образом: это вероятность получения последовательности из n испытаний Бернулли, в которой первые k испытаний являются «успехами», а остальные (последние) n-k испытаний – «неудачей». Поскольку испытания независимы и вероятности между ними остаются постоянными, любая последовательность (перестановка) из n испытаний с k успехами (и n-k неудачами) имеет одинаковую вероятность реализации (независимо от расположения успехов в последовательности). Существует таких последовательностей , поскольку определяет количество перестановок (возможных последовательностей) из n объектов двух типов, где k – количество объектов одного типа (и n-k – количество объектов другого типа, при этом под «типом» понимается совокупность идентичных объектов, а в данном случае двумя типами являются «успех» и «неудача»). Биномиальное распределение связано с вероятностью получения любой из этих последовательностей, то есть вероятность получения одной из них необходимо сложить раз, следовательно,
for k = 0, 1, 2, , n, where
is the binomial coefficient, hence the name of the distribution. The formula can be understood as follows: is the probability of obtaining the sequence of Bernoulli trials in which the first trials are “successes“ and the remaining (last) trials result in “failure“. Since the trials are independent with probabilities remaining constant between them, any sequence (permutation) of trials with successes (and failures) has the same probability of being achieved (regardless of positions of successes within the sequence). There are such sequences, since counts the number of permutations (possible sequences) of objects of two types, with being the number of objects of one type (and the number of objects of the other type, with “type“ meaning a collection of identical objects and the two being “success“ and “failure“ here). The binomial distribution is concerned with the probability of obtaining any of these sequences, meaning the probability of obtaining one of them must be added times, hence
In creating reference tables for binomial distribution probability, usually the table is filled in up to n/2 values. This is because for k > n/2, the probability can be calculated by its complement as
Looking at the expression f(k, n, p) as a function of k, there is a k value that maximizes it. This k value can be found by calculating
and comparing it to 1. There is always an integer M that satisfies
f(k, n, p) is monotone increasing for k < M and monotone decreasing for k > M, with the exception of the case where (n + 1)p is an integer. In this case, there are two values for which f is maximal: (n + 1)p and (n + 1)p − 1. M is the most probable outcome (that is, the most likely, although this can still be unlikely overall) of the Bernoulli trials and is called the mode. Equivalently, Taking the floor function, we obtain Except the trivial case of , which must be checked separately.
при создании справочных таблиц для вероятностей биномиального распределения обычно таблица заполняется до значений n/2. Это связано с тем, что для k > n/2 вероятность можно вычислить по формуле дополнения:
for k = 0, 1, 2, , n, where
is the binomial coefficient, hence the name of the distribution. The formula can be understood as follows: is the probability of obtaining the sequence of Bernoulli trials in which the first trials are “successes“ and the remaining (last) trials result in “failure“. Since the trials are independent with probabilities remaining constant between them, any sequence (permutation) of trials with successes (and failures) has the same probability of being achieved (regardless of positions of successes within the sequence). There are such sequences, since counts the number of permutations (possible sequences) of objects of two types, with being the number of objects of one type (and the number of objects of the other type, with “type“ meaning a collection of identical objects and the two being “success“ and “failure“ here). The binomial distribution is concerned with the probability of obtaining any of these sequences, meaning the probability of obtaining one of them must be added times, hence
In creating reference tables for binomial distribution probability, usually the table is filled in up to n/2 values. This is because for k > n/2, the probability can be calculated by its complement as
Looking at the expression f(k, n, p) as a function of k, there is a k value that maximizes it. This k value can be found by calculating
and comparing it to 1. There is always an integer M that satisfies
f(k, n, p) is monotone increasing for k < M and monotone decreasing for k > M, with the exception of the case where (n + 1)p is an integer. In this case, there are two values for which f is maximal: (n + 1)p and (n + 1)p − 1. M is the most probable outcome (that is, the most likely, although this can still be unlikely overall) of the Bernoulli trials and is called the mode. Equivalently, Taking the floor function, we obtain Except the trivial case of , which must be checked separately.
Рассматривая выражение f(k, n, p) как функцию от k, можно найти значение k, которое максимизирует ее. Это значение k можно определить, вычислив
for k = 0, 1, 2, , n, where
is the binomial coefficient, hence the name of the distribution. The formula can be understood as follows: is the probability of obtaining the sequence of Bernoulli trials in which the first trials are “successes“ and the remaining (last) trials result in “failure“. Since the trials are independent with probabilities remaining constant between them, any sequence (permutation) of trials with successes (and failures) has the same probability of being achieved (regardless of positions of successes within the sequence). There are such sequences, since counts the number of permutations (possible sequences) of objects of two types, with being the number of objects of one type (and the number of objects of the other type, with “type“ meaning a collection of identical objects and the two being “success“ and “failure“ here). The binomial distribution is concerned with the probability of obtaining any of these sequences, meaning the probability of obtaining one of them must be added times, hence
In creating reference tables for binomial distribution probability, usually the table is filled in up to n/2 values. This is because for k > n/2, the probability can be calculated by its complement as
Looking at the expression f(k, n, p) as a function of k, there is a k value that maximizes it. This k value can be found by calculating
and comparing it to 1. There is always an integer M that satisfies
f(k, n, p) is monotone increasing for k < M and monotone decreasing for k > M, with the exception of the case where (n + 1)p is an integer. In this case, there are two values for which f is maximal: (n + 1)p and (n + 1)p − 1. M is the most probable outcome (that is, the most likely, although this can still be unlikely overall) of the Bernoulli trials and is called the mode. Equivalently, Taking the floor function, we obtain Except the trivial case of , which must be checked separately.
и сравнив его с 1. Всегда существует целое число M, удовлетворяющее условию
for k = 0, 1, 2, , n, where
is the binomial coefficient, hence the name of the distribution. The formula can be understood as follows: is the probability of obtaining the sequence of Bernoulli trials in which the first trials are “successes“ and the remaining (last) trials result in “failure“. Since the trials are independent with probabilities remaining constant between them, any sequence (permutation) of trials with successes (and failures) has the same probability of being achieved (regardless of positions of successes within the sequence). There are such sequences, since counts the number of permutations (possible sequences) of objects of two types, with being the number of objects of one type (and the number of objects of the other type, with “type“ meaning a collection of identical objects and the two being “success“ and “failure“ here). The binomial distribution is concerned with the probability of obtaining any of these sequences, meaning the probability of obtaining one of them must be added times, hence
In creating reference tables for binomial distribution probability, usually the table is filled in up to n/2 values. This is because for k > n/2, the probability can be calculated by its complement as
Looking at the expression f(k, n, p) as a function of k, there is a k value that maximizes it. This k value can be found by calculating
and comparing it to 1. There is always an integer M that satisfies
f(k, n, p) is monotone increasing for k < M and monotone decreasing for k > M, with the exception of the case where (n + 1)p is an integer. In this case, there are two values for which f is maximal: (n + 1)p and (n + 1)p − 1. M is the most probable outcome (that is, the most likely, although this can still be unlikely overall) of the Bernoulli trials and is called the mode. Equivalently, Taking the floor function, we obtain Except the trivial case of , which must be checked separately.
f(k, n, p) монотонно возрастает при k < M и монотонно убывает при k > M, за исключением случая, когда (n + 1)p является целым числом. В этом случае существует два значения, при которых f достигает максимума: (n + 1)p и (n + 1)p − 1. M – наиболее вероятный исход (то есть наиболее ожидаемый, хотя он все равно может быть маловероятным в целом) испытаний Бернулли и называется модой. Эквивалентно, применяя функцию взятия целой части (floor), получаем
for k = 0, 1, 2, , n, where
is the binomial coefficient, hence the name of the distribution. The formula can be understood as follows: is the probability of obtaining the sequence of Bernoulli trials in which the first trials are “successes“ and the remaining (last) trials result in “failure“. Since the trials are independent with probabilities remaining constant between them, any sequence (permutation) of trials with successes (and failures) has the same probability of being achieved (regardless of positions of successes within the sequence). There are such sequences, since counts the number of permutations (possible sequences) of objects of two types, with being the number of objects of one type (and the number of objects of the other type, with “type“ meaning a collection of identical objects and the two being “success“ and “failure“ here). The binomial distribution is concerned with the probability of obtaining any of these sequences, meaning the probability of obtaining one of them must be added times, hence
In creating reference tables for binomial distribution probability, usually the table is filled in up to n/2 values. This is because for k > n/2, the probability can be calculated by its complement as
Looking at the expression f(k, n, p) as a function of k, there is a k value that maximizes it. This k value can be found by calculating
and comparing it to 1. There is always an integer M that satisfies
f(k, n, p) is monotone increasing for k < M and monotone decreasing for k > M, with the exception of the case where (n + 1)p is an integer. In this case, there are two values for which f is maximal: (n + 1)p and (n + 1)p − 1. M is the most probable outcome (that is, the most likely, although this can still be unlikely overall) of the Bernoulli trials and is called the mode. Equivalently, Taking the floor function, we obtain Except the trivial case of , which must be checked separately.
за исключением тривиального случая , который необходимо проверять отдельно.
for k = 0, 1, 2, , n, where
is the binomial coefficient, hence the name of the distribution. The formula can be understood as follows: is the probability of obtaining the sequence of Bernoulli trials in which the first trials are “successes“ and the remaining (last) trials result in “failure“. Since the trials are independent with probabilities remaining constant between them, any sequence (permutation) of trials with successes (and failures) has the same probability of being achieved (regardless of positions of successes within the sequence). There are such sequences, since counts the number of permutations (possible sequences) of objects of two types, with being the number of objects of one type (and the number of objects of the other type, with “type“ meaning a collection of identical objects and the two being “success“ and “failure“ here). The binomial distribution is concerned with the probability of obtaining any of these sequences, meaning the probability of obtaining one of them must be added times, hence
In creating reference tables for binomial distribution probability, usually the table is filled in up to n/2 values. This is because for k > n/2, the probability can be calculated by its complement as
Looking at the expression f(k, n, p) as a function of k, there is a k value that maximizes it. This k value can be found by calculating
and comparing it to 1. There is always an integer M that satisfies
f(k, n, p) is monotone increasing for k < M and monotone decreasing for k > M, with the exception of the case where (n + 1)p is an integer. In this case, there are two values for which f is maximal: (n + 1)p and (n + 1)p − 1. M is the most probable outcome (that is, the most likely, although this can still be unlikely overall) of the Bernoulli trials and is called the mode. Equivalently, Taking the floor function, we obtain Except the trivial case of , which must be checked separately.
Пример
Предположим, что при броске смещенной монеты вероятность выпадения орла равна 0,3. Вероятность увидеть ровно 4 орла в 6 бросках равна
Медиана
В общем, не существует единой формулы для нахождения медианы биномиального распределения, и она может быть даже не единственной. Однако, было установлено несколько частных случаев: Если *n* – целое число, то среднее значение, медиана и мода совпадают и равны *n*. Любая медиана *m* должна лежать в интервале [*0, n*]. Медиана *m* не может сильно отличаться от среднего значения: . Медиана единственна и равна *m* = round(*np*) когда *np* ≥ 1 (за исключением случая, когда *np* = 1 и *n* нечетно). Когда *np* = 1 и *n* нечетно, любое число *m* в интервале [*np*, *np* + 1] является медианой биномиального распределения. Если *np* = 1 и *n* четно, то *np* является единственной медианой.
If is an integer, then the mean, median, and mode coincide and equal Any median m must lie within the interval A median m cannot lie too far away from the mean: The median is unique and equal to m = round(np) when (except for the case when and n is odd). When and n is odd, any number m in the interval is a median of the binomial distribution. If and n is even, then is the unique median.
Метод Вальда
Можно добавить поправку на непрерывность, равную 0,5/n.
Биномиальное распределение Пуассона
Биномиальное распределение является частным случаем распределения Пуассона-биномиального типа, которое описывает распределение суммы n независимых, но не одинаковых испытаний Бернулли с вероятностью успеха pi.
Соотношение двух биномиальных распределений
Этот результат был впервые получен Кацем и соавторами в 1978 году. Пусть X ~ B(n, p1) и Y ~ B(m, p2) независимы. Пусть T = (X/n) / (Y/m). Тогда log(T) приблизительно нормально распределен со средним log(p1/p2) и дисперсией ((1/p1) − 1)/n + ((1/p2) − 1)/m.
Распределение Бернулли
Распределение Бернулли является частным случаем биномиального распределения, при n = 1. Символически, X ~ B(1, p) означает то же самое, что и X ~ Bernoulli(p). Обратно, любое биномиальное распределение B(n, p) является распределением суммы n независимых испытаний Бернулли с вероятностью p, каждое из которых имеет одинаковую вероятность p.
Приближение Пуассона
Биномиальное распределение стремится к распределению Пуассона при стремлении числа испытаний к бесконечности, при этом произведение np стремится к конечному пределу. Следовательно, распределение Пуассона с параметром λ = np можно использовать в качестве приближения к биномиальному распределению B(n, p), если n достаточно велико, а p достаточно мало. Согласно эмпирическим правилам, такое приближение хорошо, если n ≥ 20 и p ≤ 0,05, при этом np ≤ 1, или если n > 50 и p < 0,1, при этом np < 5, или если n ≥ 100 и np ≤ 10. Подробности о точности приближения Пуассона см. в работе Новак, глава 4, и ссылках в ней.
Ограничение распределения
Теорема Пуассона о предельном переходе: при стремлении n к бесконечности и p к нулю, при этом произведение np остаётся постоянным, биномиальное распределение (n, p) стремится к распределению Пуассона с математическим ожиданием λ = np. При использовании равномерного априорного распределения, апостериорное распределение вероятности успеха p, полученное на основе n независимых событий с k наблюдаемыми успехами, является бета-распределением.
Генерация случайных чисел
Методы генерации случайных чисел, для которых предельное распределение является биномиальным, хорошо разработаны. Один из способов генерации случайных выборок из биномиального распределения — использование алгоритма инверсии. Для этого необходимо вычислить вероятность Pr(X = k) для всех значений k от 0 до n. (Сумма этих вероятностей должна быть близка к единице, чтобы охватить все пространство возможных значений.) Затем, используя генератор псевдослучайных чисел для получения равномерно распределенных случайных чисел между 0 и 1, можно преобразовать полученные значения в дискретные числа, используя вероятности, вычисленные на первом шаге.
История
Это распределение было выведено Якобом Бернулли. Он рассмотрел случай, когда p = r/(r + s), где p — вероятность успеха, а r и s — положительные целые числа. Блез Паскаль ранее рассматривал случай, когда p = 1/2, и составил таблицу соответствующих биномиальных коэффициентов, которая теперь известна как треугольник Паскаля.