Skip to content

Li-Ndibe/Regression-Analysis

Repository files navigation

Regression-Analysis

This repository contains a sinple linear regression analysis on tips given in a restaurant business and a multiple linear regression on the percentage of female employment in the labour force. I will briefly summarise the Simple Linear Regression, then then the multiple linear regression.

#Simple linear regression analysis on tips

The dataset was collectd from https://www.kaggle.com/datasets/tasneemabdulrahim/tips-dataset

I used the following libraries for the analysis pandas for data wrangling seaborn for visualizing the relationship OLS and qqplot from Statsmodels was used for model extraction and prediction

The dataset contained 24 rows and 12 columns

from scatter plot it shows there is a positive relationship between the tip and total bill of a customer.

The fitted model shows that an increment by 1 on the amount of tip given will result to an expected increase on the total bill by 4.347714.

#On Multiple Linear Regression Analysis Women inclusion in the workforce has always been a problem in every country whether developed, developing or underdeveloped country. The percentage of female worker is insignificant compared to the male counterparts. Major reasons are such economic factors such as insufficient access to education, religious superstitions and lack of adequate infrastructure are responsible for this gap. With the application of multiple Linear Regression, I discovered the relationship between the predictor(percentage of female workers ) and the response variables (Agriculture, Industry, Services, Wage&Salaried).

The data for this analysis was collected from https://www.kaggle.com/datasets/mdmuhtasimbillah/female-employment-vs-socioeconimic-factors libraries applied pandas seaborn sklearn to implement the Linear regression model

Steps of the Analysis Data exploration and wrangling. Set up the dependent and independent variables. Divide the data into train & test sets Train the algorithm Compare the predicted value to the actual value Evaluate the algorithm

Thank you for your review

About

Simple Linear Regression and Multiple Linear Regression Analysis

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors