Toolboxes

Statistics and Machine Learning Toolboxscipy.stats + pandas

Statistical distributions, hypothesis testing, and regression. Maps to scipy.stats and pandas.

Install
pip install scipy pandas
MATLABPythonNote
normpdf(x, mu, sig)stats.norm.pdf(x, mu, sig)
normcdf(x, mu, sig)stats.norm.cdf(x, mu, sig)
norminv(p, mu, sig)stats.norm.ppf(p, mu, sig)
normrnd(mu, sig, m, n)np.random.normal(mu, sig, (m, n))
ttest(x)stats.ttest_1samp(x, 0)
ttest2(x, y)stats.ttest_ind(x, y)
anova1(data)stats.f_oneway(*groups)
chi2test(x)stats.chi2_contingency(x)
corrcoef(X)np.corrcoef(X)
cov(X)np.cov(X)
polyfit(x, y, n)np.polyfit(x, y, n)
polyval(p, x)np.polyval(p, x)
tabulate(x)pd.value_counts(x)
quantile(x, p)np.quantile(x, p)
prctile(x, p)np.percentile(x, p)

The converter automatically detects Statistics functions and adds the correct imports.

Try the converter