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?
The dataset contains the following fields:
ID
Pickup Date & Time
Dropoff Date & Time
Passenger Count
Trip Distance
Fare Amount
Payment Type (Cash or Card)
Feature Engineering
A new column was created:
Trip Duration = Dropoff Time – Pickup Time
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
Outliers in:
Fare Amount
Trip Distance
Duration
were removed using the Interquartile Range (IQR) method to eliminate unrealistic taxi trips.
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.
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.
Credit card payments generate significantly higher revenue than cash payments.
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
