• Stars
    star
    897
  • Rank 50,907 (Top 2 %)
  • Language
    Jupyter Notebook
  • Created over 9 years ago
  • Updated about 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Introduction to Statistics using Python

Introduction to Statistics

Bitdeli Badge

Inspired by Allen Downey's books Think Stats and Think Bayes, this is an attempt to learn Statistics using an application-centric programming approach.

Objective

Showcase real-life examples and what statistics to use in each of those examples. Almost every book teaches a concept and shows an example. Ultimately, every topic gets treated separately and no holistic view is presented. Here, we would take examples and see how to make sense out of it.

Topics covered

  • Mean, Median, Mode
  • Standard Deviation
  • Variance
  • Co-variance
  • Probability Distribution
  • Hypothesis Testing
  • t-test, p-value, chi-squared test
  • Confidence Intervals
  • Confidence levels and Sigificance levels
  • Correlation
  • Resampling (and uses in Big Data)
  • A/B Testing
  • A simple linear regression model

Workshop Plan

We would be using Marijuana prices in various states of the USA, along with demographic data of the USA based on the latest census data

There will be separate ipython notebooks - grouped by topic similarities. notebooks will be uploaded later Some examples include:

  • Find sum of people buying weed in a year, by various states.
  • Find mean of price in a week/month, by various states.
  • Find variance of price in selected states. Find variance of selected states by week of month
  • Define distribution. Plot histograms
  • Determining outliers (Plots, quantiles, box plots, percentiles) in weed price data
  • Continuous distributions(exponential distribution, normal distribution)
  • Introduction to Probability
  • Hypothesis testing. Check if weed price across states are similar or not. Check for different qualities of weed
  • Resampling
  • Simple regression model: Predict weed price for the next month. Understand the output and diagnostics
  • Introduction to A/B testing: Impact of regulation and deregulation on a couple of states

Prerequisites

  • Basics of Python. User should know how to write functions; read in a text file(csv, txt, fwf) and parse them; conditional and looping constructs; using standard libraries like os, sys; lists, list comprehension, dictionaries
  • It is good to know basics of the following:
    • Numpy
    • Scipy
    • Pandas
    • Matplotlib
    • Seaborn
    • IPython and IPython notebook - Everything here would be an IPython notebook
  • Software Requirements
    • Python 2.7
    • git - so that this repo can be cloned :)
    • virtualenv
    • Libraries from requirements.txt

Optional

Users could choose to install Anaconda, if they want. If using Anaconda or Enthought, please ensure that all libraries listed in the requirements.txt are installed.

Note to Windows Users: Neither of us use Windows. From past workshop experiences, Windows users have faced issues installing the way explained below. It is advisable to install Anaconda and ensure that all the libraries listed in the requirements.txt file are installed.

Setup Guide

Clone the repository

$ git clone https://github.com/rouseguy/intro2stats.git

Create a virtual environment & activate

$ cd intro2stats
$ virtualenv env
$ source env/bin/activate

Install reqirements from requirements file

$ pip install -r requirements.txt

Note: Make sure you have libraries for png & freetype.

Ubuntu users can install the below

apt-get install libfreetype6-dev
apt-get install libpng-dev

Script to check if installation is fine for the workshop

Please execute the following at the command prompt

$ python check_env.py

If any library has a FAIL message, please install/upgrade that library.


Creative Commons License
Introduction to Statistics using Python by Bargava and Raghotham is licensed under a Creative Commons Attribution 4.0 International License.

More Repositories

1

DeepLearning-NLP

Introduction to Deep Learning for Natural Language Processing
Jupyter Notebook
605
star
2

TimeSeriesAnalysiswithPython

Time Series Analysis with Python
HTML
342
star
3

DeepLearning-Image

Introduction to Deep Learning for Image Recognition
Jupyter Notebook
151
star
4

intro2deeplearning

Introduction to Deep Learning
Python
127
star
5

BlackFridayDataHack

Black Friday Data Hack (online data science hackathon) held Nov 20-22 by Analytics Vidhya
20
star
6

intro-to-machine-learning

Introduction to Machine Learning using Python
Jupyter Notebook
3
star
7

MacHack

Tips and Tricks that I've learnt on Mac
2
star
8

Blaze

Introduction to Blaze. Talk given at BangPyper at Jan 2015
2
star
9

learnDL

Articles/Books to learn Deep Learning
2
star
10

NBA_Analytics

NBA Analytics using SportsVU data
2
star
11

cricket-analytics

Cricket Analytics
Python
2
star
12

appliedML

Applied Machine Learning using Python
Jupyter Notebook
2
star
13

bangpypers_apr2015

Talk given at BangPypers April 2015 Meetup at IBM.
2
star
14

DL-NLP

Jupyter Notebook
2
star
15

steps

Analysis of steps
1
star
16

learnAlgorithms

Courses/Links to learn Data Structures and Algorithms
1
star
17

learnAlgorithms2

Code to Learn Algorithms
Python
1
star
18

MachineLearning_with_R

R
1
star
19

TimeSeriesAnalysis_with_R

Time Series Analysis and Forecasting using R
1
star
20

hackathon-asoiaf

Analytics on A Song of Ice and Fire
1
star
21

bdotcom

personal website
HTML
1
star
22

rouseguy.github.io

My website
1
star
23

TimeSeriesAnalysis_with_Python

Time Series Analysis and Forecasting using Python
1
star
24

test-one-click-hugo-cms

CSS
1
star
25

Links_and_Articles

Links to articles that I find interesting
1
star
26

middleEarthMap

Map of Middle Earth - visualized using R
HTML
1
star