Return-Path: X-Original-To: apmail-commons-issues-archive@minotaur.apache.org Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 53D70181F1 for ; Thu, 20 Aug 2015 10:38:49 +0000 (UTC) Received: (qmail 27696 invoked by uid 500); 20 Aug 2015 10:38:46 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 27605 invoked by uid 500); 20 Aug 2015 10:38:46 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 27590 invoked by uid 99); 20 Aug 2015 10:38:46 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Aug 2015 10:38:45 +0000 Date: Thu, 20 Aug 2015 10:38:45 +0000 (UTC) From: "Patrick Drury (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (MATH-1260) SimpleRegression add new method: getPredictionStdErr(double x) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Patrick Drury created MATH-1260: ----------------------------------- Summary: SimpleRegression add new method: getPredictionStdErr(double x) Key: MATH-1260 URL: https://issues.apache.org/jira/browse/MATH-1260 Project: Commons Math Issue Type: New Feature Affects Versions: 3.5 Reporter: Patrick Drury I would like to be able to get the standard error of a predicted y value given an x value for a SimpleRegression instance. I believe (but I don't know) that it's as simple as something like the following: {code:java} public double getPredictionStdErr(double x) { if( !hasIntercept ){ return Double.NaN; } return FastMath.sqrt( getMeanSquareError() * ((1d / n) + ((xbar - x) * (xbar - x)) / sumXX)); } {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)