Odd slight perturbation in HypothesisTests

julia> using HypothesisTests, Random;

julia> Random.seed!(0); x= randn(100); y= randn(100);

julia> OneSampleTTest(x,y)

the point estimate is slightly unstable. it may output one of the two:

     point estimate:          0.121977870355099
     point estimate:          0.12197787035509895

is this indeterminacy a buglet? can HT be forced to lower and perfect precision?


Are the x and y the same (==) otherwise?

1 Like

Do you get the two different results on the same machine or does it only vary across machines? The latter can happen if the two machines have different instruction sets as the order of operations can then vary. May I ask why this is a concern? The difference doesn’t have any practical implications for a statistical computation.

1 Like

same machine. presumably same x and y, after a seed init. always a new julia command line start, with nothing else invoked earlier…

I stumbled onto this, because my cookbook has an automatic checker, which confirms that the results are still the same. when it tripped, I changed the output, ran again. after a few more such checks, it triggered again.

it’s a nuisance, not a problem. nevertheless, it would be nice to have determinate output. one way to solve this nuisance is to round the output to something that is not so near machine precision. like 5 significant digits.

Where does the checker for the Cookbook run? Couldn’t it be the case that different cloud instances are running it?

nope. perfectly local. macos.