A simple bit of code in multiple languages that lets you calculate useful statistics without storing every sample.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
magic_stats/cpp/tests/confirm.r

9 lines
189 B

samples <- read.table("samples.txt")
#print(samples)
print("Mean V1")
mean(samples$V1)
print("Stddev V1")
sd(samples$V1)
print("Variance V1")
var(samples$V1)
t.test(samples$V1, samples$V2)