{
"cells": [
{
"cell_type": "code",
"execution_count": 86,
"metadata": {},
"outputs": [],
"source": [
"# loading important li
aries \n",
"import pandas as pd\n",
"import matplotlib.pyplot as plt\n",
"import statsmodels.api as sm\n",
"import statsmodels.formula.api as smf"
]
},
{
"cell_type": "code",
"execution_count": 87,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"
\n",
"RangeIndex: 400 entries, 0 to 399\n",
"Data columns (total 4 columns):\n",
" # Column Non-Null Count Dtype \n",
"--- ------ -------------- ----- \n",
" 0 admit 400 non-null int64 \n",
" 1 gre 400 non-null int64 \n",
" 2 gpa 400 non-null float64\n",
" 3 rank 400 non-null int64 \n",
"dtypes: float64(1), int64(3)\n",
"memory usage: 12.6 KB\n"
]
}
],
"source": [
"df=pd.read_csv(\"C:/Users/Hp/Desktop
inary.csv\") # loading data set file\n",
"df.info() # getting information about variables in the data set"
]
},
{
"cell_type": "code",
"execution_count": 88,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"