github.com/prattmic/llgo-embedded@v0.0.0-20150820070356-41cfecea0e1e/utils/benchcomp/analyze.R (about) 1 sc <- read.table(file('stdin')) 2 scratio <- sc$V2 / sc$V3 3 scratio <- scratio[scratio > 0] 4 5 # Take the log of the ratio. Our null hypothesis is a normal distribution 6 # around zero. 7 tt <- t.test(log(scratio)) 8 tt 9 10 # This gives us the geo-mean as we are taking the exponent of the linear mean 11 # of logarithms. 12 1 - 1/exp(tt$estimate) 13 14 # Likewise for the confidence interval. 15 1 - 1/exp(tt$conf.int)