Questions tagged [binomial-theorem]

The binomial theorem describes the algebraic expansion of powers of a polynomial with two terms which is sometimes confused with the binomial formula, binomial expansion, and binomial identity.

The binomial theorem describes the algebraic expansion of powers of a polynomial with two terms which is sometimes confused with the binomial formula, binomial expansion, and binomial identity.

The following links provide more information:

  1. wikipedia
  2. Mathworld
32 questions
19
votes
1 answer

Finding alpha and beta of beta-binomial distribution with scipy.optimize and loglikelihood

A distribution is beta-binomial if p, the probability of success, in a binomial distribution has a beta distribution with shape parameters α > 0 and β > 0. The shape parameters define the probability of success. I want to find the values for α and β…
HJA24
  • 410
  • 2
  • 11
  • 33
3
votes
1 answer

How to return the number of trials (n) in a binomial distribution for a given probability using library function scipy.stats.binom.pmf?

Is it possible to get scipy.stats.binom.pmf(x, n, p) to return the number of trials (n) with the probabaility, number of successes (x), and probability of successes (p) known? Example Problem: How many throws does Alex need to do in order to be 90%…
ABC
  • 55
  • 5
2
votes
2 answers

Binomial Test in SAS and R - Different Results

I need to replicate a binomial test from R to SAS but I'm obtaining different results (or maybe I am misinterpreting the SAS results). In order to explain my problem in an easy way, I will use data from this wikipedia example because it provides the…
Hey Lyla
  • 45
  • 7
2
votes
0 answers

Obtaining correct confidence intervals for Poisson rate ratio test

In R I am having a problem obtaining exact confidence intervals for the rate ratio as calculated by the poisson.test function. This function uses the method in binom.test to calculate the confidence limits between two rates e.g. poisson.test(x =…
Svencken
  • 479
  • 6
  • 14
1
vote
2 answers

Finding character at particular location of String

As a part of a Binomial expansion program, I created a Scanner class (sc) on an entered number + variable, and another (scan)on the first term (a in (a+b)n) Here's my program till now : import java.util.* ; public class binomial_expansion { …
1
vote
3 answers

Mean and Standard Deviation of x>=5 of 10000 data points binomial(10, 1/4)

I have a data range of 10,000 points as per: data = rbinom(10000, size=10, prob=1/4) I need to find the mean and standard deviation of the data values >=5. There are approx 766 values as per: sum(data >=5) sum (or any other approach I can think…
Peppa
  • 13
  • 2
1
vote
0 answers

Binomial Options Pricing Calculation in PowerQuery

Im trying to build an excel sheet that calculates synthetic options prices and greeks for time series data to model intraday options pricing, input is simply intraday price data, say Tick level to 5 minute interval. I found this…
1
vote
1 answer

Vectorized approach for calculating numerator for generalized binomial theorem?

I am trying to program the generalized binomial theorem, where n can be any rational number, using a vectorized approach. Formula attached as image below. The numerator for each term is n, n×(n-1) , n×(n-1)×(n-2) and so on. I have assigned 0.5 to n…
1
vote
4 answers

Binomial distribution to return an Numpy array

Need to Generate a binomial distribution, tested 10 times, given the number of trials(n) and probability(p) of each trial. The output should contain a numpy array with 10 numbers representing the required binomial distribution. Sample…
user10528004
  • 35
  • 1
  • 2
  • 7
1
vote
1 answer

Negative binomial cumulative distribution frequency in Python 3 to find the probability of having less than or equal to x successes

With n number of trials and p probability of successes, I need to find the probability of having less than or equal to x successes I have built a function to find x number of successes. I have tried to use this function with MAP def bin_dist(n, p,…
user14152659
1
vote
2 answers

loop for binom.test() in r

I have a dataset of successes, probabilities, and sample sizes that I am running binomial tests on. Here is a sample of the data (note that the actual dataset has me run >100 binomial tests): km n_1 prey_pred p0_prey_pred
Blundering Ecologist
  • 1,199
  • 2
  • 14
  • 38
1
vote
1 answer

Binomial Distribution with numpy, python and pandas.Sample Input: 0 10 0.5. Sample output: [5 6 5 5 5 6 5 7 8 5]

The output should contain a NumPy array with 10 numbers representing the required binomial distribution. import numpy as np import pandas as pd pd.set_option('display.max_columns', 500) seed=int(input())`enter code…
Sachin Attri
  • 27
  • 1
  • 7
1
vote
1 answer

Binomial Distribution Calculation

I have n servers and I want to know the number of servers I need to make the probability that at least 10 servers are active to be 0.99. The probability that a server fails is equal to 0.01. So what I have so far is that I know I need at least 10…
Gjison Giocf
  • 145
  • 1
  • 11
1
vote
1 answer

2 Binomial Distributions Overlap in R

How would I go about making a graph of two binomial pdfs with different means and have the overlap be filled in with shading or anything for that matter?
William Bernard
  • 359
  • 4
  • 15
0
votes
0 answers

Expanding polonomial expressions in r (Binomial, trinomial, quadronomial, etc) into vectors?

Heyy, I want to strech polynomes into vectors. E.g.: Example 1. (A + B)^2 = A^2 + 2AB + B^2 -> c(A^2, 2AB, C^2) Example 2. (A + B + c)^2 = A^2 + 2AB + B^2 + 2AC + C^2 + 2BC -> c(A^2 + 2AB, B^2, 2AC, C^2, 2BC) Generalised: (A + B + C + ... etc)^n =…
1
2 3