Skip to content

Instantly share code, notes, and snippets.


Behrouz B. behrouz-bakhtiari

View GitHub Profile
import scipy.stats, math
mu = 8000
xbar = 8100
s = 580
n = 40
t_dist = scipy.stats.t(n-1)
t = (xbar - mu)/(s/math.sqrt(n))
pval = 1 - t_dist.cdf(t)
import numpy as np
import seaborn as sns
samples = np.zeros(10000)
mu, sigma = 20, 3
for s in range(10000):
sample = np.random.normal(mu, sigma, 250) #sample of size 250
x_bar = sample.mean() #calculating sample mean
samples[s] = x_bar
sns.distplot(samples, hist = True, color = 'darkblue',
hist_kws={'edgecolor':'black'}).set(xlabel = 'Sample Mean',
import numpy as np
mu, sigma = 20, 3
sample = np.random.normal(mu, sigma, 250)
x_bar = sample.mean()
View A hack for showing LaTeX formulas in GitHub


A lot of GitHub projects need to have pretty math formulas in READMEs, wikis or other markdown pages. The desired approach would be to just write inline LaTeX-style formulas like this:

$e^{i \pi} = -1$

Unfortunately, GitHub does not support inline formulas. The issue is tracked here.


behrouz-bakhtiari /
Created Jun 9, 2018 — forked from PurpleBooth/
A template to make good

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.


You can’t perform that action at this time.