Questions tagged [binomial-cdf]

58 questions
0
votes
1 answer

maxima bug in distrib core library using cdf_binomial?

I am pretty new to maxima, which I installed a few days ago via brew on MacOS ARM. ergo, I do not know whether I found a bug, or a feature, or I am doing something stupid altogether. The following example shows the unexpected error I get: $…
ivo Welch
  • 2,427
  • 2
  • 23
  • 31
0
votes
0 answers

calculate power for two sample binomial test

I have two samples of binary data. I'm performing a one tailed hypothesis test if one of the samples success rate is significantly higher than the other's. I'm using statsmodels proportions_ztest. I was wondering how I could calculate the power…
user3476463
  • 3,967
  • 22
  • 57
  • 117
0
votes
0 answers

hypothesis test success rates between two samples with binomial distributions

I'm trying to compare success rates in two samples. I'm treating each sample as a binomial distribution, then trying to compare the success rates with a two tailed hypothesis test. (x1 is the number of successes in sample 1, and n1 is the total…
user3476463
  • 3,967
  • 22
  • 57
  • 117
0
votes
0 answers

binom_test results compared to hypothesis test with normally distributed test statistic

I have two samples with different numbers of trials in each sample, and different number of successes in each sample. I'm trying to compare the success rate between the two samples to see if there is a significant difference. I seem to get very…
user3476463
  • 3,967
  • 22
  • 57
  • 117
0
votes
0 answers

how to calculate binomial probability and its cumulative sum using loop in R dataframe?

For the following data frame, how can we get the binomial probability for number of short plants in every row using a loop? Then loop/add it to the cumulative sum of all the binomial probabilities in the previous rows? (i.e. Im trying to find the…
NSA
  • 29
  • 2
0
votes
1 answer

Difference in binom.cdf and binom_test in python

I am running a binomial test and I cannot understand why these two methods have different results. The probs from the second to the first are different. When we calculate the two-tailed p-value should we just double one of the tails? from…
les2004
  • 105
  • 7
0
votes
1 answer

Binomial distribution using scipy

I have sampled some data from a network G with discrete values of node degrees in a network and calculated the distribution. def degree_distribution(G): vk = dict(G.degree()) vk = list(vk.values()) # we get only the degree values maxk =…
8-Bit Borges
  • 9,643
  • 29
  • 101
  • 198
0
votes
1 answer

What does it mean when there are more than two values in "prob" of the rbinom function in R?

There is an example say that a king presents two daggers in a box which could be golden or silver. I understand the first part is to simulate all three possible results in the box. set.seed(20202020) boxes <- sample(c('GG','SS','GS'), …
0
votes
1 answer

Scipy - probability in binomial distribution

I'm trying to use scipy in order to calculate a probability, given a binomial distribution: The probability: in an exam with 45 questions, each one with 5 items, what is the probability of randomly choose right (instead of wrong) more than half the…
8-Bit Borges
  • 9,643
  • 29
  • 101
  • 198
0
votes
1 answer

Confidence interval from binomial distribution: different results using `qbinom` and `binom.test`

I expect identical results calculating a CI for a proportion using qbinom and binom.test, but they are actually slightly different: success <- 360 n <- 1226 lci <- qbinom(0.025, n, success/n)/n uci <- qbinom(0.975, n, success/n)/n c(lci, uci) [1]…
Claudio
  • 1,229
  • 6
  • 11
0
votes
0 answers

R plotting proportions problem - ggplot making plot that looks like a table

I am trying to make a plot of proportions of a binomial distribution (yes/no) depending on one ordinal and one continuous variable. Somehow when including the continuous one as color of the dots the appearance of the plot radically changes. Can…
Johanna
  • 11
  • 4
0
votes
1 answer

Julia, convert selected elements of an array to a new number with binomial frequency

I'm attempting to independently select elements of an array that meet a condition and then convert those elements to a different value, with a given frequency. In R I'd use rbinom, but can't find the correct function in Julia. MWE: #create array a…
Jim Maas
  • 1,481
  • 2
  • 16
  • 36
0
votes
0 answers

Use of Binomial Theorem in IP address distribution

I am currently making a project on Binomial theorem/Distribution for my semester. I need some very interesting real life applications of these to add in my project(I need to add in depth explanation of that application). I came accross these…
0
votes
0 answers

How to estimate this expectation involving two binomial random variables?

X and Y are two independent binomial random variables where X~ B(K_1, q), Y~ B(K_0, p), (Note: p+q is not necessarily equal to 1). I am wondering how to compute the following expectation (the expectation is taken over random variable X): E[X Pr(Y…
luw
  • 207
  • 3
  • 14
0
votes
1 answer

Sympy Stats: ValueError: not an integer ​

I am trying to manipulate binomial distributions algebraically. Specifically, I would like to get the expected value and standard deviation of a random variable: import sympy import sympy.stats from sympy import * a = sympy.Symbol('a',…
linhares
  • 504
  • 6
  • 17