similar to: test deviation from a binomial distribution - lack of 50:50

Displaying 20 results from an estimated 10000 matches similar to: "test deviation from a binomial distribution - lack of 50:50"

2008 Sep 26
0
Confidence interval for binomial variance
Based on simulations, I've come up with a simple function to compute the confidence interval for the variance of the binomial variance, where the true variance is v = rho*(1-rho)/n where rho = true probability of success and n = # of trials. For x = # successes observed in n trials, p = x / n as usual. For p < 0.25 or p > 0.75, I use the proportion-based transformed confidence
2010 Apr 16
2
Weights in binomial glm
I have some questions about the use of weights in binomial glm as I am not getting the results I would expect. In my case the weights I have can be seen as 'replicate weights'; one respondent i in my dataset corresponds to w[i] persons in the population. From the documentation of the glm method, I understand that the weights can indeed be used for this: "For a binomial GLM prior
2010 Jun 23
1
Generation of binomial numbers using a loop
Dea'R' helpers I have following data - prob = c(0.1, 0.2, 0.3, 0.4, 0.5) frequency = c(100, 75, 45, 30, 25) no_trials = c(10, 8, 6, 4, 2) freq1 = rbinom(frequency[1], no_trials[1], prob[1]) freq2 = rbinom(frequency[2], no_trials[2], prob[2]) freq3 = rbinom(frequency[3], no_trials[3], prob[3]) freq4 = rbinom(frequency[4], no_trials[4], prob[4]) freq5 = rbinom(frequency[5],
2010 Mar 13
1
What can I use instead of ks.test for the binomial distribution ?
Hello all, A friend just showed me how ks.test fails to work with pbinom for small "size". Example: x<-rbinom(10000,10,0.5) x2<-rbinom(10000,10,0.5) ks.test(x,pbinom,10,0.5) ks.test(x,pbinom,size = 10, prob= 0.5) ks.test(x,x2) The tests gives significant p values, while the x did come from binom with size = 10 prob = 0.5. What test should I use instead ? Thanks, Tal
2012 Aug 27
3
How to generate a matrix of Beta or Binomial distribution
Hi folks, I have a question about how to efficiently produce random numbers from Beta and Binomial distributions. For Beta distribution, suppose we have two shape vectors shape1 and shape2. I hope to generate a 10000 x 2 matrix X whose i th rwo is a sample from reta(2,shape1[i]mshape2[i]). Of course this can be done via loops: for(i in 1:10000) { X[i,]=rbeta(2,shape1[i],shape2[i]) } However,
2003 Dec 11
1
Binomial distribution & Catherine Loader's paper
Hi, I've been trying, without success to find a copy of the paper, by Catherine Loader, that describes the algorithn underlying the rbinom() and associated functions. The title is "Fast and Accurate Computation of Binomial Probabilities." All of the links to the paper that I've seen (including in the R docs) lead nowhere (i.e. are 404). I've sent Dr. Loader several emails,
2004 Apr 30
1
Exact Binomial test feature or bug?
Dear R Users, Is the p-value reported in a two-tailed binomial exact test in error or is it a feature? If it is a feature, could someone provide a reference for its two-tailed p-value computations? Using Blaker's (2000 - Canad. J. Statist 28: 783-798) approach,the p-value is the minimum of the two-tailed probabilities $P \left(Y\geq y_{obs}\right)$ and $P\left(Y\leq y_{obs}\right)$
2005 Dec 19
1
How to draw partial grid in plot for spatial-binomial experiment?
DeaR comRades: I have a 2D spatial binomial process as shown in the data and code below. I am plotting the number of trials and the number of successes in the spatial binomial experiments and would like to draw the spatial cells were the trials and successes were counted, i.e. a partial grid in the plot only for those cells where there is a number. The cells are 2x2 km cells. The count of Trials
2011 Sep 27
1
binomial logistic regression question
Dear subscribers, I am looking for a function which would allow me to model the dependent variable as the number of successes in a series of Bernoulli trials. My data looks like this ID TRIALS SUCCESSESS INDEP1 INDEP2 INDEP3 1 4444 0 0.273 0.055 0.156 2 98170 74 0.123 0.456 0.789 3 145486 30 0.124
2010 Sep 23
2
Error: attempt to apply non-function
This code worked fine for me, then did some cleaning up of formatting using ESS (Emacs) and now I get this error, no idea what is causing it, all the brackets/parentheses seem to be balanced. What have I done wrong? Thanks Jim p0.trial01 <- 0.25 TruOR01 <- 0.80 num.patients.01 <- 50 num.trials.01 <- 5 LOR01.het.in <- 0.00 num.sims <- 1 simLOR01 <-
2012 Jan 30
1
mgcv bam() with grouped binomial data
Hello, I'm trying to use the bam() function in the R mgcv package for a large set of grouped binary data. However, I have found that this function does not take data in the format of cbind(numerator, denominator) on the left hand side of the formula. As an example, consider the following dat1 <- data.frame(id=rep(1:6, each=3), num=rbinom(18, size=10, prob=0.8), den=rbinom(18, size=5,
2008 May 28
5
"rbinom" not using probability of success right
I am trying to simulate a series of ones and zeros (1 or 0) and I am using "rbinom" but realizing that the number of successes expected is not accurate. Any advice out there. This is the example: N<-500 status<-rbinom(N, 1, prob = 0.15) count<-sum(status) 15 percent of 500 should be 75 but what I obtain from the "count" variable is 77 that gives the probability of
2011 Jan 27
1
binomial dist: obtaining probability of success on each trial
I'm trying to fathom how to answer two example problems (3.3.2 & 3.3.3) in: Krishnamoorthy. 2006. "handbook of statistical distributions with applications" The first requires calculating single trial probability of success for a binomial distribution when we know: trial size=20, successes k=4, P(x<=k)=0.7 Appreciably all the binomial functions are requiring "prob",
2009 Apr 17
5
Binomial simulation
Hi Guy's I was wondering if someone could point me in the right direction. dbinom(10,1,0.25) I am using dbinom(10,1,0.25) to calculate the probabilty of 10 judges choosing a certain brand x times. I was wondering how I would go about simulating 1000 trials of each x value ? regards Brendan -- View this message in context:
2002 Jul 06
1
R: one-sample binomial test
try ?power.prop.test > -----Messaggio originale----- > Da: Tim Wilson [mailto:wilson at visi.com] > Inviato: sabato 6 luglio 2002 6.05 > A: R-help > Oggetto: [R] one-sample binomial test > > > Hi everyone, > > Here's how I solved a problem for my stats class. I'm pretty sure I > understand what's going on, but I wonder if there's a more >
2012 Aug 01
2
sub setting a data frame with binomial responses
Hi everyone, Let me have a dataframe named ?mydata? and created as below, *> n=c(5,5,5,5) #number of trils > x1=c(2,3,1,3) ) #number of successes > x2=c(5,5,5,5) #number of successes > x3=c(0,0,0,0) #number of successes > x4=c(5,0,5,0) #number of successes > mydata=data.frame(n,x1,x2,x3,x4) > mydata* n x1 x2 x3 x4 1 5 2 5 0 5 2 5 3 5 0 0 3 5 1 5 0 5 4 5 3 5 0
2007 Oct 24
2
analytical solution to Sum of binominal distributed random numbers?
Frede Aakmann T?gersen wrote: > Perhaps > > http://stinet.dtic.mil/cgi-bin/GetTRDoc?AD=ADA266969&Location=U2&doc=GetTRDoc.pdf > > is something that you can use? Thanks a lot - that might help. Rainer > > > > Best regards > > Frede Aakmann T?gersen > Scientist > > > UNIVERSITY OF AARHUS > Faculty of Agricultural Sciences > Dept.
2006 Jun 27
2
Random numbers negatively correlated?
Dear list, I did simulations in which I generated 10000 independent Bernoulli(0.5)-sequences of length 100. I estimated p for each sequence and I also estimated the conditional probability that a one is followed by another one (which should be p as well). However, the second probability is significantly smaller than 0.5 (namely about 0.494, see below) and of course smaller than the direct
2007 Aug 08
1
simulation-binomial
hello, i want to do a binomial simulation, by taking 200 var. from one group (x) and 300 from another (y). the prob. for disease=.6 in both groups. x <- rbinom(200, 1, .6) y <- rbinom(300, 1, .6) if the person is from group x - the probability to find the disease, assuming the person is sick, is .95, if he is from group Y its .80. i want to know the joint probability: p(the person has the
2012 May 31
1
inverse binomial in R
Hello! I'm having some trouble  trying to replicate in R a Stata function  invbinomial(n,k,p)        Domain n:     1 to 1e+17        Domain k:     0 to n - 1        Domain p:     0 to 1 (exclusive)        Range:        0 to 1        Description:  returns the inverse of the cumulative binomial; i.e., it                          returns the probability of success on one trial such