Java Doc for Statistics.java in  » Chart » jfreechart » org » jfree » data » statistics » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Chart » jfreechart » org.jfree.data.statistics 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.jfree.data.statistics.Statistics

Statistics
abstract public class Statistics (Code)
A utility class that provides some common statistical functions.




Method Summary
public static  doublecalculateMean(Number[] values)
     Returns the mean of an array of numbers.
public static  doublecalculateMean(Number[] values, boolean includeNullAndNaN)
     Returns the mean of an array of numbers.
Parameters:
  values - the values (null not permitted).
Parameters:
  includeNullAndNaN - a flag that controls whether or not null and Double.NaN values are includedin the calculation (if either is present in the array, the result is Double.NaN).
public static  doublecalculateMean(Collection values)
     Returns the mean of a collection of Number objects.
Parameters:
  values - the values (null not permitted).
public static  doublecalculateMean(Collection values, boolean includeNullAndNaN)
     Returns the mean of a collection of Number objects.
Parameters:
  values - the values (null not permitted).
Parameters:
  includeNullAndNaN - a flag that controls whether or not null and Double.NaN values are includedin the calculation (if either is present in the array, the result is Double.NaN).
public static  doublecalculateMedian(List values)
     Calculates the median for a list of values (Number objects). The list of values will be copied, and the copy sorted, before calculating the median.
public static  doublecalculateMedian(List values, boolean copyAndSort)
     Calculates the median for a list of values (Number objects). If copyAndSort is false, the list is assumed to be presorted in ascending order by value.
Parameters:
  values - the values (null permitted).
Parameters:
  copyAndSort - a flag that controls whether the list of values iscopied and sorted.
public static  doublecalculateMedian(List values, int start, int end)
     Calculates the median for a sublist within a list of values (Number objects).
Parameters:
  values - the values, in any order (null not permitted).
Parameters:
  start - the start index.
Parameters:
  end - the end index.
public static  doublecalculateMedian(List values, int start, int end, boolean copyAndSort)
     Calculates the median for a sublist within a list of values (Number objects).
public static  doublegetCorrelation(Number[] data1, Number[] data2)
     Calculates the correlation between two datasets.
public static  double[]getLinearFit(Number[] xData, Number[] yData)
     Fits a straight line to a set of (x, y) data, returning the slope and intercept.
Parameters:
  xData - the x-data (null not permitted).
Parameters:
  yData - the y-data (null not permitted).
public static  double[][]getMovingAverage(Number[] xData, Number[] yData, int period)
     Returns a data set for a moving average on the data set passed in.
public static  doublegetSlope(Number[] xData, Number[] yData)
     Finds the slope of a regression line using least squares.
Parameters:
  xData - the x-values (null not permitted).
Parameters:
  yData - the y-values (null not permitted).
public static  doublegetStdDev(Number[] data)
     Returns the standard deviation of a set of numbers.
Parameters:
  data - the data (null or zero length array not permitted).



Method Detail
calculateMean
public static double calculateMean(Number[] values)(Code)
Returns the mean of an array of numbers. This is equivalent to calling calculateMean(values, true).
Parameters:
  values - the values (null not permitted). The mean.



calculateMean
public static double calculateMean(Number[] values, boolean includeNullAndNaN)(Code)
Returns the mean of an array of numbers.
Parameters:
  values - the values (null not permitted).
Parameters:
  includeNullAndNaN - a flag that controls whether or not null and Double.NaN values are includedin the calculation (if either is present in the array, the result is Double.NaN). The mean.
since:
   1.0.3



calculateMean
public static double calculateMean(Collection values)(Code)
Returns the mean of a collection of Number objects.
Parameters:
  values - the values (null not permitted). The mean.



calculateMean
public static double calculateMean(Collection values, boolean includeNullAndNaN)(Code)
Returns the mean of a collection of Number objects.
Parameters:
  values - the values (null not permitted).
Parameters:
  includeNullAndNaN - a flag that controls whether or not null and Double.NaN values are includedin the calculation (if either is present in the array, the result is Double.NaN). The mean.
since:
   1.0.3



calculateMedian
public static double calculateMedian(List values)(Code)
Calculates the median for a list of values (Number objects). The list of values will be copied, and the copy sorted, before calculating the median. To avoid this step (if your list of values is already sorted), use the Statistics.calculateMedian(List,boolean) method.
Parameters:
  values - the values (null permitted). The median.



calculateMedian
public static double calculateMedian(List values, boolean copyAndSort)(Code)
Calculates the median for a list of values (Number objects). If copyAndSort is false, the list is assumed to be presorted in ascending order by value.
Parameters:
  values - the values (null permitted).
Parameters:
  copyAndSort - a flag that controls whether the list of values iscopied and sorted. The median.



calculateMedian
public static double calculateMedian(List values, int start, int end)(Code)
Calculates the median for a sublist within a list of values (Number objects).
Parameters:
  values - the values, in any order (null not permitted).
Parameters:
  start - the start index.
Parameters:
  end - the end index. The median.



calculateMedian
public static double calculateMedian(List values, int start, int end, boolean copyAndSort)(Code)
Calculates the median for a sublist within a list of values (Number objects). The entire list will be sorted if the ascendingfalse.
Parameters:
  values - the values (null not permitted).
Parameters:
  start - the start index.
Parameters:
  end - the end index.
Parameters:
  copyAndSort - a flag that that controls whether the list of values is copied and sorted. The median.



getCorrelation
public static double getCorrelation(Number[] data1, Number[] data2)(Code)
Calculates the correlation between two datasets. Both arrays should contain the same number of items. Null values are treated as zero.

Information about the correlation calculation was obtained from: http://trochim.human.cornell.edu/kb/statcorr.htm
Parameters:
  data1 - the first dataset.
Parameters:
  data2 - the second dataset. The correlation.




getLinearFit
public static double[] getLinearFit(Number[] xData, Number[] yData)(Code)
Fits a straight line to a set of (x, y) data, returning the slope and intercept.
Parameters:
  xData - the x-data (null not permitted).
Parameters:
  yData - the y-data (null not permitted). A double array with the intercept in [0] and the slope in [1].



getMovingAverage
public static double[][] getMovingAverage(Number[] xData, Number[] yData, int period)(Code)
Returns a data set for a moving average on the data set passed in.
Parameters:
  xData - an array of the x data.
Parameters:
  yData - an array of the y data.
Parameters:
  period - the number of data points to average A double[][] the length of the data set in the first dimension,with two doubles for x and y in the second dimension



getSlope
public static double getSlope(Number[] xData, Number[] yData)(Code)
Finds the slope of a regression line using least squares.
Parameters:
  xData - the x-values (null not permitted).
Parameters:
  yData - the y-values (null not permitted). The slope.



getStdDev
public static double getStdDev(Number[] data)(Code)
Returns the standard deviation of a set of numbers.
Parameters:
  data - the data (null or zero length array not permitted). The standard deviation of a set of numbers.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.