forked from personal/squiggle.c
change stats to markdown format
This commit is contained in:
parent
0f5f68f21f
commit
ab28b8a45b
|
@ -214,16 +214,15 @@ void array_print_stats(double xs[], int n)
|
|||
double median = array_get_median(xs, n);
|
||||
double mean = array_mean(xs, n);
|
||||
double std = array_std(xs, n);
|
||||
printf("Avg: %lf\n"
|
||||
"Std: %lf\n"
|
||||
" 5%%: %lf\n"
|
||||
"10%%: %lf\n"
|
||||
"25%%: %lf\n"
|
||||
"50%%: %lf\n"
|
||||
"75%%: %lf\n"
|
||||
"90%%: %lf\n"
|
||||
"95%%: %lf\n",
|
||||
mean, std, ci_90.low, ci_80.low, ci_50.low, median, ci_50.high, ci_80.high, ci_90.high);
|
||||
printf("| Statistic | Value |\n"
|
||||
"| --- | --- |\n"
|
||||
"| Mean | %lf |\n"
|
||||
"| Median | %lf |\n"
|
||||
"| Std | %lf |\n"
|
||||
"| 90% confidence interval | %lf to %lf |\n"
|
||||
"| 80% confidence interval | %lf to %lf |\n"
|
||||
"| 50% confidence interval | %lf to %lf |\n"
|
||||
mean, median, std, ci_90.low, ci_90.high, ci_80.low, ci_80.high, ci_50.low, ci_50.high);
|
||||
}
|
||||
|
||||
void array_print_histogram(double* xs, int n_samples, int n_bins)
|
||||
|
|
Loading…
Reference in New Issue
Block a user