Walmart Black Friday Spending Analysis
Walmart Black Friday Spending Analysis
html
About
Walmart is an American multinational retail corporation that operates a chain of supercenters, discount departmental stores, and grocery
stores from the United States. Walmart has more than 100 million customers worldwide.
Business Problem
The Management team at Walmart Inc. wants to analyze the customer purchase behavior (specifically, purchase amount) against the
customer’s gender and the various other factors to help the business make better decisions. They want to understand if the spending habits
differ between male and female customers: Do women spend more on Black Friday than men? (Assume 50 million customers are male and 50
million are female).
Out[129… User_ID Product_ID Gender Age Occupation City_Category Stay_In_Current_City_Years Marital_Status Product_Category Purchase
1 of 40 07-11-2024, 06:28 pm
Walmart Case Study Pavithran [Link]
In [131… [Link]
Out[131… 2
<class '[Link]'>
RangeIndex: 550068 entries, 0 to 550067
Data columns (total 10 columns):
# Column Non-Null Count Dtype
--- ------ -------------- -----
0 User_ID 550068 non-null int64
1 Product_ID 550068 non-null object
2 Gender 550068 non-null object
3 Age 550068 non-null object
4 Occupation 550068 non-null int64
5 City_Category 550068 non-null object
6 Stay_In_Current_City_Years 550068 non-null object
7 Marital_Status 550068 non-null int64
8 Product_Category 550068 non-null int64
9 Purchase 550068 non-null int64
dtypes: int64(5), object(5)
memory usage: 42.0+ MB
• By checking the datatype of the dataset. we got 5 integer datatype and 5 object datatype
Out[133… User_ID Product_ID Gender Age Occupation City_Category Stay_In_Current_City_Years Marital_Status Product_Category Purchase
In [134… [Link]()
<class '[Link]'>
RangeIndex: 550068 entries, 0 to 550067
Data columns (total 10 columns):
# Column Non-Null Count Dtype
--- ------ -------------- -----
0 User_ID 550068 non-null object
1 Product_ID 550068 non-null object
2 Gender 550068 non-null object
3 Age 550068 non-null object
4 Occupation 550068 non-null object
5 City_Category 550068 non-null object
6 Stay_In_Current_City_Years 550068 non-null object
7 Marital_Status 550068 non-null object
8 Product_Category 550068 non-null object
9 Purchase 550068 non-null int64
dtypes: int64(1), object(9)
memory usage: 42.0+ MB
2 of 40 07-11-2024, 06:28 pm
Walmart Case Study Pavithran [Link]
Out[137… Purchase
count 550068.000000
mean 9263.968713
std 5023.065394
min 12.000000
25% 5823.000000
50% 8047.000000
75% 12054.000000
max 23961.000000
In [138… [Link](include=object)
Out[138… User_ID Product_ID Gender Age Occupation City_Category Stay_In_Current_City_Years Marital_Status Product_Category
count 550068 550068 550068 550068 550068 550068 550068 550068 550068
freq 1026 1880 414259 219587 72308 231173 193821 324731 150933
Insights:
• User_ID: There are 5,891 unique customers, with the most frequent customer appearing 1,026 times.
• Product_ID: A total of 3,631 unique products were purchased, with the top product being purchased 1,880 times.
• Gender: The majority of customers are male, with "M" appearing 414,259 times.
• Age: The most common age group is 26-35, accounting for 219,587 purchases.
• Occupation: There are 21 different occupations, with the most common one (labeled as "4") having 72,308 entries.
• City_Category: Most customers are from City Category "B," with 231,173 purchases.
• Stay_In_Current_City_Years: The majority of customers have lived in their current city for 1 year, with 193,821 entries.
• Marital_Status: Most customers are unmarried, with a marital status of "0(Unmarried)" appearing 324,731 times.
• Product_Category: There are 20 different product categories, with the most common category (labeled as "5") having 150,933 purchases.
• Purchase: The minimum purchase amount is 12 and the maximum purchase amount is 23961. The mean purchase amount is 9264.
3 of 40 07-11-2024, 06:28 pm
Walmart Case Study Pavithran [Link]
Out[139… User_ID Product_ID Gender Age Occupation City_Category Stay_In_Current_City_Years Marital_Status Product_Category Purchase
Out[140… User_ID Product_ID Gender Age Occupation City_Category Stay_In_Current_City_Years Marital_Status Product_Category Purchase
4 of 40 07-11-2024, 06:28 pm
Walmart Case Study Pavithran [Link]
5 of 40 07-11-2024, 06:28 pm
Walmart Case Study Pavithran [Link]
Column Purchase has a significant difference between mean (9264) and median (8047) and the difference(1217), indicating potenti
al skewness or outliers.
[Link](figsize=(20,15))
6 of 40 07-11-2024, 06:28 pm
Walmart Case Study Pavithran [Link]
Insights:
• For the column Product_Category IQR is 7.0 and Outlier Percentage is 0.75
• For the column Purchase IQR is 6231.0 and Outlier Percentage is 0.49
7 of 40 07-11-2024, 06:28 pm
Walmart Case Study Pavithran [Link]
Univariate Analysis
1. Gender Distribution & Marital_Status Distribution & City_Category Distribution
In [146… [Link](figsize= (15,7))
colors = sns.color_palette("tab10")
[Link](1,3,1)
labels = df["Gender"].value_counts().index
values = df["Gender"].value_counts().values
[Link](values, labels= labels, autopct= "%1.2f%%", explode = (0.10, 0), startangle=90,shadow = True, colors= colors)
[Link]("Gender Distribution")
[Link](1,3,2)
labels = df["Marital_Status"].value_counts().index
values = df["Marital_Status"].value_counts().values
[Link](values, labels= labels, autopct= "%1.2f%%",explode = (0.10, 0),startangle=90,shadow = True, colors= colors)
[Link]("Marital_Status Distribution")
[Link](1,3,3)
labels = df["City_Category"].value_counts().index
values = df["City_Category"].value_counts().values
[Link](values, labels= labels, autopct= "%1.2f%%",explode = (0.10,0.10,0),startangle=135,shadow = True, colors= colors)
[Link]("City_Category Distribution")
[Link]("Distribution of Gender & Marital_Status & City_Category", fontsize = 30)
[Link]()
Insights:
• Gender Distribution: Males dominated purchase behavior during the Black Friday event.
• Marital Status: Unmarried customers led in transaction volume, suggesting targeted marketing opportunities.
• City Category: City B had the highest transactions, followed by City C and City A.
2. Age Distribution
In [147… [Link](figsize=(18,10))
bar = [Link](data = df , x = "Age",hue = "Age",order = df["Age"].value_counts().index, palette = colors)
add_labels(bar)
[Link]("Customer Age Distribution",fontsize = 20)
[Link]()
8 of 40 07-11-2024, 06:28 pm
Walmart Case Study Pavithran [Link]
Age
26-35 0.40
36-45 0.20
18-25 0.18
46-50 0.08
51-55 0.07
55+ 0.04
0-17 0.03
Name: proportion, dtype: float64
Insights:
• The 26-35 age group dominates Walmart's sales with 40%, indicating strong engagement from young and middle-aged adults, who are
likely to seek out deals during sales events.
• The lower proportions of the 46-50 (8%), 51-55 (7%), 55+ (4%), and 0-17 (3%) segments suggest a need for targeted marketing strategies
and tailored product offerings to enhance appeal among older customers and families with children.
3. Occupation Distribution
In [149… [Link](figsize=(18,10))
bar = [Link](data = df , x = "Occupation",hue = "Occupation",order = df["Occupation"].value_counts().index, palette = colors
add_labels(bar)
[Link]("Customer Occupation Distribution",fontsize = 20)
[Link]()
9 of 40 07-11-2024, 06:28 pm
Walmart Case Study Pavithran [Link]
Occupation
4 0.131
0 0.127
7 0.108
1 0.086
17 0.073
20 0.061
12 0.057
14 0.050
2 0.048
16 0.046
6 0.037
3 0.032
10 0.024
5 0.022
15 0.022
11 0.021
19 0.015
13 0.014
18 0.012
9 0.011
8 0.003
Name: proportion, dtype: float64
Insights:
• Customers belonging to Occupation categories 4, 0, and 7 collectively represent around 37% of total purchases, highlighting a significant
affinity for Walmart's offerings among these groups.
• This suggests that individuals in these occupations are likely to prioritize value and convenience, making them key targets for future
marketing strategies.
4. Stay_In_Current_City_Years Distribution
In [151… [Link](figsize=(18,10))
bar = [Link](data = df , x = "Stay_In_Current_City_Years",hue = "Stay_In_Current_City_Years",order = df["Stay_In_Current_City_Yea
add_labels(bar)
[Link]("Customer Stay_In_Current_City_Years Distribution",fontsize = 20)
[Link]()
10 of 40 07-11-2024, 06:28 pm
Walmart Case Study Pavithran [Link]
Stay_In_Current_City_Years
1 0.35
2 0.19
3 0.17
4+ 0.15
0 0.14
Name: proportion, dtype: float64
Insights:
• The majority of customers (35%) have stayed in their current city for 1 year, indicating a transient population that may be more likely to
seek convenience and value in their shopping choices.
• With 19% of customers residing for 2 years and 17% for 3 years, Walmart should consider tailoring marketing efforts to enhance loyalty
among longer-term residents while also addressing the needs of newer customers.
5. Product_Category Distribution
In [153… [Link](figsize=(18,10))
bar = [Link](data = df , x = "Product_Category",hue = "Product_Category",order = df["Product_Category"].value_counts().
add_labels(bar)
[Link]("Customer Product_Category Distribution",fontsize = 20)
[Link]()
11 of 40 07-11-2024, 06:28 pm
Walmart Case Study Pavithran [Link]
Product_Category
5 0.27
1 0.26
8 0.21
11 0.04
2 0.04
6 0.04
3 0.04
4 0.02
16 0.02
15 0.01
13 0.01
10 0.01
12 0.01
7 0.01
18 0.01
20 0.00
19 0.00
14 0.00
17 0.00
9 0.00
Name: proportion, dtype: float64
Insights:
• Categories 5, 1, and 8 dominate the sales landscape, making up nearly 75% of total purchases, indicating a clear consumer preference for
these items and highlighting an opportunity for Walmart to strategically enhance promotions and stock levels in these areas.
6. Purchase Distribution
In [155… [Link](figsize=(18,10))
bar = [Link](data = df , x = "Purchase",bins = 20,kde = True)
[Link][0].set_color("red")
add_labels(bar)
[Link]("Purchase Distribution",fontsize = 20)
[Link]()
12 of 40 07-11-2024, 06:28 pm
Walmart Case Study Pavithran [Link]
Bivariate Analysis
1. Analysis based on Purchase with the other columns
In [156… col = ["Gender","Marital_Status","Stay_In_Current_City_Years","City_Category"]
[Link](figsize = (20,20))
for i , j in enumerate(col):
[Link](3,2,i+1)
[Link](data = df , x = j , y = "Purchase" ,palette = colors)
[Link](f"Purchase Vs {j}",fontsize = 20)
[Link](3,1,3)
[Link](data = df , x = "Age" , y = "Purchase",palette = colors)
[Link]("Purchase Vs Age", fontsize = 20)
[Link]("Analysis Based on Purchase with the Other Columns",fontsize = 30)
plt.tight_layout(rect=[0.0, 0.03, 1, 0.99])
[Link]()
13 of 40 07-11-2024, 06:28 pm
Walmart Case Study Pavithran [Link]
Insights:
• Across gender, marital status, and city categories, the median purchase amount remains consistently similar, with no significant
differences observed.
• The duration of stay in the current city does not appear to influence purchase behavior significantly, as median spending is stable across
different lengths of residence.
• Age groups also show a consistent median purchase amount, suggesting that customer spending habits are relatively uniform across
different age demographics.
[Link](1,2,2)
[Link](data = df[df['Gender'] == 'Female']['Purchase'], color= "Green", bins= 30, kde= True)
[Link]("Female Spending",fontsize = 20)
[Link]("Spending Based on Gender",fontsize = 30)
plt.tight_layout()
[Link]()
14 of 40 07-11-2024, 06:28 pm
Walmart Case Study Pavithran [Link]
[Link](1,2,2)
[Link](data = df[df['Marital_Status'] == 'Married']['Purchase'], color= "Green", bins= 30, kde= True)
[Link]("Married Spending",fontsize = 20)
[Link]("Spending Based on Marital_Status",fontsize = 30)
plt.tight_layout()
[Link]()
[Link](1,2,2)
[Link](data = df[df['Gender'] == 'Female']['Product_Category'], color= "Green", bins= 30, kde= True)
[Link]("Product_Category Based on Female",fontsize = 20)
[Link]("Spending Based on Product_Category",fontsize = 30)
plt.tight_layout()
[Link]()
15 of 40 07-11-2024, 06:28 pm
Walmart Case Study Pavithran [Link]
[Link](1,2,2)
[Link](data = df[df['Marital_Status'] == 'Married']['Product_Category'], color= "Green", bins= 30, kde= True)
[Link]("Product_Category Based on Married",fontsize = 20)
[Link]("Product_Category Based on Marital_Status",fontsize = 30)
plt.tight_layout()
[Link]()
Multivariate Analysis
1. Analysis Based on Purchase & Gender with the other columns
16 of 40 07-11-2024, 06:28 pm
Walmart Case Study Pavithran [Link]
Insights:
• Median spending values are lowest for females aged 18-25, while they increase with age, peaking in the 51-55 age group.
• City category C shows the highest median spending for both females and males, surpassing cities A and B.
• Female spending is slightly lower for those who have lived in their residence for 3 or 0 years, with no significant difference observed in
male spending.
17 of 40 07-11-2024, 06:28 pm
Walmart Case Study Pavithran [Link]
18 of 40 07-11-2024, 06:28 pm
Walmart Case Study Pavithran [Link]
Pair Plot
In [164… [Link](df, hue = "Gender", palette= "husl")
[Link]()
19 of 40 07-11-2024, 06:28 pm
Walmart Case Study Pavithran [Link]
Insight:
• We found that Average Spending Amount of Male(9437.53) is Greater than Average Spending Amount of Female(8734.57)
20 of 40 07-11-2024, 06:28 pm
Walmart Case Study Pavithran [Link]
1. Purchase Vs Gender
In [168… [Link](figsize = (12,6))
[Link](data = df ,x = "Purchase",hue = "Gender",fill = True, palette= "mako")
[Link]("Gender Wise Purchase Distribution")
[Link]()
In [169… [Link]("Gender")["Purchase"].describe()
Gender
• Males also exhibit greater variability in spending, with a higher standard deviation (5092.19) than females (4767.23).
Gender = []
Sample_size = []
Lower_limit = []
Upper_limit = []
Sample_mean = []
CI = []
21 of 40 07-11-2024, 06:28 pm
Walmart Case Study Pavithran [Link]
[Link]("Male")
Sample_size.append(j)
Lower_limit.append(lower_limit_male)
Upper_limit.append(upper_limit_male)
[Link](ci*100)
Sample_mean.append(male_sample_mean)
[Link]("Female")
Sample_size.append(j)
Lower_limit.append(lower_limit_female)
Upper_limit.append(upper_limit_female)
[Link](ci*100)
Sample_mean.append(female_sample_mean)
For Sample Size 300 confidence interval of Male means: (8692.9, 10207.48)
For Sample Size 300 confidence interval of Female means: (8031.54, 9449.48)
For Sample Size 3000 confidence interval of Male means: (9198.37, 9677.31)
For Sample Size 3000 confidence interval of Female means: (8509.44, 8957.84)
For Sample Size 30000 confidence interval of Male means: (9360.77, 9512.23)
For Sample Size 30000 confidence interval of Female means: (8663.66, 8805.44)
22 of 40 07-11-2024, 06:28 pm
Walmart Case Study Pavithran [Link]
For Sample Size 300 confidence interval of Male means: (8858.33, 10010.79)
For Sample Size 300 confidence interval of Female means: (8202.71, 9281.63)
For Sample Size 3000 confidence interval of Male means: (9258.09, 9622.53)
For Sample Size 3000 confidence interval of Female means: (8569.1, 8910.3)
For Sample Size 30000 confidence interval of Male means: (9381.95, 9497.19)
For Sample Size 30000 confidence interval of Female means: (8680.49, 8788.37)
23 of 40 07-11-2024, 06:28 pm
Walmart Case Study Pavithran [Link]
For Sample Size 300 confidence interval of Male means: (8958.41, 9925.59)
For Sample Size 300 confidence interval of Female means: (8292.71, 9198.17)
For Sample Size 3000 confidence interval of Male means: (9280.72, 9586.56)
For Sample Size 3000 confidence interval of Female means: (8585.18, 8871.52)
For Sample Size 30000 confidence interval of Male means: (9388.19, 9484.91)
For Sample Size 30000 confidence interval of Female means: (8688.54, 8779.08)
24 of 40 07-11-2024, 06:28 pm
Walmart Case Study Pavithran [Link]
Insights:
• For both genders, as the sample size increases, the confidence interval becomes narrower, indicating more precision in the estimate of
average purchases.
• The confidence intervals for males and females do not overlap, indicating a clear difference in average purchases.
In [176… Temp = {"Gender" : Gender, "Sample_size": Sample_size ,"Sample_mean" : Sample_mean, "Lower_limit" : Lower_limit , "Upper_limit"
pur_vs_gender = [Link](Temp)
pur_vs_gender["CI_Range"] = pur_vs_gender["Upper_limit"] - pur_vs_gender["Lower_limit"]
pur_vs_gender
25 of 40 07-11-2024, 06:28 pm
Walmart Case Study Pavithran [Link]
Insights:
• Sample Size and Confidence Intervals:
As the sample size increases, confidence intervals for both genders narrow, leading to more precise purchase estimates. For instance, with
a sample size of 30,000, the CI range for males is 96.72, while for females, it is 90.54 at a 90% confidence level.
Males consistently show higher average purchase estimates than females across all confidence levels and sample sizes. For example, at a
95% confidence level with a sample size of 30,000, the average purchase estimate for males is aprox 9400, compared to aprox 8700 for
females.
Develop gender-specific marketing campaigns that cater to the spending habits of each group. Since males tend to spend more on
average, consider offering premium products or bundles targeted towards male customers.
Adjust product offerings and pricing strategies based on the observed spending patterns. For instance, introduce competitive pricing or
discounts on female-oriented products to encourage higher spending among female customers, while maintaining or increasing pricing
on products favored by male customers.
26 of 40 07-11-2024, 06:28 pm
Walmart Case Study Pavithran [Link]
In [178… [Link]("Marital_Status")["Purchase"].describe()
Marital_Status
Insight:
• Both unmarried and married individuals have nearly identical average purchase amounts (9265.91 for unmarried, 9261.17 for married).
• The spending variability is also similar between the two groups, with standard deviations of 5027.35 (unmarried) and 5016.90 (married)
• Not normally distributed data
In [180… MS_Status= []
MS_Sample_Size = []
MS_Lower_limit = []
MS_Upper_limit = []
MS_Sample_mean = []
MS_CI = []
MS_Status.append("Married")
MS_Sample_Size.append(j)
MS_Lower_limit.append(lower_limit_married)
MS_Upper_limit.append(upper_limit_married)
MS_CI.append(ci*100)
27 of 40 07-11-2024, 06:28 pm
Walmart Case Study Pavithran [Link]
MS_Sample_mean.append(married_sample_mean)
MS_Status.append("Unmarried")
MS_Sample_Size.append(j)
MS_Lower_limit.append(lower_limit_unmarried)
MS_Upper_limit.append(upper_limit_unmarried)
MS_CI.append(ci*100)
MS_Sample_mean.append(unmarried_sample_mean)
For Sample Size 300 confidence interval of Married means: (8518.89, 10011.07)
For Sample Size 300 confidence interval of Unmarried means: (8507.92, 10003.18)
For Sample Size 3000 confidence interval of Married means: (9030.61, 9502.51)
For Sample Size 3000 confidence interval of Unmarried means: (9030.77, 9503.65)
For Sample Size 30000 confidence interval of Married means: (9185.68, 9334.92)
For Sample Size 30000 confidence interval of Unmarried means: (9190.52, 9340.08)
28 of 40 07-11-2024, 06:28 pm
Walmart Case Study Pavithran [Link]
For Sample Size 300 confidence interval of Married means: (8679.15, 9814.55)
For Sample Size 300 confidence interval of Unmarried means: (8676.07, 9813.83)
For Sample Size 3000 confidence interval of Married means: (9081.81, 9440.87)
For Sample Size 3000 confidence interval of Unmarried means: (9085.46, 9445.28)
For Sample Size 30000 confidence interval of Married means: (9202.83, 9316.39)
For Sample Size 30000 confidence interval of Unmarried means: (9208.32, 9322.12)
29 of 40 07-11-2024, 06:28 pm
Walmart Case Study Pavithran [Link]
For Sample Size 300 confidence interval of Married means: (8792.23, 9745.09)
For Sample Size 300 confidence interval of Unmarried means: (8798.16, 9753.0)
For Sample Size 3000 confidence interval of Married means: (9113.49, 9414.83)
For Sample Size 3000 confidence interval of Unmarried means: (9110.72, 9412.68)
For Sample Size 30000 confidence interval of Married means: (9213.82, 9309.12)
For Sample Size 30000 confidence interval of Unmarried means: (9218.89, 9314.39)
30 of 40 07-11-2024, 06:28 pm
Walmart Case Study Pavithran [Link]
In [185… temp1 = {"Marital_Status" : MS_Status, "Sample_size": MS_Sample_Size ,"Sample_mean" : MS_Sample_mean, "Lower_limit" : MS_Lower_limit
pur_vs_Mar_s = [Link](temp1)
pur_vs_Mar_s["CI_Range"] = pur_vs_Mar_s["Upper_limit"] - pur_vs_Mar_s["Lower_limit"]
pur_vs_Mar_s
31 of 40 07-11-2024, 06:28 pm
Walmart Case Study Pavithran [Link]
Insights:
• Sample Size and Confidence Intervals:
As the sample size increases, confidence intervals for both married and unmarried groups narrow significantly. For example, at a sample
size of 30,000, the CI range for married individuals is 95.30, and for unmarried individuals, it is 95.50 at 90% confidence.
Across all confidence levels, married and unmarried individuals exhibit nearly identical average purchase estimates. For instance, at a 95%
confidence level with a sample size of 30,000, the average purchase estimates are 9260.40 for married and 9264.88 for unmarried
individuals
Given the nearly identical purchase behavior of married and unmarried individuals, a unified marketing approach targeting both groups
could be effective. Consider broad campaigns that resonate with general consumer behaviors rather than focusing on marital status
distinctions.
To ensure precise and reliable estimates, larger sample sizes should be prioritized in future analyses. This will reduce uncertainty and lead
to more confident decision-making in targeting strategies.
3. Purchase Vs Age
In [186… [Link](figsize = (18,6))
[Link](data = df ,x = "Purchase",hue = "Age",fill = True, palette= "magma")
[Link]("Age Wise Purchase Distribution")
[Link]()
32 of 40 07-11-2024, 06:28 pm
Walmart Case Study Pavithran [Link]
In [187… [Link]("Age")["Purchase"].describe()
Age
Insights:
• Highest Average Spending:
The 51-55 age group has the highest average purchase amount at 9534.81, indicating this group tends to spend more per transaction
compared to other age groups.
The majority of purchases come from the 26-35 age group, with an average spending of 9252.69, showing their significant contribution to
overall sales.
• Distribution Analysis:
The purchase amounts across all age groups are not normally distributed, indicating the need for careful analysis in designing effective
marketing strategies.
for n ,j in enumerate(sample_size):
[Link](3,1,n+1)
33 of 40 07-11-2024, 06:28 pm
Walmart Case Study Pavithran [Link]
data_sample_lower_limit = data_sample_lower_limit.round(2)
data_sample_upper_limit = data_sample_upper_limit.round(2)
Age_Group.append(age)
Age_Sample_size.append(j)
Age_Lower_limit.append(data_sample_lower_limit)
Age_Upper_limit.append(data_sample_upper_limit)
Age_Sample_mean.append(data_sample_mean)
Age_CI.append(ci)
print(f"For Sample Size {j} in Age Group {age} confidence interval of means: ({data_sample_lower_limit}, {data_sample_upper_limit
For Sample Size 300 in Age Group 0-17 confidence interval of means: (8168.13, 9688.33)
For Sample Size 3000 in Age Group 0-17 confidence interval of means: (8693.7, 9174.46)
For Sample Size 30000 in Age Group 0-17 confidence interval of means: (8857.72, 9009.74)
For Sample Size 300 in Age Group 18-25 confidence interval of means: (8413.35, 9910.73)
For Sample Size 3000 in Age Group 18-25 confidence interval of means: (8935.44, 9408.92)
For Sample Size 30000 in Age Group 18-25 confidence interval of means: (9092.98, 9242.74)
For Sample Size 300 in Age Group 26-35 confidence interval of means: (8508.92, 9999.2)
For Sample Size 3000 in Age Group 26-35 confidence interval of means: (9013.43, 9484.71)
For Sample Size 30000 in Age Group 26-35 confidence interval of means: (9176.24, 9325.28)
For Sample Size 300 in Age Group 36-45 confidence interval of means: (8596.43, 10090.41)
For Sample Size 3000 in Age Group 36-45 confidence interval of means: (9092.28, 9564.74)
For Sample Size 30000 in Age Group 36-45 confidence interval of means: (9257.17, 9406.57)
For Sample Size 300 in Age Group 46-50 confidence interval of means: (8473.93, 9951.33)
For Sample Size 3000 in Age Group 46-50 confidence interval of means: (8971.74, 9438.94)
For Sample Size 30000 in Age Group 46-50 confidence interval of means: (9137.02, 9284.76)
For Sample Size 300 in Age Group 51-55 confidence interval of means: (8777.3, 10290.44)
For Sample Size 3000 in Age Group 51-55 confidence interval of means: (9294.46, 9772.94)
For Sample Size 30000 in Age Group 51-55 confidence interval of means: (9458.5, 9609.8)
For Sample Size 300 in Age Group 55+ confidence interval of means: (8616.81, 10107.39)
For Sample Size 3000 in Age Group 55+ confidence interval of means: (9098.08, 9569.46)
For Sample Size 30000 in Age Group 55+ confidence interval of means: (9260.81, 9409.85)
34 of 40 07-11-2024, 06:28 pm
Walmart Case Study Pavithran [Link]
For Sample Size 300 in Age Group 0-17 confidence interval of means: (8346.91, 9503.65)
For Sample Size 3000 in Age Group 0-17 confidence interval of means: (8744.53, 9110.33)
For Sample Size 30000 in Age Group 0-17 confidence interval of means: (8875.38, 8991.06)
For Sample Size 300 in Age Group 18-25 confidence interval of means: (8599.48, 9738.84)
For Sample Size 3000 in Age Group 18-25 confidence interval of means: (8986.88, 9347.16)
For Sample Size 30000 in Age Group 18-25 confidence interval of means: (9112.71, 9226.67)
For Sample Size 300 in Age Group 26-35 confidence interval of means: (8692.66, 9826.62)
For Sample Size 3000 in Age Group 26-35 confidence interval of means: (9073.9, 9432.5)
For Sample Size 30000 in Age Group 26-35 confidence interval of means: (9196.17, 9309.57)
For Sample Size 300 in Age Group 36-45 confidence interval of means: (8764.05, 9900.83)
For Sample Size 3000 in Age Group 36-45 confidence interval of means: (9154.97, 9514.47)
For Sample Size 30000 in Age Group 36-45 confidence interval of means: (9273.57, 9387.25)
For Sample Size 300 in Age Group 46-50 confidence interval of means: (8626.63, 9750.79)
For Sample Size 3000 in Age Group 46-50 confidence interval of means: (9033.43, 9388.93)
For Sample Size 30000 in Age Group 46-50 confidence interval of means: (9151.63, 9264.05)
For Sample Size 300 in Age Group 51-55 confidence interval of means: (8945.79, 10097.15)
For Sample Size 3000 in Age Group 51-55 confidence interval of means: (9349.18, 9713.26)
For Sample Size 30000 in Age Group 51-55 confidence interval of means: (9477.39, 9592.51)
For Sample Size 300 in Age Group 55+ confidence interval of means: (8775.03, 9909.23)
For Sample Size 3000 in Age Group 55+ confidence interval of means: (9156.07, 9514.75)
For Sample Size 30000 in Age Group 55+ confidence interval of means: (9280.65, 9394.05)
35 of 40 07-11-2024, 06:28 pm
Walmart Case Study Pavithran [Link]
For Sample Size 300 in Age Group 0-17 confidence interval of means: (8459.21, 9429.97)
For Sample Size 3000 in Age Group 0-17 confidence interval of means: (8778.07, 9085.07)
For Sample Size 30000 in Age Group 0-17 confidence interval of means: (8884.39, 8981.47)
For Sample Size 300 in Age Group 18-25 confidence interval of means: (8695.51, 9651.69)
For Sample Size 3000 in Age Group 18-25 confidence interval of means: (9016.17, 9318.53)
For Sample Size 30000 in Age Group 18-25 confidence interval of means: (9122.17, 9217.81)
For Sample Size 300 in Age Group 26-35 confidence interval of means: (8782.16, 9733.8)
For Sample Size 3000 in Age Group 26-35 confidence interval of means: (9105.02, 9405.96)
For Sample Size 30000 in Age Group 26-35 confidence interval of means: (9204.6, 9299.78)
For Sample Size 300 in Age Group 36-45 confidence interval of means: (8870.11, 9824.13)
For Sample Size 3000 in Age Group 36-45 confidence interval of means: (9179.21, 9480.91)
For Sample Size 30000 in Age Group 36-45 confidence interval of means: (9284.37, 9379.77)
For Sample Size 300 in Age Group 46-50 confidence interval of means: (8734.25, 9677.67)
For Sample Size 3000 in Age Group 46-50 confidence interval of means: (9056.95, 9355.29)
For Sample Size 30000 in Age Group 46-50 confidence interval of means: (9161.43, 9255.77)
For Sample Size 300 in Age Group 51-55 confidence interval of means: (9039.05, 10005.31)
For Sample Size 3000 in Age Group 51-55 confidence interval of means: (9385.75, 9691.29)
For Sample Size 30000 in Age Group 51-55 confidence interval of means: (9485.61, 9582.23)
For Sample Size 300 in Age Group 55+ confidence interval of means: (8866.81, 9818.65)
For Sample Size 3000 in Age Group 55+ confidence interval of means: (9183.02, 9484.02)
For Sample Size 30000 in Age Group 55+ confidence interval of means: (9288.29, 9383.47)
In [193… temp3 = {"Age_Group" : Age_Group, "Sample_Size" : Age_Sample_size , "Sample_Mean" : Age_Sample_mean ,"Lower_Limit": Age_Lower_limit
Age_Overlap = [Link](temp3)
Age_Overlap["CI Range"] = Age_Overlap["Upper_Limit"] - Age_Overlap["Lower_Limit"]
Age_Overlap
36 of 40 07-11-2024, 06:28 pm
Walmart Case Study Pavithran [Link]
63 rows × 7 columns
Insights:
• Impact of Sample Size on Precision
The data shows that as the sample size increases, the confidence intervals narrow, leading to more precise estimates. For example, for the
age group 18-25 with a sample size of 300, the sample mean is around 9150, with a confidence interval ranging from approximately 8500
to 9700. In contrast, with a sample size of 30000, the confidence interval tightens significantly, indicating more reliable insights.
The age group 51-55 consistently shows the highest spending per transaction across various sample sizes, with a sample mean around
9500. This age group also maintains relatively narrow confidence intervals (e.g., 95% CI ranging from approximately 9380 to 9690),
suggesting stable and higher spending behavior.
The age groups 26-35, 36-45, and 55+ exhibit overlapping confidence intervals, indicating similar spending patterns. For instance, the 55+
age group with a sample size of 3000 shows a mean close to 9330 with a 95% CI ranging from approximately 9180 to 9490, which is
comparable to the 36-45 age group with similar sample sizes and intervals.
The youngest age group (0-17) consistently shows the lowest spending, with a sample mean close to 8930 and a wider confidence
interval. For instance, with a sample size of 30000, the 90% CI ranges from approximately 8880 to 8980, indicating lower and more
variable spending compared to older age groups.
Recommendations:
• Tailored Marketing for High-Spending Age Groups
Given that the 51-55 age group consistently shows the highest spending, consider targeted marketing campaigns offering premium
services, personalized recommendations, or loyalty programs to retain and further engage this demographic.
Since age groups 26-35, 36-45, and 55+ exhibit similar spending patterns, Walmart could optimize product offerings and promotions that
cater specifically to the combined preferences of these age groups, streamlining marketing efforts and inventory management.
The lower spending in the 0-17 age group suggests an opportunity to increase their transaction values. Offering attractive discounts,
rewards, or products that appeal to younger shoppers could help boost their spending and build long-term customer loyalty.
As larger sample sizes yield more precise spending estimates, Walmart should use data from extensive samples to make critical
operational decisions, such as inventory management and pricing strategies, ensuring decisions are based on the most reliable data.
Answering questions:
37 of 40 07-11-2024, 06:28 pm
Walmart Case Study Pavithran [Link]
1. Are women spending more money per transaction than men? Why or Why not
• No. CI's of male and female do not overlap and upper limits of female purchase CI are lesser than lower limits of male purchase CI. This
proves that men usually spend more than women (NOTE: as per data 77% contibutions are from men and only 23% purchases are from
women).
The reason for less purchase by women could have several factors:
2. Confidence intervals and distribution of the mean of the expenses by female and male customers
• For 95% CI in 1000 Iterations
▪ For Sample Size 300 confidence interval of Male means: (8858.33, 10010.79)
▪ For Sample Size 300 confidence interval of Female means: (8202.71, 9281.63)
▪ For Sample Size 3000 confidence interval of Male means: (9258.09, 9622.53)
▪ For Sample Size 3000 confidence interval of Female means: (8569.1, 8910.3)
▪ For Sample Size 30000 confidence interval of Male means: (9381.95, 9497.19)
▪ For Sample Size 30000 confidence interval of Female means: (8680.49, 8788.37)
▪ For Sample Size 300 confidence interval of Male means: (8958.41, 9925.59)
▪ For Sample Size 300 confidence interval of Female means: (8292.71, 9198.17)
▪ For Sample Size 3000 confidence interval of Male means: (9280.72, 9586.56)
▪ For Sample Size 3000 confidence interval of Female means: (8585.18, 8871.52)
▪ For Sample Size 30000 confidence interval of Male means: (9388.19, 9484.91)
▪ For Sample Size 30000 confidence interval of Female means: (8688.54, 8779.08)
▪ For Sample Size 300 confidence interval of Male means: (8692.9, 10207.48)
▪ For Sample Size 300 confidence interval of Female means: (8031.54, 9449.48)
▪ For Sample Size 3000 confidence interval of Male means: (9198.37, 9677.31)
▪ For Sample Size 3000 confidence interval of Female means: (8509.44, 8957.84)
▪ For Sample Size 30000 confidence interval of Male means: (9360.77, 9512.23)
▪ For Sample Size 30000 confidence interval of Female means: (8663.66, 8805.44)
3. Are confidence intervals of average male and female spending overlapping? How can Walmart leverage this
conclusion to make changes or improvements?
• No. Confidence intervals of average male and female spending are not overlapping.
• This trend can be changed via introducing female centric marketing strategies by Walmart so that more female customers are attracted to
increase female purchases to achieve comparable statistics close to 50%.
▪ For Sample Size 300 confidence interval of Married means: (8518.89, 10011.07)
▪ For Sample Size 300 confidence interval of Unmarried means: (8507.92, 10003.18)
▪ For Sample Size 3000 confidence interval of Married means: (9030.61, 9502.51)
▪ For Sample Size 3000 confidence interval of Unmarried means: (9030.77, 9503.65)
▪ For Sample Size 30000 confidence interval of Married means: (9185.68, 9334.92)
▪ For Sample Size 30000 confidence interval of Unmarried means: (9190.52, 9340.08)
▪ For Sample Size 300 confidence interval of Married means: (8679.15, 9814.55)
▪ For Sample Size 300 confidence interval of Unmarried means: (8676.07, 9813.83)
▪ For Sample Size 3000 confidence interval of Married means: (9081.81, 9440.87)
▪ For Sample Size 3000 confidence interval of Unmarried means: (9085.46, 9445.28)
▪ For Sample Size 30000 confidence interval of Married means: (9202.83, 9316.39)
▪ For Sample Size 30000 confidence interval of Unmarried means: (9208.32, 9322.12)
▪ For Sample Size 300 confidence interval of Married means: (8792.23, 9745.09)
38 of 40 07-11-2024, 06:28 pm
Walmart Case Study Pavithran [Link]
▪ For Sample Size 300 confidence interval of Unmarried means: (8798.16, 9753.0)
▪ For Sample Size 3000 confidence interval of Married means: (9113.49, 9414.83)
▪ For Sample Size 3000 confidence interval of Unmarried means: (9110.72, 9412.68)
▪ For Sample Size 30000 confidence interval of Married means: (9213.82, 9309.12)
▪ For Sample Size 30000 confidence interval of Unmarried means: (9218.89, 9314.39)
▪ For Sample Size 300 in Age Group 0-17 confidence interval of means: (8168.13, 9688.33)
▪ For Sample Size 3000 in Age Group 0-17 confidence interval of means: (8693.7, 9174.46)
▪ For Sample Size 30000 in Age Group 0-17 confidence interval of means: (8857.72, 9009.74)
▪ For Sample Size 300 in Age Group 18-25 confidence interval of means: (8413.35, 9910.73)
▪ For Sample Size 3000 in Age Group 18-25 confidence interval of means: (8935.44, 9408.92)
▪ For Sample Size 30000 in Age Group 18-25 confidence interval of means: (9092.98, 9242.74)
▪ For Sample Size 300 in Age Group 26-35 confidence interval of means: (8508.92, 9999.2)
▪ For Sample Size 3000 in Age Group 26-35 confidence interval of means: (9013.43, 9484.71)
▪ For Sample Size 30000 in Age Group 26-35 confidence interval of means: (9176.24, 9325.28)
▪ For Sample Size 300 in Age Group 36-45 confidence interval of means: (8596.43, 10090.41)
▪ For Sample Size 3000 in Age Group 36-45 confidence interval of means: (9092.28, 9564.74)
▪ For Sample Size 30000 in Age Group 36-45 confidence interval of means: (9257.17, 9406.57)
▪ For Sample Size 300 in Age Group 46-50 confidence interval of means: (8473.93, 9951.33)
▪ For Sample Size 3000 in Age Group 46-50 confidence interval of means: (8971.74, 9438.94)
▪ For Sample Size 30000 in Age Group 46-50 confidence interval of means: (9137.02, 9284.76)
▪ For Sample Size 300 in Age Group 51-55 confidence interval of means: (8777.3, 10290.44)
▪ For Sample Size 3000 in Age Group 51-55 confidence interval of means: (9294.46, 9772.94)
▪ For Sample Size 30000 in Age Group 51-55 confidence interval of means: (9458.5, 9609.8)
▪ For Sample Size 300 in Age Group 55+ confidence interval of means: (8616.81, 10107.39)
▪ For Sample Size 3000 in Age Group 55+ confidence interval of means: (9098.08, 9569.46)
▪ For Sample Size 30000 in Age Group 55+ confidence interval of means: (9260.81, 9409.85)
▪ For Sample Size 300 in Age Group 0-17 confidence interval of means: (8346.91, 9503.65)
▪ For Sample Size 3000 in Age Group 0-17 confidence interval of means: (8744.53, 9110.33)
▪ For Sample Size 30000 in Age Group 0-17 confidence interval of means: (8875.38, 8991.06)
▪ For Sample Size 300 in Age Group 18-25 confidence interval of means: (8599.48, 9738.84)
▪ For Sample Size 3000 in Age Group 18-25 confidence interval of means: (8986.88, 9347.16)
▪ For Sample Size 30000 in Age Group 18-25 confidence interval of means: (9112.71, 9226.67)
▪ For Sample Size 300 in Age Group 26-35 confidence interval of means: (8692.66, 9826.62)
▪ For Sample Size 3000 in Age Group 26-35 confidence interval of means: (9073.9, 9432.5)
▪ For Sample Size 30000 in Age Group 26-35 confidence interval of means: (9196.17, 9309.57)
▪ For Sample Size 300 in Age Group 36-45 confidence interval of means: (8764.05, 9900.83)
▪ For Sample Size 3000 in Age Group 36-45 confidence interval of means: (9154.97, 9514.47)
▪ For Sample Size 30000 in Age Group 36-45 confidence interval of means: (9273.57, 9387.25)
▪ For Sample Size 300 in Age Group 46-50 confidence interval of means: (8626.63, 9750.79)
▪ For Sample Size 3000 in Age Group 46-50 confidence interval of means: (9033.43, 9388.93)
▪ For Sample Size 30000 in Age Group 46-50 confidence interval of means: (9151.63, 9264.05)
▪ For Sample Size 300 in Age Group 51-55 confidence interval of means: (8945.79, 10097.15)
▪ For Sample Size 3000 in Age Group 51-55 confidence interval of means: (9349.18, 9713.26)
▪ For Sample Size 30000 in Age Group 51-55 confidence interval of means: (9477.39, 9592.51)
▪ For Sample Size 300 in Age Group 55+ confidence interval of means: (8775.03, 9909.23)
▪ For Sample Size 3000 in Age Group 55+ confidence interval of means: (9156.07, 9514.75)
▪ For Sample Size 30000 in Age Group 55+ confidence interval of means: (9280.65, 9394.05)
▪ For Sample Size 300 in Age Group 0-17 confidence interval of means: (8459.21, 9429.97)
▪ For Sample Size 3000 in Age Group 0-17 confidence interval of means: (8778.07, 9085.07)
▪ For Sample Size 30000 in Age Group 0-17 confidence interval of means: (8884.39, 8981.47)
▪ For Sample Size 300 in Age Group 18-25 confidence interval of means: (8695.51, 9651.69)
▪ For Sample Size 3000 in Age Group 18-25 confidence interval of means: (9016.17, 9318.53)
▪ For Sample Size 30000 in Age Group 18-25 confidence interval of means: (9122.17, 9217.81)
▪ For Sample Size 300 in Age Group 26-35 confidence interval of means: (8782.16, 9733.8)
▪ For Sample Size 3000 in Age Group 26-35 confidence interval of means: (9105.02, 9405.96)
▪ For Sample Size 30000 in Age Group 26-35 confidence interval of means: (9204.6, 9299.78)
▪ For Sample Size 300 in Age Group 36-45 confidence interval of means: (8870.11, 9824.13)
39 of 40 07-11-2024, 06:28 pm
Walmart Case Study Pavithran [Link]
▪ For Sample Size 3000 in Age Group 36-45 confidence interval of means: (9179.21, 9480.91)
▪ For Sample Size 30000 in Age Group 36-45 confidence interval of means: (9284.37, 9379.77)
▪ For Sample Size 300 in Age Group 46-50 confidence interval of means: (8734.25, 9677.67)
▪ For Sample Size 3000 in Age Group 46-50 confidence interval of means: (9056.95, 9355.29)
▪ For Sample Size 30000 in Age Group 46-50 confidence interval of means: (9161.43, 9255.77)
▪ For Sample Size 300 in Age Group 51-55 confidence interval of means: (9039.05, 10005.31)
▪ For Sample Size 3000 in Age Group 51-55 confidence interval of means: (9385.75, 9691.29)
▪ For Sample Size 30000 in Age Group 51-55 confidence interval of means: (9485.61, 9582.23)
▪ For Sample Size 300 in Age Group 55+ confidence interval of means: (8866.81, 9818.65)
▪ For Sample Size 3000 in Age Group 55+ confidence interval of means: (9183.02, 9484.02)
▪ For Sample Size 30000 in Age Group 55+ confidence interval of means: (9288.29, 9383.47)
Overall Recommendations
1. Target High-Spending Demographics
• Male Customers: Men consistently spend more than women on average. Focus on retaining male customers by offering tailored
promotions and exclusive deals, particularly in categories where they spend the most.
• Unmarried Customers: Unmarried customers also tend to spend more. Prioritize acquiring and retaining this group with targeted
marketing and special offers.
• Ages 18-45: Customers in this age range are responsible for the majority of sales. Tailor product offerings, promotions, and marketing
efforts to cater specifically to their preferences. Consider offering exclusive deals on products popular among this demographic.
• Ages 51-55: This age group has the highest spending per transaction. Enhance their shopping experience with personalized
recommendations, loyalty programs, and exclusive pre-sale access to drive further engagement and spending.
• Popular Product Categories: Focus on promoting products in the top-performing categories (e.g., categories 1, 5, 8, and 11). Consider
bundling these products with less popular items to boost overall sales.
• City-Specific Strategy: Male customers in City Category C spend more than those in other cities. Tailor promotions and product offerings
specifically for this region to maximize revenue.
• Younger Shoppers (0-17): Increase spending among this group by offering engaging activities, such as in-store games or special
discounts. Building brand loyalty at a young age can lead to long-term customer retention.
• Female Customers: Since women tend to spend less, create promotions and offers specifically tailored to their needs and preferences.
Offering additional discounts or rewards programs may encourage higher spending.
5. Post-Purchase Engagement
• Post-Sale Strategy: After major sales events like Black Friday, follow up with customers through personalized emails, offering related
products or special discounts. This will help increase customer retention and encourage repeat business beyond the holiday season.
40 of 40 07-11-2024, 06:28 pm
To enhance customer loyalty, Walmart could develop targeted loyalty programs and tailored marketing campaigns based on consumer insights such as occupational categories, gender, and age demographics . For instance, focusing on value and convenience, which are priorities for transient populations, can attract and retain customers who have recently moved . For long-term and higher-spending age groups, loyalty rewards and exclusive promotions tailored to specific interests can deepen engagement. Leveraging data on spending variability, especially among male customers, can personalize offers that appeal to different spending profiles, thus fostering greater loyalty .
Spending analysis indicates no substantial difference between the spending of single and married customers. Both groups exhibit similar median purchase amounts, with no significant variance noted in the spending patterns based on marital status . Therefore, marital status appears to exert a minimal influence on overall spending behaviors, suggesting that marketing strategies could treat these groups similarly without risk of missing differentiated opportunities .
The analysis indicates that the duration of stay does not substantially influence purchase behavior, as median spending remains stable across different lengths of residency . However, further analysis shows that females who have lived in their residence for 3 or 0 years exhibit slightly lower spending, whereas no significant difference is observed among male customers . This indicates that while residency duration alone does not markedly change purchasing patterns, it may have gender-specific effects that warrant deeper exploration for nuanced marketing strategies.
35% of Walmart's customers have stayed in their current city for just 1 year, which suggests a highly transient population . This demographic may be more inclined towards seeking convenience and value in their purchases. Given this trend, Walmart should focus on marketing strategies that emphasize convenience and appeal to new residents, while also developing initiatives to build loyalty among longer-term residents who make up 51% of the customer base (2 to 4+ years).
City Category C shows the highest median spending among both females and males, suggesting a higher consumer purchasing capacity or demand within this area . This indicates that City C could stand out as a strategic focal point for expanding or enhancing Walmart's offerings. Investments in market-specific promotions and an increased stock of popular items could capitalize on the heightened spending capacity. Further, Walmart could explore opportunities to open more stores or improve existing infrastructure in these areas to meet the demands of higher-spending segments, leveraging the potential for increased revenue .
Purchase behaviors show that females in the age group 18-25 have the lowest median spending, which increases with age, peaking in the 51-55 age group . City Category C users spend the most on average compared to other city categories . Gender analysis reveals that males spend more on average than females, with corresponding spending values being $,9437.53 for males and $8,734.57 for females, respectively . These insights suggest differentiated marketing strategies to target specific age and gender groups effectively.
Males exhibit greater variability in spending with a standard deviation of 5092.19, compared to females at 4767.23 . This indicates that male customers have more diverse spending patterns, potentially influenced by a wider range of purchasing power or product preferences. Understanding this variability is crucial for tailoring marketing messages and promotions that cater to variability in male spending behaviors. Additionally, these insights can help in designing product assortments that capture the interest of male shoppers across different spending capacities .
The confidence intervals provided for different age groups illustrate the expected range of spending and can be instrumental in shaping marketing and promotions. For instance, the highest confidence intervals in older age brackets (51-55) suggest targeted promotions for products appealing to this demographic may enhance sales . Understanding these statistical boundaries helps in identifying age segments with high spending certainty and those with potential growth areas. Marketing campaigns can be better timed and customized by using these insights, resulting in campaigns that efficiently use resources while maximizing impact .
Product categories 5, 1, and 8 account for nearly 75% of Walmart's purchases, indicating strong consumer preferences for these items . This dominance suggests that Walmart could benefit from focusing their inventory management on these categories by ensuring sufficient stock levels to meet demand. Additionally, strategic promotions in these areas could drive increased sales volumes and capture greater market share .
Occupation categories 4, 0, and 7 collectively represent around 37% of total purchases at Walmart, indicating a significant customer base affinity for its offerings . This suggests that individuals in these occupations prioritize value and convenience, making them important targets for marketing strategies. Walmart can leverage this insight by tailoring marketing campaigns and product offerings to meet the needs and preferences of these occupational groups, potentially enhancing customer loyalty and increasing market share .