CodeAlpha Task 2 + Task 3

Analysis methodology

A reproducible workflow transforms the Restaurant Tips dataset into findings that are clear enough to support operational decisions.

Before analysis

Meaningful questions

  1. 1.What is the typical total bill, tip amount, and tip percentage?
  2. 2.Do lunch and dinner guests have different spending and tipping patterns?
  3. 3.Which service days show the highest activity and average bills?
  4. 4.How does party size relate to bill value and tip amount?
  5. 5.Are there unusually high bills or unusually low tip percentages?

Cleaning process

Quality controls

  • Standardize variable names and categorical text.
  • Check missing values, duplicates, and numeric validity.
  • Remove invalid non-positive bills and negative tips.
  • Create tip percentage as a derived analytical feature.
  • Use the IQR rule to flag unusual bill values.

Statistical analysis and reporting

Evidence beyond visual impressions

The Python pipeline creates descriptive statistics, grouped summaries, correlation analysis, anomaly checks, and a Welch independent-samples t-test.

Descriptive analysis

Mean, median, spread, minimum, maximum, and grouped metrics establish the overall data profile.

Hypothesis test

A Welch t-test evaluates whether mean dinner and lunch tips differ significantly at alpha = 0.05.

Visual story

Histograms, boxplots, scatter plots, bar charts, and a heatmap make patterns and outliers understandable.

Built with GenMB
Built with GenMB