From user-return-27274-apmail-commons-user-archive=commons.apache.org@commons.apache.org Fri Mar 30 23:31:58 2012 Return-Path: X-Original-To: apmail-commons-user-archive@www.apache.org Delivered-To: apmail-commons-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8903C9BA4 for ; Fri, 30 Mar 2012 23:31:58 +0000 (UTC) Received: (qmail 16126 invoked by uid 500); 30 Mar 2012 23:31:57 -0000 Delivered-To: apmail-commons-user-archive@commons.apache.org Received: (qmail 15992 invoked by uid 500); 30 Mar 2012 23:31:57 -0000 Mailing-List: contact user-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Users List" Delivered-To: mailing list user@commons.apache.org Received: (qmail 15984 invoked by uid 99); 30 Mar 2012 23:31:57 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 Mar 2012 23:31:57 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of sujit.pal@comcast.net designates 76.96.30.17 as permitted sender) Received: from [76.96.30.17] (HELO qmta10.emeryville.ca.mail.comcast.net) (76.96.30.17) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 Mar 2012 23:31:47 +0000 Received: from omta09.emeryville.ca.mail.comcast.net ([76.96.30.20]) by qmta10.emeryville.ca.mail.comcast.net with comcast id rzTo1i0070S2fkCAAzXRKl; Fri, 30 Mar 2012 23:31:25 +0000 Received: from cyclone.healthline.com ([208.106.108.2]) by omta09.emeryville.ca.mail.comcast.net with comcast id rzXH1i008038EM48VzXKzL; Fri, 30 Mar 2012 23:31:23 +0000 Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Apple Message framework v1084) Subject: Re: [math] Getting second derivative for discrete dataset From: SUJIT PAL In-Reply-To: <9d863c76-1904-424d-8ad6-c408d39b2f2d@email.android.com> Date: Fri, 30 Mar 2012 16:31:17 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: References: <4C5A6E50-B943-4779-86B7-249128F87946@comcast.net> <9d863c76-1904-424d-8ad6-c408d39b2f2d@email.android.com> To: "Commons Users List" X-Mailer: Apple Mail (2.1084) Thanks Luc, thanks for getting back so quickly, and will wait for your = information tomorrow. -sujit On Mar 30, 2012, at 2:36 PM, Luc Maisonobe wrote: >=20 >=20 >=20 > SUJIT PAL a =E9crit : >=20 >> Hi, >>=20 >> I have a (newbie) question about how to go about solving the problem >> below with commons-math. >>=20 >> 1) I have histogram data (equal x intervals) based off some >> distribution. >> 2) I need a way to calculate the second differential between two = given >> x points in the distribution. >>=20 >> Here is what I think I should do: >> 1) Feed the (x,y) values represented by the top of each histogram = entry >> within my x-range into a UnivariateRealInterpolator between ranges >> (x1,y1) and (x2,y2). >> 2) The interpolate method gives me back a PolynomialSplineFunction >> (call if psf). >> 3) I get the second differential UnivariateRealFunction (call it urf) >> by calling psf.getPolynomialSplineDerivative().derivative() >> 4) I compute the second derivative value as the difference of >> urf.value(x2) - urf.value(x1) >>=20 >> Does this sound like a reasonable/accurate approach? Any >> suggestions/gotchas or pointers to better approaches? >=20 > No, this is not an approach I would recommend. A much more = straightforward > way to compute this derivative is to apply a dedicated finite = differences formula > on three consecutive points. I'll give ou such a formula tomorrow (I = am on a mobile > device right now and it is difficult to write a compl=E8te mail...) >=20 > Luc >=20 >>=20 >> Thanks very much, >>=20 >> Sujit >>=20 >>=20 >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org >> For additional commands, e-mail: user-help@commons.apache.org >=20 >=20 > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@commons.apache.org > For additional commands, e-mail: user-help@commons.apache.org >=20 --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@commons.apache.org For additional commands, e-mail: user-help@commons.apache.org