I took this code from the official scipy documentation:
from scipy import stats
import numpy as np
rng = np.random.default_rng()
rvs = stats.uniform.rvs(size=50, random_state=rng)
stats.ttest_1samp(rvs, popmean=0.5)
In R, it's possible change the confidence level (90%, 94%, 99%, as example), but there is no mention of how to do this in scipy, at least in the official documentation. Does anyone know if there is any python library in which it is possible to adjust the confidence level or if it is possible to make this adjustment in the function stats.ttest_1samp
. In the official documentation there is no option for confidence level in the function arguments, that's why I didn't try to put an argument in the function stats.ttest_1samp
. Thanks.