Answers for "np.percentile 95 confidence interval"

1

np confidence interval

import numpy as np
import scipy.stats


def mean_confidence_interval(data, confidence=0.95):
    a = 1.0 * np.array(data)
    n = len(a)
    m, se = np.mean(a), scipy.stats.sem(a)
    h = se * scipy.stats.t.ppf((1 + confidence) / 2., n-1)
    return m, m-h, m+h
Posted by: Guest on March-19-2020

Code answers related to "np.percentile 95 confidence interval"

Python Answers by Framework

Browse Popular Code Answers by Language