Dear all, I am still learning R with write a small function for my self. I was wondering if someone can help me to write a R function formula below: Z_k (x) = \sum_{i=0}^{i=k} \binom{n}{i} (m-1)^i Thanks a million in advance, Sincerely, Jan Sabee [[alternative HTML version deleted]]
Jan Sabee wrote:> Dear all, > I am still learning R with write a small function for my self. > I was wondering if someone can help me to write a R function formula below: > Z_k (x) = \sum_{i=0}^{i=k} \binom{n}{i} (m-1)^i > Thanks a million in advance, > > Sincerely, > Jan Sabee >(This smells like a homework problem.) What is "m"? Your Z_k is a function of "x" and there is no "x" on the RHS. Are you trying to re-write "pbinom"? --sundar