summaryrefslogtreecommitdiffstats
path: root/llgo/utils/benchcomp/analyze.R
blob: 2efa787b3f770b55f13aa54c43975b29067451ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
sc <- read.table(file('stdin'))
scratio <- sc$V2 / sc$V3
scratio <- scratio[scratio > 0]

# Take the log of the ratio. Our null hypothesis is a normal distribution
# around zero.
tt <- t.test(log(scratio))
tt

# This gives us the geo-mean as we are taking the exponent of the linear mean
# of logarithms.
1 - 1/exp(tt$estimate)

# Likewise for the confidence interval.
1 - 1/exp(tt$conf.int)
OpenPOWER on IntegriCloud