s-news
[Top] [All Lists]

coefficients for a low pass binomial filter

To: <s-news@lists.biostat.wustl.edu>
Subject: coefficients for a low pass binomial filter
From: Stefano Sofia <stefano.sofia@usa.net>
Date: Thu, 31 Jul 2003 14:05:32 +0100
Dear Splus users,
given the integer k, I need to calculate the coefficients that come from the
expansion of (a+b)^(k)

Examples:
for k=2
a^(2) + 2ab + b^(2)
gives as coefficients 
1, 2, 1

for k=4
a^(4) + 4a^(3)b + 6a^(2)b^(2) + 4ab^(3) + b^(4)
gives as coefficients 
1, 4, 6, 4, 1


Which is the easiest way?  Is there any predefined command for that? (I am
using Splus4)

Thank you 
Stefano



<Prev in Thread] Current Thread [Next in Thread>