{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "## Lab03PDSAnalytics ##\n", "\n", "How does intelligence and education impact the level of income?\n", "\n", "In order to estimate a regression, import the statsmodels module (https://www.statsmodels.org):\n", "\n", "`\n", "import statsmodels.api as sm\n", "model = sm.OLS(y, X).fit()\n", "predictions = model.predict(X) \n", "model.summary()\n", "`\n", "* y may be a series with data corresponding to the target (or dependent variable)\n", "* X may be a dataframe with data corresponding to the features (or independent variable)\n", "\n", "Note: Information related to IQ level is not validated. Data were obtained from the Internet. On the other hand, IQ is culturally biased, and values correspond to average\n", "\n", "dataFile='https://github.com/masterfloss/data/blob/main/exerciseInt.xlsx?raw=true'\n", "\n", "1. Read data and analyse it.\n", "\n", "2. Create a regression, where y is the Income, and all the others are features of the model.\n", "\n", "3. Analise output\n", "\n", "4. Create another repression, where y is the Income. IQ and 'Education expenditure per capita' are features of the model.\n", "\n", "5. Analyse relationship between Income and each one of the features using skatter plot.\n", "\n", "6. FIt a polinomial to the follwoing regression:\n", "\n", " y=f(y) \n", " where:\n", " y= 'quality of Life'\n", " x= 'Education expenditures per capita'\n", "\n", "7. Show it in a chart (scatter)\n", "\n", "8. Create a heatmap using correlation matrix\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "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.8.5" } }, "nbformat": 4, "nbformat_minor": 2 }