Skip to content

zaeemjamil/Maximizing-Taxi-Driver-Revenue-Using-Hypothesis-Testing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Maximizing-Taxi-Driver-Revenue-Using-Hypothesis-Testing

This project analyzes taxi trip data to determine whether payment type (Cash vs Credit Card) has an impact on fare amount. The goal is to help taxi companies and drivers increase revenue by understanding customer payment behavior. #Business Question Do customers who pay by credit card generate higher fares than those who pay in cash?

Dataset Description

The dataset contains the following fields:

ID

Pickup Date & Time

Dropoff Date & Time

Passenger Count

Trip Distance

Fare Amount

Payment Type (Cash or Card)

Data Preparation

Feature Engineering

A new column was created:

Trip Duration = Dropoff Time – Pickup Time

Data Cleaning

The following steps were performed:

Removed missing values

Fixed incorrect data types

Removed duplicate rows

Removed negative values in:

Fare amount

Trip distance

Trip duration

Outlier Treatment

Outliers in:

Fare Amount

Trip Distance

Duration

were removed using the Interquartile Range (IQR) method to eliminate unrealistic taxi trips.

Exploratory Data Analysis (EDA)

Visual analysis showed that:

Customers paying by credit card usually:

Travel longer distances

Pay higher fares

Travel with more passengers

Cash-paying customers mostly make shorter and cheaper trips

This indicates a strong relationship between payment method and revenue.

Hypothesis Testing

Hypotheses

Null Hypothesis (H₀): There is no difference in average fare between cash and card payments.

Alternate Hypothesis (H₁): The average fare for credit card payments is higher than for cash payments.

A statistical test was applied, and the p-value was calculated.

Since p-value < 0.05, the null hypothesis was rejected.

Final Conclusion

Credit card payments generate significantly higher revenue than cash payments.

Graphs

IMG_20260125_224545

Business Recommendation

Taxi companies should:

Promote credit card and digital payments

Provide discounts for card users

Encourage app-based payments

This will:

Increase driver earnings

Improve company revenue

About

This project analyzes taxi trip data to determine whether payment type (Cash vs Credit Card) has an impact on fare amount. The goal is to help taxi companies and drivers increase revenue by understanding customer payment behavior.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors