{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "![title](header.png)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# What is Statistical Analysis?" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Statistical Analysis in Python lets us draw formal conclusions from data using mathematical tests. These tests depend on a series of assumptions to work, but if they are met, can give us some powerful insight." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Why Python for Statistics?" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "R - another programming language - is purpose built, and made for statistics. So why use Python instead of R? Python allows us more flexibility with our data; Python has more options for importing data, working with controllers and image analysis that makes it more versitile than R. Prehaps more importantly is the size of the community - Python has a very large following and sees regular updates and improvements to it's ecosystem, moreso than R." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# What libraries?" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "There are a number of libraries that are useful for statistical analysis in Python:\n", "\n", "* numpy and pandas give us a nice format for us to analyse our data in.\n", "* matplotlib and seaborn give us cool visualisation options.\n", "* scipy and statsmodels give us good frequentist options for analysis.\n", "* PyMC gives us good bayesian tools for analysis." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Frequentist vs Bayesian statistics" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "These are two different philosophies about what statistics and probability mean, resulting in different methods and outcomes. A frequentist believes in probability being the result of \"long term\" distributions, and a bayesian believes in using new data to reach new conclusions. A good analogy for this is what would happen if a frequentist and a bayesian lost their phone in their house, and rung it to find it - a frequentist would trust the sound first, whereas a bayesian would trust their knowledge of where they normally leave their phone.\n", "\n", "I recommend trying both out and seeing which one works for you - Python has more support for frequentist analysis but that shouldn't put you off trying bayesian analysis!" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# What Problems Is This Useful For?" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Strict statistical testing is useful for academics to test hypothesis in experiments and other studies - if we want to definitively test if two means are equal (eg does an antidepressant improve happiness scores over a control group?), how correlated two variables are (eg the concentration of a substance versus it's fluorescence), and if a group of means are different (eg different material elasticities)." ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.6.0" } }, "nbformat": 4, "nbformat_minor": 2 }