SlideShare a Scribd company logo
1 of 7
Step By Step Analyzing Price Elasticity
With Feature Promotion Against Purchase Probability
By Rahmat Taufiq Sigit
INTRODUCTION
One of marketing activities that very important is promoting. Product or Services are introduced to
the market by promitional activities. So the main goal of promotional activites is so that products or
services are known by the market and in increase sales.
Because of this very important promotion objective, companies need a lot of money to make
promotional successful. However, this also make the company have to do some research to
determine what kind of promoition strategy can be used.
Price elasticity means how much the probability of purchase for the product or services to the price
increment. On this occasion, we will discuss step by step analyzing product prices against purchase
probabilities with promotional features.
This research is to find out whether promotional activities give better results than no promotional
activities and how much it effects to purchase probability.
The source of this research data comes from the minimarket transaction database. And the product
that will be discussed is chocolate bar. So let’s begin
DATASET
Variable Data type Range Description
ID numerical Integer Shows a unique identificator of a customer.
Day numerical Integer Day when the customer has visited the store
Incidence categorical {0,1} Purchase Incidence
0 The customer has not purchased an item from the category of interest
1 The customer has purchased an item from the category of interest
Brand categorical {0,1,2,3,4,5} Shows which brand the customer has purchased
0 No brand was purchased
1,2,3,4,5 Brand ID
Quantity numerical integer Number of items bought by the customer from the product category of interest
Last_Inc_Brand categorical {0,1,2,3,4,5} Shows which brand the customer has purchased on their previous store visit
0 No brand was purchased
1,2,3,4,5 Brand ID
Last_Inc_Quantity numerical integer
Number of items bought by the customer from the product category of interest during
their previous store visit
Price_1 numerical real Price of an item from Brand 1 on a particular day
Price_2 numerical real Price of an item from Brand 2 on a particular day
Price_3 numerical real Price of an item from Brand 3 on a particular day
Price_4 numerical real Price of an item from Brand 4 on a particular day
Price_5 numerical real Price of an item from Brand 5 on a particular day
Promotion_1 categorical {0,1} Indicator whether Brand 1 was on promotion or not on a particular day
0 There is no promotion
1 There is promotion
Promotion_2 categorical {0,1} Indicator of whether Brand 2 was on promotion or not on a particular day
0 There is no promotion
1 There is promotion
Promotion_3 categorical {0,1} Indicator of whether Brand 3 was on promotion or not on a particular day
0 There is no promotion
1 There is promotion
Promotion_4 categorical {0,1} Indicator of whether Brand 4 was on promotion or not on a particular day
0 There is no promotion
1 There is promotion
Promotion_5 categorical {0,1} Indicator of whether Brand 5 was on promotion or not on a particular day
0 There is no promotion
1 There is promotion
Sex categorical {0,1}
Biological sex (gender) of a customer. In this dataset there are only 2 different
options.
0 male
1 female
Marital status categorical {0,1} Marital status of a customer.
0 single
1 non-single (divorced / separated / married / widowed)
Age numerical Integer
The age of the customer in years, calculated as current year minus the year of birth of
the customer at the time of creation of the dataset
18 Min value (the lowest age observed in the dataset)
75 Max value (the highest age observed in the dataset)
Education categorical {0,1,2,3} Level of education of the customer
0 other / unknown
1 high school
2 university
3 graduate school
Income numerical real Self-reported annual income in US dollars of the customer.
38247 Min value (the lowest income observed in the dataset)
309364 Max value (the highest income observed in the dataset)
Occupation categorical {0,1,2} Category of occupation of the customer.
0 unemployed / unskilled
1 skilled employee / official
2 management / self-employed / highly qualified employee / officer
Settlement size categorical {0,1,2} The size of the city that the customer lives in.
0 small city
1 mid-sized city
2 big city
In Dataset structure there are 24 coulumn (feature), however, not all of the feature will be used.
These features are Incidence, Price_1, Price_2, Price_3, Price_4, Price_5, Promotion_1,
Promotion_2, Promotion_3, Promotion_4, Promotion_5
IMPORT PACKAGES
import numpy as np
import pandas as pd
from sklearn.linear_model import LogisticRegression
import matplotlib.pyplot as plt
import matplotlib.axes as axs
import seaborn as sns
sns.set()
The codes above are used to import library that will be neded in data processing.
LOAD DATASET
Next step is accessing the dataset from data folder with these codes below
df_purchase = pd.read_csv("data/purchase data.csv")
df_pa=df_purchase
PRICE CHANGES SIMULATION
This step is try to make dummy price dataset. This data will be used in linier regression model.
Before that, let’s do some descriptive analyzing the price dataset.
df_pa[['Price_1','Price_2','Price_3','Price_4','Price_5']].describe()
the result of the code above, can be seen in the image below :
The image above shows the price dataset has 5.8693 rows, minimum prices is $1,1 anda max price is
$2,8.
After knowing the min and max price, then lets create a dummy price range with approximately the
same ratio using codes below:
price_range = np.arange(0.5,3.5,0.01)
price_range
the price range dataset is set with a minimum value is 0.5 and maximal value is 5.0 with 0.1
increament. Value 0,1 of increament is to make the dummy dataset that can describe the movement
of price and pribability in every $0,1.
and the result can be seen in the image below:
Put the dummy price to a dataframe with these codes below:
df_price_elasticities = pd.DataFrame(price_range)
Rename the first feature of data df_price_elasticities from 0 to “Price Range” and display the
dataframe using codes below
df_price_elasticities = df_price_elasticities.rename({0:'Price Range'}, axis=1)
df_price_elasticities
The result of the codes above are below:
DETERMINE X AND Y VALUE FOR LINIER REGRESSION MODEL
This research using 3 feature, the features are price, promotion against probability of purchase. So
the algorithm that will be used is multinomial linier regression, which has two X values (Factors). X
value is price and promotion and Y value is incidence.
The code below is to determine Y value:
Y = df_pa['Incidence']
The codes below are used to define mean of price as X1 and mean of promotion as X2. And safe both
of X into dataframe named X
X = pd.DataFrame()
X['Mean_price'] = (df_pa['Price_1']+
df_pa['Price_2']+
df_pa['Price_3']+
df_pa['Price_4']+
df_pa['Price_5']
)/5
X['Mean_promotion'] = (df_pa['Promotion_1']+
df_pa['Promotion_2']+
df_pa['Promotion_3']+
df_pa['Promotion_4']+
df_pa['Promotion_5']
)/5
X
The result of the codes above are below:
MODEL ESTIMATION
Define the multinomial linier reggression using these codes below:
model_incidence_promotions = LogisticRegression(solver='sag')
model_incidence_promotions.fit(X,Y)
model_incidence_promotions.coef_
And the koefisien result are :
array([[-1.49403391, 0.56165343]])
Koefisien of price is -1,4 it means that price and purchase have a negatif relation, which is purchase
probability increase if the price decrees. Otherwise, Promotion is positif relation with 0,56 koefisien
value. the model quantified the exact relation between price, promotion and purchase probability
CALCULATE PRICE ELASTICITY WITH PROMOTION
First step of this phase is to make new dataframe with first column (feature) is price range using
these codes below:
df_price_elasticities_promotion=pd.DataFrame(price_range)
df_price_elasticities_promotion=df_price_elasticities_promotion.rename({0:'Price
Range'}, axis=1)
Second step is to add new column named promotion with 1 value. By using these code below:
df_price_elasticities_promotion['promotion']=1
df_price_elasticities_promotion
The Result can be seen in the picture below:
The third step is to predict the promotion of Y using the estimated model that has been made before
using the codes below:
Y_promotion=model_incidence_promotions.predict_proba(df_price_elasticities_promotio
n)
The Result can be seen in the picture below:
The result if Y predict promotion is second column.
The forth step for this phase is to calculate the price elasticity and store it to dataset called
df_price_elasticities, by using these codes below:
promo = Y_promotion[:,1]
pe_promo= model_incidence_promotions.coef_[:,0]*price_range*(1-promo)
df_price_elasticities['elasticity_promo_1']=pe_promo
CALCULATE PRICE ELASTICITY WITH NO PROMOTION
First step of this phase is to make new dataframe with first column (feature) is price range using
these codes below:
df_price_elasticities_no_promotion = pd.DataFrame(price_range)
df_price_elasticities_no_promotion =
df_price_elasticities_no_promotion.rename({0:'Price Range'}, axis=1)
Second step is to add new column named no_promotion with 0 value. By using these code below:
df_price_elasticities_no_promotion['no_promotion']=0
df_price_elasticities_no_promotion
The Result can be seen in the picture below:
The third step is to predict the no promotion of Y using the estimated model that has been made
before using the codes below:
Y_no_promotion=model_incidence_promotions.predict_proba(df_price_elasticities_no_pr
omotion)
The forth step for this phase is to calculate the price elasticity and store it to dataset called
df_price_elasticities, by using these codes below:
no_promo = Y_no_promotion[:,1]
pe_no_promo= model_incidence_promotions.coef_[:,0]*price_range*(1-no_promo)
df_price_elasticities['elasticity_no_promo']=pe_no_promo
df_price_elasticities
The Result of price elasticity for promotion can be seen in the picture below:
The Result of price elasticity for no promotion can be seen in the picture below:
If the value is above 100% (>1), it means that the probability is elastic, and if the value is below 100%
(<1), it means the probability is inelastic.
Comparing Promotion Vs No Promotion
The last phase is to make graph and describe data clearly using codes below:
plt.figure(figsize=(9,6))
plt.plot(price_range,pe_promo, color='grey')
plt.plot(price_range,pe_no_promo, color='green')
plt.legend(['Promotion', 'No Promotion'])
plt.xlabel('Price')
plt.ylabel('Elasticities')
plt.title('Price Elasticities With Promo and No Promo to Purchase Probability')
The Result can be seen in the picture below:
The price elasticity of the Promotion is $1.46 with pruchase probability 1.002 and Non Promotion
$1.27 with a purchase probability level of 1.003. It can be seen that there is a price difference of
around $0.2. Price sensitivity decreases when there is a promotion. The conclusion is the chocolate
bar product price can be increased to maximal $0,2 if the product followed by promotion feature.
Increasing chocolate bar price above $0,2, purchase probability will go decrease.
And It would be better to have high original prices with consistent promotions than low original
prices but no promotions.

More Related Content

Similar to Analyzing Price Elasticity Against Purchase Probability

Final Project Report - Walmart Sales
Final Project Report - Walmart SalesFinal Project Report - Walmart Sales
Final Project Report - Walmart SalesDeepti Bahel
 
Marketing Mix Template
Marketing Mix TemplateMarketing Mix Template
Marketing Mix TemplateDataCaptive
 
DF16 Imprivata - Getting Started with Formulas
DF16 Imprivata - Getting Started with FormulasDF16 Imprivata - Getting Started with Formulas
DF16 Imprivata - Getting Started with FormulasChristophe Rustici
 
BIG MART SALES PRIDICTION PROJECT.pptx
BIG MART SALES PRIDICTION PROJECT.pptxBIG MART SALES PRIDICTION PROJECT.pptx
BIG MART SALES PRIDICTION PROJECT.pptxLSURYAPRAKASHREDDY
 
Sap sd important interview concepts
Sap sd important interview concepts Sap sd important interview concepts
Sap sd important interview concepts Mohit Amitabh
 
Company Enter Company name hereCampaign Enter Ca.docx
Company  Enter Company name hereCampaign  Enter Ca.docxCompany  Enter Company name hereCampaign  Enter Ca.docx
Company Enter Company name hereCampaign Enter Ca.docxmccormicknadine86
 
Wooing the Best Bank Deposit Customers
Wooing the Best Bank Deposit CustomersWooing the Best Bank Deposit Customers
Wooing the Best Bank Deposit CustomersLucinda Linde
 
Using big data to make better pricing decisions
Using big data to make better pricing decisionsUsing big data to make better pricing decisions
Using big data to make better pricing decisionsNicha Tatsaneeyapan
 
Webinar: Pricing a Data Product by fmr Salesforce Sr PM
Webinar: Pricing a Data Product by fmr Salesforce Sr PMWebinar: Pricing a Data Product by fmr Salesforce Sr PM
Webinar: Pricing a Data Product by fmr Salesforce Sr PMProduct School
 
The Customer Experience and Value Creation Chapter 4 O.docx
The Customer Experience and Value Creation Chapter 4 O.docxThe Customer Experience and Value Creation Chapter 4 O.docx
The Customer Experience and Value Creation Chapter 4 O.docxtodd241
 
Marketing management assessment
Marketing management assessmentMarketing management assessment
Marketing management assessmentNovoraj Roy
 
Sales Automation Process in Microsoft Dynamics CRM
Sales Automation Process in Microsoft Dynamics CRM Sales Automation Process in Microsoft Dynamics CRM
Sales Automation Process in Microsoft Dynamics CRM Naveen Kumar
 
ContentsPhase 1 Design Concepts2Project Description2Use.docx
ContentsPhase 1 Design Concepts2Project Description2Use.docxContentsPhase 1 Design Concepts2Project Description2Use.docx
ContentsPhase 1 Design Concepts2Project Description2Use.docxmaxinesmith73660
 
How SAP SD is integrated with SAP Finance?
How SAP SD is integrated with SAP Finance?How SAP SD is integrated with SAP Finance?
How SAP SD is integrated with SAP Finance?Intelligroup, Inc.
 

Similar to Analyzing Price Elasticity Against Purchase Probability (20)

Final Project Report - Walmart Sales
Final Project Report - Walmart SalesFinal Project Report - Walmart Sales
Final Project Report - Walmart Sales
 
PLA - Dashboard
PLA - DashboardPLA - Dashboard
PLA - Dashboard
 
Marketing Mix Template
Marketing Mix TemplateMarketing Mix Template
Marketing Mix Template
 
DF16 Imprivata - Getting Started with Formulas
DF16 Imprivata - Getting Started with FormulasDF16 Imprivata - Getting Started with Formulas
DF16 Imprivata - Getting Started with Formulas
 
BIG MART SALES.pptx
BIG MART SALES.pptxBIG MART SALES.pptx
BIG MART SALES.pptx
 
BIG MART SALES PRIDICTION PROJECT.pptx
BIG MART SALES PRIDICTION PROJECT.pptxBIG MART SALES PRIDICTION PROJECT.pptx
BIG MART SALES PRIDICTION PROJECT.pptx
 
Sap sd important interview concepts
Sap sd important interview concepts Sap sd important interview concepts
Sap sd important interview concepts
 
Company Enter Company name hereCampaign Enter Ca.docx
Company  Enter Company name hereCampaign  Enter Ca.docxCompany  Enter Company name hereCampaign  Enter Ca.docx
Company Enter Company name hereCampaign Enter Ca.docx
 
Data warehousing
Data warehousingData warehousing
Data warehousing
 
Wooing the Best Bank Deposit Customers
Wooing the Best Bank Deposit CustomersWooing the Best Bank Deposit Customers
Wooing the Best Bank Deposit Customers
 
Using big data to make better pricing decisions
Using big data to make better pricing decisionsUsing big data to make better pricing decisions
Using big data to make better pricing decisions
 
Webinar: Pricing a Data Product by fmr Salesforce Sr PM
Webinar: Pricing a Data Product by fmr Salesforce Sr PMWebinar: Pricing a Data Product by fmr Salesforce Sr PM
Webinar: Pricing a Data Product by fmr Salesforce Sr PM
 
The Customer Experience and Value Creation Chapter 4 O.docx
The Customer Experience and Value Creation Chapter 4 O.docxThe Customer Experience and Value Creation Chapter 4 O.docx
The Customer Experience and Value Creation Chapter 4 O.docx
 
Market Pricing
Market PricingMarket Pricing
Market Pricing
 
Costing and pricing
Costing and pricingCosting and pricing
Costing and pricing
 
Marketing management assessment
Marketing management assessmentMarketing management assessment
Marketing management assessment
 
Sales Automation Process in Microsoft Dynamics CRM
Sales Automation Process in Microsoft Dynamics CRM Sales Automation Process in Microsoft Dynamics CRM
Sales Automation Process in Microsoft Dynamics CRM
 
ContentsPhase 1 Design Concepts2Project Description2Use.docx
ContentsPhase 1 Design Concepts2Project Description2Use.docxContentsPhase 1 Design Concepts2Project Description2Use.docx
ContentsPhase 1 Design Concepts2Project Description2Use.docx
 
How SAP SD is integrated with SAP Finance?
How SAP SD is integrated with SAP Finance?How SAP SD is integrated with SAP Finance?
How SAP SD is integrated with SAP Finance?
 
Business math (1)
Business math (1)Business math (1)
Business math (1)
 

More from Rahmat Taufiq Sigit

customer_clustering_aquisition.pdf
customer_clustering_aquisition.pdfcustomer_clustering_aquisition.pdf
customer_clustering_aquisition.pdfRahmat Taufiq Sigit
 
Learn to-use-google-data-studio-jan22
Learn to-use-google-data-studio-jan22Learn to-use-google-data-studio-jan22
Learn to-use-google-data-studio-jan22Rahmat Taufiq Sigit
 
Kisah Tentang Upaya Pencapaian Sebuah Visi (Bagian 2)
Kisah Tentang Upaya Pencapaian Sebuah Visi (Bagian 2)Kisah Tentang Upaya Pencapaian Sebuah Visi (Bagian 2)
Kisah Tentang Upaya Pencapaian Sebuah Visi (Bagian 2)Rahmat Taufiq Sigit
 
Membuat aplikasi sistem informasi geografis dengan visual basic & MySQL
Membuat aplikasi sistem informasi geografis dengan visual basic & MySQLMembuat aplikasi sistem informasi geografis dengan visual basic & MySQL
Membuat aplikasi sistem informasi geografis dengan visual basic & MySQLRahmat Taufiq Sigit
 
[E book finan siap] buku pintar finansial - pengelolaan keuangan untuk umkm
[E book finan siap] buku pintar finansial - pengelolaan keuangan untuk umkm[E book finan siap] buku pintar finansial - pengelolaan keuangan untuk umkm
[E book finan siap] buku pintar finansial - pengelolaan keuangan untuk umkmRahmat Taufiq Sigit
 
7 teknik bicara bangun personal branding jamil azzaini
7 teknik bicara bangun personal branding jamil azzaini7 teknik bicara bangun personal branding jamil azzaini
7 teknik bicara bangun personal branding jamil azzainiRahmat Taufiq Sigit
 
Society For Human Resource Management
Society For Human Resource ManagementSociety For Human Resource Management
Society For Human Resource ManagementRahmat Taufiq Sigit
 
Penyusunan Protofolio Layanan Dalam Property Management
Penyusunan Protofolio Layanan Dalam Property ManagementPenyusunan Protofolio Layanan Dalam Property Management
Penyusunan Protofolio Layanan Dalam Property ManagementRahmat Taufiq Sigit
 
Kisah Tentang Usaha Menwujudkan Sebuah Visi
Kisah Tentang Usaha Menwujudkan Sebuah VisiKisah Tentang Usaha Menwujudkan Sebuah Visi
Kisah Tentang Usaha Menwujudkan Sebuah VisiRahmat Taufiq Sigit
 
Commercial real-estate-for-beginners
Commercial real-estate-for-beginnersCommercial real-estate-for-beginners
Commercial real-estate-for-beginnersRahmat Taufiq Sigit
 

More from Rahmat Taufiq Sigit (20)

customer_clustering_aquisition.pdf
customer_clustering_aquisition.pdfcustomer_clustering_aquisition.pdf
customer_clustering_aquisition.pdf
 
Property-Management-Basic.pdf
Property-Management-Basic.pdfProperty-Management-Basic.pdf
Property-Management-Basic.pdf
 
Learn to-use-google-data-studio-jan22
Learn to-use-google-data-studio-jan22Learn to-use-google-data-studio-jan22
Learn to-use-google-data-studio-jan22
 
Kisah Tentang Upaya Pencapaian Sebuah Visi (Bagian 2)
Kisah Tentang Upaya Pencapaian Sebuah Visi (Bagian 2)Kisah Tentang Upaya Pencapaian Sebuah Visi (Bagian 2)
Kisah Tentang Upaya Pencapaian Sebuah Visi (Bagian 2)
 
Membuat aplikasi sistem informasi geografis dengan visual basic & MySQL
Membuat aplikasi sistem informasi geografis dengan visual basic & MySQLMembuat aplikasi sistem informasi geografis dengan visual basic & MySQL
Membuat aplikasi sistem informasi geografis dengan visual basic & MySQL
 
[E book finan siap] buku pintar finansial - pengelolaan keuangan untuk umkm
[E book finan siap] buku pintar finansial - pengelolaan keuangan untuk umkm[E book finan siap] buku pintar finansial - pengelolaan keuangan untuk umkm
[E book finan siap] buku pintar finansial - pengelolaan keuangan untuk umkm
 
Tutorial Microsoft Project
Tutorial Microsoft ProjectTutorial Microsoft Project
Tutorial Microsoft Project
 
Paparan SLF 2018 Pemprov DKI
Paparan SLF 2018 Pemprov DKIPaparan SLF 2018 Pemprov DKI
Paparan SLF 2018 Pemprov DKI
 
Hsem combined.pdf
Hsem combined.pdfHsem combined.pdf
Hsem combined.pdf
 
Rahasia jawaban wawancara kerja
Rahasia jawaban wawancara kerjaRahasia jawaban wawancara kerja
Rahasia jawaban wawancara kerja
 
7 teknik bicara bangun personal branding jamil azzaini
7 teknik bicara bangun personal branding jamil azzaini7 teknik bicara bangun personal branding jamil azzaini
7 teknik bicara bangun personal branding jamil azzaini
 
Society For Human Resource Management
Society For Human Resource ManagementSociety For Human Resource Management
Society For Human Resource Management
 
Penyusunan Protofolio Layanan Dalam Property Management
Penyusunan Protofolio Layanan Dalam Property ManagementPenyusunan Protofolio Layanan Dalam Property Management
Penyusunan Protofolio Layanan Dalam Property Management
 
Kisah Tentang Usaha Menwujudkan Sebuah Visi
Kisah Tentang Usaha Menwujudkan Sebuah VisiKisah Tentang Usaha Menwujudkan Sebuah Visi
Kisah Tentang Usaha Menwujudkan Sebuah Visi
 
Presentasi diklat-pu-2017-b
Presentasi diklat-pu-2017-bPresentasi diklat-pu-2017-b
Presentasi diklat-pu-2017-b
 
Form kosong-allinone
Form kosong-allinoneForm kosong-allinone
Form kosong-allinone
 
Fg all-in-one-job-analysis-form
Fg all-in-one-job-analysis-formFg all-in-one-job-analysis-form
Fg all-in-one-job-analysis-form
 
Laporan pp kom q4 2016
Laporan pp kom q4 2016Laporan pp kom q4 2016
Laporan pp kom q4 2016
 
Bm toolkit
Bm toolkitBm toolkit
Bm toolkit
 
Commercial real-estate-for-beginners
Commercial real-estate-for-beginnersCommercial real-estate-for-beginners
Commercial real-estate-for-beginners
 

Recently uploaded

1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样vhwb25kk
 
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptxEMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptxthyngster
 
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130Suhani Kapoor
 
Dubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls DubaiDubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls Dubaihf8803863
 
9654467111 Call Girls In Munirka Hotel And Home Service
9654467111 Call Girls In Munirka Hotel And Home Service9654467111 Call Girls In Munirka Hotel And Home Service
9654467111 Call Girls In Munirka Hotel And Home ServiceSapana Sha
 
Industrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdfIndustrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdfLars Albertsson
 
Call Girls In Dwarka 9654467111 Escorts Service
Call Girls In Dwarka 9654467111 Escorts ServiceCall Girls In Dwarka 9654467111 Escorts Service
Call Girls In Dwarka 9654467111 Escorts ServiceSapana Sha
 
From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...Florian Roscheck
 
Brighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingBrighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingNeil Barnes
 
Data Science Jobs and Salaries Analysis.pptx
Data Science Jobs and Salaries Analysis.pptxData Science Jobs and Salaries Analysis.pptx
Data Science Jobs and Salaries Analysis.pptxFurkanTasci3
 
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一F sss
 
Schema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfSchema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfLars Albertsson
 
RadioAdProWritingCinderellabyButleri.pdf
RadioAdProWritingCinderellabyButleri.pdfRadioAdProWritingCinderellabyButleri.pdf
RadioAdProWritingCinderellabyButleri.pdfgstagge
 
Customer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptxCustomer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptxEmmanuel Dauda
 
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...dajasot375
 
04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationships04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationshipsccctableauusergroup
 

Recently uploaded (20)

1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
1:1定制(UQ毕业证)昆士兰大学毕业证成绩单修改留信学历认证原版一模一样
 
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptxEMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM  TRACKING WITH GOOGLE ANALYTICS.pptx
EMERCE - 2024 - AMSTERDAM - CROSS-PLATFORM TRACKING WITH GOOGLE ANALYTICS.pptx
 
VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...
VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...
VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...
 
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
VIP Call Girls Service Miyapur Hyderabad Call +91-8250192130
 
Dubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls DubaiDubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls Dubai
 
9654467111 Call Girls In Munirka Hotel And Home Service
9654467111 Call Girls In Munirka Hotel And Home Service9654467111 Call Girls In Munirka Hotel And Home Service
9654467111 Call Girls In Munirka Hotel And Home Service
 
Industrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdfIndustrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdf
 
Call Girls In Dwarka 9654467111 Escorts Service
Call Girls In Dwarka 9654467111 Escorts ServiceCall Girls In Dwarka 9654467111 Escorts Service
Call Girls In Dwarka 9654467111 Escorts Service
 
꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
 
From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...
 
Call Girls in Saket 99530🔝 56974 Escort Service
Call Girls in Saket 99530🔝 56974 Escort ServiceCall Girls in Saket 99530🔝 56974 Escort Service
Call Girls in Saket 99530🔝 56974 Escort Service
 
Brighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingBrighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data Storytelling
 
Data Science Jobs and Salaries Analysis.pptx
Data Science Jobs and Salaries Analysis.pptxData Science Jobs and Salaries Analysis.pptx
Data Science Jobs and Salaries Analysis.pptx
 
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
(PARI) Call Girls Wanowrie ( 7001035870 ) HI-Fi Pune Escorts Service
 
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一
 
Schema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfSchema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdf
 
RadioAdProWritingCinderellabyButleri.pdf
RadioAdProWritingCinderellabyButleri.pdfRadioAdProWritingCinderellabyButleri.pdf
RadioAdProWritingCinderellabyButleri.pdf
 
Customer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptxCustomer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptx
 
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
Indian Call Girls in Abu Dhabi O5286O24O8 Call Girls in Abu Dhabi By Independ...
 
04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationships04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationships
 

Analyzing Price Elasticity Against Purchase Probability

  • 1. Step By Step Analyzing Price Elasticity With Feature Promotion Against Purchase Probability By Rahmat Taufiq Sigit INTRODUCTION One of marketing activities that very important is promoting. Product or Services are introduced to the market by promitional activities. So the main goal of promotional activites is so that products or services are known by the market and in increase sales. Because of this very important promotion objective, companies need a lot of money to make promotional successful. However, this also make the company have to do some research to determine what kind of promoition strategy can be used. Price elasticity means how much the probability of purchase for the product or services to the price increment. On this occasion, we will discuss step by step analyzing product prices against purchase probabilities with promotional features. This research is to find out whether promotional activities give better results than no promotional activities and how much it effects to purchase probability. The source of this research data comes from the minimarket transaction database. And the product that will be discussed is chocolate bar. So let’s begin DATASET Variable Data type Range Description ID numerical Integer Shows a unique identificator of a customer. Day numerical Integer Day when the customer has visited the store Incidence categorical {0,1} Purchase Incidence 0 The customer has not purchased an item from the category of interest 1 The customer has purchased an item from the category of interest Brand categorical {0,1,2,3,4,5} Shows which brand the customer has purchased 0 No brand was purchased 1,2,3,4,5 Brand ID Quantity numerical integer Number of items bought by the customer from the product category of interest Last_Inc_Brand categorical {0,1,2,3,4,5} Shows which brand the customer has purchased on their previous store visit 0 No brand was purchased 1,2,3,4,5 Brand ID Last_Inc_Quantity numerical integer Number of items bought by the customer from the product category of interest during their previous store visit Price_1 numerical real Price of an item from Brand 1 on a particular day Price_2 numerical real Price of an item from Brand 2 on a particular day Price_3 numerical real Price of an item from Brand 3 on a particular day Price_4 numerical real Price of an item from Brand 4 on a particular day Price_5 numerical real Price of an item from Brand 5 on a particular day Promotion_1 categorical {0,1} Indicator whether Brand 1 was on promotion or not on a particular day 0 There is no promotion 1 There is promotion Promotion_2 categorical {0,1} Indicator of whether Brand 2 was on promotion or not on a particular day 0 There is no promotion 1 There is promotion Promotion_3 categorical {0,1} Indicator of whether Brand 3 was on promotion or not on a particular day 0 There is no promotion 1 There is promotion Promotion_4 categorical {0,1} Indicator of whether Brand 4 was on promotion or not on a particular day 0 There is no promotion 1 There is promotion Promotion_5 categorical {0,1} Indicator of whether Brand 5 was on promotion or not on a particular day 0 There is no promotion 1 There is promotion Sex categorical {0,1} Biological sex (gender) of a customer. In this dataset there are only 2 different options. 0 male 1 female Marital status categorical {0,1} Marital status of a customer. 0 single 1 non-single (divorced / separated / married / widowed) Age numerical Integer The age of the customer in years, calculated as current year minus the year of birth of the customer at the time of creation of the dataset 18 Min value (the lowest age observed in the dataset) 75 Max value (the highest age observed in the dataset) Education categorical {0,1,2,3} Level of education of the customer 0 other / unknown 1 high school 2 university 3 graduate school Income numerical real Self-reported annual income in US dollars of the customer. 38247 Min value (the lowest income observed in the dataset) 309364 Max value (the highest income observed in the dataset) Occupation categorical {0,1,2} Category of occupation of the customer. 0 unemployed / unskilled 1 skilled employee / official 2 management / self-employed / highly qualified employee / officer Settlement size categorical {0,1,2} The size of the city that the customer lives in. 0 small city 1 mid-sized city 2 big city
  • 2. In Dataset structure there are 24 coulumn (feature), however, not all of the feature will be used. These features are Incidence, Price_1, Price_2, Price_3, Price_4, Price_5, Promotion_1, Promotion_2, Promotion_3, Promotion_4, Promotion_5 IMPORT PACKAGES import numpy as np import pandas as pd from sklearn.linear_model import LogisticRegression import matplotlib.pyplot as plt import matplotlib.axes as axs import seaborn as sns sns.set() The codes above are used to import library that will be neded in data processing. LOAD DATASET Next step is accessing the dataset from data folder with these codes below df_purchase = pd.read_csv("data/purchase data.csv") df_pa=df_purchase PRICE CHANGES SIMULATION This step is try to make dummy price dataset. This data will be used in linier regression model. Before that, let’s do some descriptive analyzing the price dataset. df_pa[['Price_1','Price_2','Price_3','Price_4','Price_5']].describe() the result of the code above, can be seen in the image below : The image above shows the price dataset has 5.8693 rows, minimum prices is $1,1 anda max price is $2,8. After knowing the min and max price, then lets create a dummy price range with approximately the same ratio using codes below: price_range = np.arange(0.5,3.5,0.01) price_range the price range dataset is set with a minimum value is 0.5 and maximal value is 5.0 with 0.1 increament. Value 0,1 of increament is to make the dummy dataset that can describe the movement of price and pribability in every $0,1. and the result can be seen in the image below:
  • 3. Put the dummy price to a dataframe with these codes below: df_price_elasticities = pd.DataFrame(price_range) Rename the first feature of data df_price_elasticities from 0 to “Price Range” and display the dataframe using codes below df_price_elasticities = df_price_elasticities.rename({0:'Price Range'}, axis=1) df_price_elasticities The result of the codes above are below: DETERMINE X AND Y VALUE FOR LINIER REGRESSION MODEL This research using 3 feature, the features are price, promotion against probability of purchase. So the algorithm that will be used is multinomial linier regression, which has two X values (Factors). X value is price and promotion and Y value is incidence. The code below is to determine Y value: Y = df_pa['Incidence'] The codes below are used to define mean of price as X1 and mean of promotion as X2. And safe both of X into dataframe named X X = pd.DataFrame() X['Mean_price'] = (df_pa['Price_1']+ df_pa['Price_2']+
  • 4. df_pa['Price_3']+ df_pa['Price_4']+ df_pa['Price_5'] )/5 X['Mean_promotion'] = (df_pa['Promotion_1']+ df_pa['Promotion_2']+ df_pa['Promotion_3']+ df_pa['Promotion_4']+ df_pa['Promotion_5'] )/5 X The result of the codes above are below: MODEL ESTIMATION Define the multinomial linier reggression using these codes below: model_incidence_promotions = LogisticRegression(solver='sag') model_incidence_promotions.fit(X,Y) model_incidence_promotions.coef_ And the koefisien result are : array([[-1.49403391, 0.56165343]]) Koefisien of price is -1,4 it means that price and purchase have a negatif relation, which is purchase probability increase if the price decrees. Otherwise, Promotion is positif relation with 0,56 koefisien value. the model quantified the exact relation between price, promotion and purchase probability CALCULATE PRICE ELASTICITY WITH PROMOTION First step of this phase is to make new dataframe with first column (feature) is price range using these codes below: df_price_elasticities_promotion=pd.DataFrame(price_range) df_price_elasticities_promotion=df_price_elasticities_promotion.rename({0:'Price Range'}, axis=1) Second step is to add new column named promotion with 1 value. By using these code below: df_price_elasticities_promotion['promotion']=1 df_price_elasticities_promotion The Result can be seen in the picture below:
  • 5. The third step is to predict the promotion of Y using the estimated model that has been made before using the codes below: Y_promotion=model_incidence_promotions.predict_proba(df_price_elasticities_promotio n) The Result can be seen in the picture below: The result if Y predict promotion is second column. The forth step for this phase is to calculate the price elasticity and store it to dataset called df_price_elasticities, by using these codes below: promo = Y_promotion[:,1] pe_promo= model_incidence_promotions.coef_[:,0]*price_range*(1-promo) df_price_elasticities['elasticity_promo_1']=pe_promo CALCULATE PRICE ELASTICITY WITH NO PROMOTION First step of this phase is to make new dataframe with first column (feature) is price range using these codes below: df_price_elasticities_no_promotion = pd.DataFrame(price_range) df_price_elasticities_no_promotion = df_price_elasticities_no_promotion.rename({0:'Price Range'}, axis=1) Second step is to add new column named no_promotion with 0 value. By using these code below: df_price_elasticities_no_promotion['no_promotion']=0 df_price_elasticities_no_promotion
  • 6. The Result can be seen in the picture below: The third step is to predict the no promotion of Y using the estimated model that has been made before using the codes below: Y_no_promotion=model_incidence_promotions.predict_proba(df_price_elasticities_no_pr omotion) The forth step for this phase is to calculate the price elasticity and store it to dataset called df_price_elasticities, by using these codes below: no_promo = Y_no_promotion[:,1] pe_no_promo= model_incidence_promotions.coef_[:,0]*price_range*(1-no_promo) df_price_elasticities['elasticity_no_promo']=pe_no_promo df_price_elasticities The Result of price elasticity for promotion can be seen in the picture below: The Result of price elasticity for no promotion can be seen in the picture below:
  • 7. If the value is above 100% (>1), it means that the probability is elastic, and if the value is below 100% (<1), it means the probability is inelastic. Comparing Promotion Vs No Promotion The last phase is to make graph and describe data clearly using codes below: plt.figure(figsize=(9,6)) plt.plot(price_range,pe_promo, color='grey') plt.plot(price_range,pe_no_promo, color='green') plt.legend(['Promotion', 'No Promotion']) plt.xlabel('Price') plt.ylabel('Elasticities') plt.title('Price Elasticities With Promo and No Promo to Purchase Probability') The Result can be seen in the picture below: The price elasticity of the Promotion is $1.46 with pruchase probability 1.002 and Non Promotion $1.27 with a purchase probability level of 1.003. It can be seen that there is a price difference of around $0.2. Price sensitivity decreases when there is a promotion. The conclusion is the chocolate bar product price can be increased to maximal $0,2 if the product followed by promotion feature. Increasing chocolate bar price above $0,2, purchase probability will go decrease. And It would be better to have high original prices with consistent promotions than low original prices but no promotions.