Skip to content

doshkaL/-Automatidata-project-

Repository files navigation

🚕 NYC Taxi Fare Analysis — A/B Testing & Hypothesis Testing in Python

This project is a simulated business case study based on real-world data from the New York City Taxi & Limousine Commission (TLC).

The objective is to analyze whether payment method (credit card vs. cash) influences taxi fare amounts, using exploratory data analysis (EDA) and statistical hypothesis testing (A/B testing). The results provide data-driven insights to help optimize pricing strategies and increase driver revenue.


📌 Project Overview

In this fictional business scenario, the NYC Taxi & Limousine Commission (TLC) partnered with the data consulting firm Automatidata to develop a system that enables riders to estimate taxi fares before their trip.

As part of this initiative, the data team analyzed the relationship between fare amount and payment method, using descriptive statistics and hypothesis testing.


🎯 Project Objectives

  • Analyze whether payment method influences fare amount
  • Apply descriptive statistics to summarize taxi trip data
  • Conduct a hypothesis test (A/B testing)
  • Generate business recommendations to increase driver revenue

🧪 Experimental Setup — A/B Test Design

For this project, we assume the dataset originates from a controlled experiment, enabling causal interpretation of results.

Group Assignment

Group Description
Group A Customers required to pay using credit card
Group B Customers required to pay using cash

This design allows us to determine whether payment method directly affects fare amount.


📊 Dataset

Source: NYC Taxi & Limousine Commission (TLC)

Key Variables:

  • fare_amount
  • payment_type

🛠️ Tools & Technologies

  • Python
  • Pandas — data manipulation
  • NumPy — numerical computation
  • Matplotlib & Seaborn — data visualization
  • SciPy & Statsmodels — statistical hypothesis testing

🔍 Methodology

1️⃣ Exploratory Data Analysis (EDA)

  • Summary statistics (mean, median, standard deviation, quartiles)
  • Distribution visualization
  • Outlier detection
  • Comparison of fare distributions by payment type

2️⃣ Hypothesis Testing (A/B Testing)

Statistical Hypotheses

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

Alternative Hypothesis (H₁): Customers who pay with credit cards have higher average fares than customers who pay with cash.

Statistical Test: Two-sample t-test Significance Level (α): 0.05


📈 Key Findings

  • Credit card users showed higher average fare amounts compared to cash users.
  • The results were statistically significant, leading to rejection of the null hypothesis.
  • This confirms that payment method influences spending behavior.

💡 Business Insights & Recommendations

🔹 Key Insights

  • Customers paying by credit card tend to spend more.
  • Encouraging cashless payments can increase driver revenue.

🔹 Business Recommendations

  • Promote cashless payments through:

    • In-app incentives
    • Loyalty reward programs
    • Discounts or cashback offers
  • Integrate digital payment promotions into the TLC rider app.

  • Optimize pricing strategies based on payment behavior patterns.


🧠 Skills Demonstrated

  • Exploratory Data Analysis (EDA)
  • A/B Testing
  • Statistical Hypothesis Testing
  • Data Visualization
  • Business Analytics
  • Data-Driven Decision Making

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors