[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Statistics in Org-Tables
From: |
Nick Dokos |
Subject: |
Re: [O] Statistics in Org-Tables |
Date: |
Wed, 20 Feb 2013 13:27:16 -0500 |
Rodolfo Aramayo <address@hidden> wrote:
> Simple question: What is the best way to configure/find out how to
> calculate Median, Standard Deviation in an org-table?
There are calc functions to compute these things, but the layout of your
table will of course influence the formulas. Here's a simple example
that calculates the statistics for the second column - it uses the
@address@hidden range reference notation to get the numbers between the first
and second separators and the @> (@>>, @>>>, etc.) notation to refer to
the last (last minus one, last minus two, etc.) row:
--8<---------------cut here---------------start------------->8---
* mean, median, stdev
| i | x |
|--------+-----------|
| 1 | 3 |
| 2 | 1 |
| 3 | 1 |
| 4 | 2 |
| 5 | 1 |
| 6 | 3 |
| 7 | 4 |
| 8 | 1 |
| 9 | 1 |
|--------+-----------|
| mean | 1.8888889 |
| median | 1 |
| sdev | 1.1666667 |
| sum | 17 |
#+TBLFM: @>$2=vsum(@address@hidden) :: @>>>>$2=vmean(@address@hidden) ::
@>>>$2=vmedian(@address@hidden) :: @>>$2=vsdev(@address@hidden)
--8<---------------cut here---------------end--------------->8---
More details about such references are in the Org manual:
(info "(org) References")
More details about the calc functions are in the Calc manual:
(info "(calc) Single-variable statistics")
Nick