You are a guest. Restricted access. Read more.
SCaVis manual


This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
man:stat:statistics [2014/05/30 18:57]
admin [Statistics]
man:stat:statistics [2014/07/19 19:08] (current)
Line 82: Line 82:
 </​hidden>​ </​hidden>​
-One can access all such values using the method "​getStat()"​ which returns a Java Map (or Jython dictionary) with the key representing statistical characteristics ​ 
-of this array. 
 +Let us continue with this example and now we would like to return all statistical characteristics
 +of the sample as a dictionary. We can do this by appending the following lines that
 +1) create a dictionary "​stat"​ with key/value pairs; 2) retrieve a variance of the sample using the key ``Variance''​.
-You can also visualize the random numbers in the form of a histogram:+<code python>​ 
 +print "​Variance=",​stat["​variance"​] 
 +which will print "​Variance= 757.3"​. If not sure about the names of the keys, simply print the dictionary as 
 +"print stat"​. 
 +One can create histograms that catch the most basic 
 +characteristics of data.  This is especially important if there is no particular reasons 
 +to deal with complete data arrays. We can easily do this with above Fibonacci sequence as: 
 +<code python>​ 
 +h=p0.getH1D(10,​ 0, 100) 
 +print h.getStat() 
 +The code converts the array into a histogram with 10  equidistant bins in the range 0-100, and then 
 +it prints the map with statistical characteristics.  
 +You can also visualize the random numbers in the form of a histogram ​as shown in this detailed example above. 
 +We create random numbers, convert them to histograms and plot them. 
 +<ifauth !@member>​ 
 +<note important>​ 
 +Unregistered users have a limited access to this section. 
 +You can unlock advanced pages after  becoming [[/​scavis/​members/​selock| a full member]].  
 +You can also request to edit this manual and insert comments.  
 +<ifauth @member,​@admin,​@editor>​
 <file python>​ <file python>​
Line 102: Line 134:
 c1.draw(h) c1.draw(h)
 </​file>​ </​file>​
 ====== Statistics with P1D ====== ====== Statistics with P1D ======
man/stat/statistics.txt · Last modified: 2014/07/19 19:08 by admin
CC Attribution-Share Alike 3.0 Unported
Powered by PHP Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0 Valid HTML5