2023-11-19 14:32:29 +00:00
|
|
|
#include "../../../squiggle.h"
|
2023-11-19 14:47:19 +00:00
|
|
|
#include "../../../squiggle_more.h"
|
2023-07-23 17:11:25 +00:00
|
|
|
#include <stdint.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
// Estimate functions
|
2023-11-18 21:10:21 +00:00
|
|
|
double beta_1_2_sampler(uint64_t* seed)
|
|
|
|
{
|
|
|
|
return sample_beta(1, 2.0, seed);
|
2023-07-23 17:11:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
int main()
|
|
|
|
{
|
|
|
|
// set randomness seed
|
|
|
|
uint64_t* seed = malloc(sizeof(uint64_t));
|
|
|
|
*seed = 1000; // xorshift can't start with 0
|
|
|
|
|
2023-11-18 21:10:21 +00:00
|
|
|
ci beta_1_2_ci_90 = get_90_confidence_interval(beta_1_2_sampler, seed);
|
|
|
|
printf("90%% confidence interval of beta(1,2) is [%f, %f]\n", beta_1_2_ci_90.low, beta_1_2_ci_90.high);
|
|
|
|
|
|
|
|
free(seed);
|
2023-07-23 17:11:25 +00:00
|
|
|
}
|