{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Introduction to Inferential Statistics\n", "\n", "## Introduction to Probability\n", "\n", "* Normal Distribution\n", "* Normal Distribution & Standard Deviation\n", "* Concept of Z-score\n", "\n", "## Introduction to Inference\n", "\n", "* Sample Mean & Population Mean\n", "* Statistical Inference\n", "* Central Limit Theorem\n", "* Confidence Intervals\n", "* Interpretation Of Confidence Interval\n" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "# importing all the basic libraries\n", "\n", "# for using division module\n", "from __future__ import division\n", "\n", "# for basic operations\n", "import pandas as pd\n", "import numpy as np\n", "\n", "# for data visualizations\n", "import matplotlib.pyplot as plt\n", "import seaborn as sns\n", "\n", "# for avoiding warnings\n", "import warnings\n", "warnings.filterwarnings('ignore')" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "(1460, 81)" ] }, "execution_count": 2, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# reading the data\n", "data = pd.read_csv('Datasets/train.csv')\n", "\n", "# lets check the shape of the dataset\n", "data.shape" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", " | Id | \n", "MSSubClass | \n", "MSZoning | \n", "LotFrontage | \n", "LotArea | \n", "Street | \n", "Alley | \n", "LotShape | \n", "LandContour | \n", "Utilities | \n", "LotConfig | \n", "LandSlope | \n", "Neighborhood | \n", "Condition1 | \n", "Condition2 | \n", "BldgType | \n", "HouseStyle | \n", "OverallQual | \n", "OverallCond | \n", "YearBuilt | \n", "YearRemodAdd | \n", "RoofStyle | \n", "RoofMatl | \n", "Exterior1st | \n", "Exterior2nd | \n", "MasVnrType | \n", "MasVnrArea | \n", "ExterQual | \n", "ExterCond | \n", "Foundation | \n", "BsmtQual | \n", "BsmtCond | \n", "BsmtExposure | \n", "BsmtFinType1 | \n", "BsmtFinSF1 | \n", "BsmtFinType2 | \n", "BsmtFinSF2 | \n", "BsmtUnfSF | \n", "TotalBsmtSF | \n", "Heating | \n", "HeatingQC | \n", "CentralAir | \n", "Electrical | \n", "1stFlrSF | \n", "2ndFlrSF | \n", "LowQualFinSF | \n", "GrLivArea | \n", "BsmtFullBath | \n", "BsmtHalfBath | \n", "FullBath | \n", "HalfBath | \n", "BedroomAbvGr | \n", "KitchenAbvGr | \n", "KitchenQual | \n", "TotRmsAbvGrd | \n", "Functional | \n", "Fireplaces | \n", "FireplaceQu | \n", "GarageType | \n", "GarageYrBlt | \n", "GarageFinish | \n", "GarageCars | \n", "GarageArea | \n", "GarageQual | \n", "GarageCond | \n", "PavedDrive | \n", "WoodDeckSF | \n", "OpenPorchSF | \n", "EnclosedPorch | \n", "3SsnPorch | \n", "ScreenPorch | \n", "PoolArea | \n", "PoolQC | \n", "Fence | \n", "MiscFeature | \n", "MiscVal | \n", "MoSold | \n", "YrSold | \n", "SaleType | \n", "SaleCondition | \n", "SalePrice | \n", "
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | \n", "1 | \n", "60 | \n", "RL | \n", "65.0 | \n", "8450 | \n", "Pave | \n", "NaN | \n", "Reg | \n", "Lvl | \n", "AllPub | \n", "Inside | \n", "Gtl | \n", "CollgCr | \n", "Norm | \n", "Norm | \n", "1Fam | \n", "2Story | \n", "7 | \n", "5 | \n", "2003 | \n", "2003 | \n", "Gable | \n", "CompShg | \n", "VinylSd | \n", "VinylSd | \n", "BrkFace | \n", "196.0 | \n", "Gd | \n", "TA | \n", "PConc | \n", "Gd | \n", "TA | \n", "No | \n", "GLQ | \n", "706 | \n", "Unf | \n", "0 | \n", "150 | \n", "856 | \n", "GasA | \n", "Ex | \n", "Y | \n", "SBrkr | \n", "856 | \n", "854 | \n", "0 | \n", "1710 | \n", "1 | \n", "0 | \n", "2 | \n", "1 | \n", "3 | \n", "1 | \n", "Gd | \n", "8 | \n", "Typ | \n", "0 | \n", "NaN | \n", "Attchd | \n", "2003.0 | \n", "RFn | \n", "2 | \n", "548 | \n", "TA | \n", "TA | \n", "Y | \n", "0 | \n", "61 | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "NaN | \n", "NaN | \n", "NaN | \n", "0 | \n", "2 | \n", "2008 | \n", "WD | \n", "Normal | \n", "208500 | \n", "
1 | \n", "2 | \n", "20 | \n", "RL | \n", "80.0 | \n", "9600 | \n", "Pave | \n", "NaN | \n", "Reg | \n", "Lvl | \n", "AllPub | \n", "FR2 | \n", "Gtl | \n", "Veenker | \n", "Feedr | \n", "Norm | \n", "1Fam | \n", "1Story | \n", "6 | \n", "8 | \n", "1976 | \n", "1976 | \n", "Gable | \n", "CompShg | \n", "MetalSd | \n", "MetalSd | \n", "None | \n", "0.0 | \n", "TA | \n", "TA | \n", "CBlock | \n", "Gd | \n", "TA | \n", "Gd | \n", "ALQ | \n", "978 | \n", "Unf | \n", "0 | \n", "284 | \n", "1262 | \n", "GasA | \n", "Ex | \n", "Y | \n", "SBrkr | \n", "1262 | \n", "0 | \n", "0 | \n", "1262 | \n", "0 | \n", "1 | \n", "2 | \n", "0 | \n", "3 | \n", "1 | \n", "TA | \n", "6 | \n", "Typ | \n", "1 | \n", "TA | \n", "Attchd | \n", "1976.0 | \n", "RFn | \n", "2 | \n", "460 | \n", "TA | \n", "TA | \n", "Y | \n", "298 | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "NaN | \n", "NaN | \n", "NaN | \n", "0 | \n", "5 | \n", "2007 | \n", "WD | \n", "Normal | \n", "181500 | \n", "
2 | \n", "3 | \n", "60 | \n", "RL | \n", "68.0 | \n", "11250 | \n", "Pave | \n", "NaN | \n", "IR1 | \n", "Lvl | \n", "AllPub | \n", "Inside | \n", "Gtl | \n", "CollgCr | \n", "Norm | \n", "Norm | \n", "1Fam | \n", "2Story | \n", "7 | \n", "5 | \n", "2001 | \n", "2002 | \n", "Gable | \n", "CompShg | \n", "VinylSd | \n", "VinylSd | \n", "BrkFace | \n", "162.0 | \n", "Gd | \n", "TA | \n", "PConc | \n", "Gd | \n", "TA | \n", "Mn | \n", "GLQ | \n", "486 | \n", "Unf | \n", "0 | \n", "434 | \n", "920 | \n", "GasA | \n", "Ex | \n", "Y | \n", "SBrkr | \n", "920 | \n", "866 | \n", "0 | \n", "1786 | \n", "1 | \n", "0 | \n", "2 | \n", "1 | \n", "3 | \n", "1 | \n", "Gd | \n", "6 | \n", "Typ | \n", "1 | \n", "TA | \n", "Attchd | \n", "2001.0 | \n", "RFn | \n", "2 | \n", "608 | \n", "TA | \n", "TA | \n", "Y | \n", "0 | \n", "42 | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "NaN | \n", "NaN | \n", "NaN | \n", "0 | \n", "9 | \n", "2008 | \n", "WD | \n", "Normal | \n", "223500 | \n", "
3 | \n", "4 | \n", "70 | \n", "RL | \n", "60.0 | \n", "9550 | \n", "Pave | \n", "NaN | \n", "IR1 | \n", "Lvl | \n", "AllPub | \n", "Corner | \n", "Gtl | \n", "Crawfor | \n", "Norm | \n", "Norm | \n", "1Fam | \n", "2Story | \n", "7 | \n", "5 | \n", "1915 | \n", "1970 | \n", "Gable | \n", "CompShg | \n", "Wd Sdng | \n", "Wd Shng | \n", "None | \n", "0.0 | \n", "TA | \n", "TA | \n", "BrkTil | \n", "TA | \n", "Gd | \n", "No | \n", "ALQ | \n", "216 | \n", "Unf | \n", "0 | \n", "540 | \n", "756 | \n", "GasA | \n", "Gd | \n", "Y | \n", "SBrkr | \n", "961 | \n", "756 | \n", "0 | \n", "1717 | \n", "1 | \n", "0 | \n", "1 | \n", "0 | \n", "3 | \n", "1 | \n", "Gd | \n", "7 | \n", "Typ | \n", "1 | \n", "Gd | \n", "Detchd | \n", "1998.0 | \n", "Unf | \n", "3 | \n", "642 | \n", "TA | \n", "TA | \n", "Y | \n", "0 | \n", "35 | \n", "272 | \n", "0 | \n", "0 | \n", "0 | \n", "NaN | \n", "NaN | \n", "NaN | \n", "0 | \n", "2 | \n", "2006 | \n", "WD | \n", "Abnorml | \n", "140000 | \n", "
4 | \n", "5 | \n", "60 | \n", "RL | \n", "84.0 | \n", "14260 | \n", "Pave | \n", "NaN | \n", "IR1 | \n", "Lvl | \n", "AllPub | \n", "FR2 | \n", "Gtl | \n", "NoRidge | \n", "Norm | \n", "Norm | \n", "1Fam | \n", "2Story | \n", "8 | \n", "5 | \n", "2000 | \n", "2000 | \n", "Gable | \n", "CompShg | \n", "VinylSd | \n", "VinylSd | \n", "BrkFace | \n", "350.0 | \n", "Gd | \n", "TA | \n", "PConc | \n", "Gd | \n", "TA | \n", "Av | \n", "GLQ | \n", "655 | \n", "Unf | \n", "0 | \n", "490 | \n", "1145 | \n", "GasA | \n", "Ex | \n", "Y | \n", "SBrkr | \n", "1145 | \n", "1053 | \n", "0 | \n", "2198 | \n", "1 | \n", "0 | \n", "2 | \n", "1 | \n", "4 | \n", "1 | \n", "Gd | \n", "9 | \n", "Typ | \n", "1 | \n", "TA | \n", "Attchd | \n", "2000.0 | \n", "RFn | \n", "3 | \n", "836 | \n", "TA | \n", "TA | \n", "Y | \n", "192 | \n", "84 | \n", "0 | \n", "0 | \n", "0 | \n", "0 | \n", "NaN | \n", "NaN | \n", "NaN | \n", "0 | \n", "12 | \n", "2008 | \n", "WD | \n", "Normal | \n", "250000 | \n", "