[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: nchoosek
From: |
Julien Bect |
Subject: |
Re: nchoosek |
Date: |
Mon, 01 Sep 2014 09:07:22 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.0 |
Le 01/09/2014 08:28, Julien Bect a écrit :
Le 01/09/2014 07:51, Daniel J Sebald a écrit :
Julien, you mentioned commonly using nchoosek-like functions for k
outside the range [0 N]. Can you give an example?
Assume for a while that binocdf does not exist.
I meant "binopdf", of course.
Then, you could write a simple replacement as follows :
binopdf = @(k) (nchoosek (n, k) * (p ^ k) * (1 - p) ^ (n - k))
and it is valid for all non-negative k.