Changes

Line 16: Line 16:  
*<math>x</math> is called a Negative Binomial Random variable because, in contrast to the  
 
*<math>x</math> is called a Negative Binomial Random variable because, in contrast to the  
 
binomial random variable, the number of successes is fixed and the number of trials is random.
 
binomial random variable, the number of successes is fixed and the number of trials is random.
*Then probability mass function of the negative binomial distribution is:
+
*Then probability mass function of the negative binomial distribution is:
 
nb(x;r,p)=(x+r-1 p^r (1-p)^x  r-1)         
 
nb(x;r,p)=(x+r-1 p^r (1-p)^x  r-1)         
 
*For example: If a fair coin is tossed repeatedly, what is the probability that at least 10 tosses are required.
 
*For example: If a fair coin is tossed repeatedly, what is the probability that at least 10 tosses are required.
 
to obtain heads 8 times
 
to obtain heads 8 times
 
*This function will give the result as error when:
 
*This function will give the result as error when:
#Any argument is nonnumeric
+
#Any argument is non-numeric
#If ps<0 or ps>1
+
#If <math>ps<0</math> or <math>ps>1</math>
#If nf<0 or ns<1
+
#If <math>nf<0</math> or <math>ns<1</math>
    
==Examples==
 
==Examples==
writer
5,435

edits