SlideShare a Scribd company logo
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 Step By Step Analyzing Price Elasticit1.pdf

Predicting Product Ad Campaign Performance: A Data Analysis Project Presentation
Predicting Product Ad Campaign Performance: A Data Analysis Project PresentationPredicting Product Ad Campaign Performance: A Data Analysis Project Presentation
Predicting Product Ad Campaign Performance: A Data Analysis Project Presentation
Boston Institute of Analytics
 
Final Project Report - Walmart Sales
Final Project Report - Walmart SalesFinal Project Report - Walmart Sales
Final Project Report - Walmart Sales
Deepti Bahel
 
PLA - Dashboard
PLA - DashboardPLA - Dashboard
PLA - Dashboard
paytmslides1
 
Marketing Mix Template
Marketing Mix TemplateMarketing Mix Template
Marketing Mix Template
DataCaptive
 
DF16 Imprivata - Getting Started with Formulas
DF16 Imprivata - Getting Started with FormulasDF16 Imprivata - Getting Started with Formulas
DF16 Imprivata - Getting Started with Formulas
Christophe Rustici
 
BIG MART SALES.pptx
BIG MART SALES.pptxBIG MART SALES.pptx
BIG MART SALES.pptx
LSURYAPRAKASHREDDY
 
BIG MART SALES PRIDICTION PROJECT.pptx
BIG MART SALES PRIDICTION PROJECT.pptxBIG MART SALES PRIDICTION PROJECT.pptx
BIG MART SALES PRIDICTION PROJECT.pptx
LSURYAPRAKASHREDDY
 
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.docx
mccormicknadine86
 
Data warehousing
Data warehousingData warehousing
Data warehousing
Ashish Kumar Jena
 
Wooing the Best Bank Deposit Customers
Wooing the Best Bank Deposit CustomersWooing the Best Bank Deposit Customers
Wooing the Best Bank Deposit Customers
Lucinda 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 decisions
Nicha 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 PM
Product 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.docx
todd241
 
Market Pricing
Market PricingMarket Pricing
Costing and pricing
Costing and pricingCosting and pricing
Costing and pricing
Regi Jan Vilches
 
Marketing management assessment
Marketing management assessmentMarketing management assessment
Marketing management assessment
Novoraj 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.docx
maxinesmith73660
 
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 Step By Step Analyzing Price Elasticit1.pdf (20)

Predicting Product Ad Campaign Performance: A Data Analysis Project Presentation
Predicting Product Ad Campaign Performance: A Data Analysis Project PresentationPredicting Product Ad Campaign Performance: A Data Analysis Project Presentation
Predicting Product Ad Campaign Performance: A Data Analysis Project Presentation
 
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?
 

More from Rahmat Taufiq Sigit

customer_clustering_aquisition.pdf
customer_clustering_aquisition.pdfcustomer_clustering_aquisition.pdf
customer_clustering_aquisition.pdf
Rahmat Taufiq Sigit
 
Property-Management-Basic.pdf
Property-Management-Basic.pdfProperty-Management-Basic.pdf
Property-Management-Basic.pdf
Rahmat 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-jan22
Rahmat 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 & MySQL
Rahmat 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 umkm
Rahmat Taufiq Sigit
 
Tutorial Microsoft Project
Tutorial Microsoft ProjectTutorial Microsoft Project
Tutorial Microsoft Project
Rahmat Taufiq Sigit
 
Paparan SLF 2018 Pemprov DKI
Paparan SLF 2018 Pemprov DKIPaparan SLF 2018 Pemprov DKI
Paparan SLF 2018 Pemprov DKI
Rahmat Taufiq Sigit
 
Hsem combined.pdf
Hsem combined.pdfHsem combined.pdf
Hsem combined.pdf
Rahmat Taufiq Sigit
 
Rahasia jawaban wawancara kerja
Rahasia jawaban wawancara kerjaRahasia jawaban wawancara kerja
Rahasia jawaban wawancara kerja
Rahmat 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 azzaini
Rahmat Taufiq Sigit
 
Society For Human Resource Management
Society For Human Resource ManagementSociety For Human Resource Management
Society For Human Resource Management
Rahmat Taufiq Sigit
 
Penyusunan Protofolio Layanan Dalam Property Management
Penyusunan Protofolio Layanan Dalam Property ManagementPenyusunan Protofolio Layanan Dalam Property Management
Penyusunan Protofolio Layanan Dalam Property Management
Rahmat Taufiq Sigit
 
Kisah Tentang Usaha Menwujudkan Sebuah Visi
Kisah Tentang Usaha Menwujudkan Sebuah VisiKisah Tentang Usaha Menwujudkan Sebuah Visi
Kisah Tentang Usaha Menwujudkan Sebuah Visi
Rahmat Taufiq Sigit
 
Presentasi diklat-pu-2017-b
Presentasi diklat-pu-2017-bPresentasi diklat-pu-2017-b
Presentasi diklat-pu-2017-b
Rahmat Taufiq Sigit
 
Form kosong-allinone
Form kosong-allinoneForm kosong-allinone
Form kosong-allinone
Rahmat Taufiq Sigit
 
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
Rahmat Taufiq Sigit
 
Laporan pp kom q4 2016
Laporan pp kom q4 2016Laporan pp kom q4 2016
Laporan pp kom q4 2016
Rahmat Taufiq Sigit
 
Bm toolkit
Bm toolkitBm toolkit
Commercial real-estate-for-beginners
Commercial real-estate-for-beginnersCommercial real-estate-for-beginners
Commercial real-estate-for-beginners
Rahmat 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

06-12-2024-BudapestDataForum-BuildingReal-timePipelineswithFLaNK AIM
06-12-2024-BudapestDataForum-BuildingReal-timePipelineswithFLaNK AIM06-12-2024-BudapestDataForum-BuildingReal-timePipelineswithFLaNK AIM
06-12-2024-BudapestDataForum-BuildingReal-timePipelineswithFLaNK AIM
Timothy Spann
 
Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...
Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...
Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...
Aggregage
 
Challenges of Nation Building-1.pptx with more important
Challenges of Nation Building-1.pptx with more importantChallenges of Nation Building-1.pptx with more important
Challenges of Nation Building-1.pptx with more important
Sm321
 
ViewShift: Hassle-free Dynamic Policy Enforcement for Every Data Lake
ViewShift: Hassle-free Dynamic Policy Enforcement for Every Data LakeViewShift: Hassle-free Dynamic Policy Enforcement for Every Data Lake
ViewShift: Hassle-free Dynamic Policy Enforcement for Every Data Lake
Walaa Eldin Moustafa
 
一比一原版(UCSF文凭证书)旧金山分校毕业证如何办理
一比一原版(UCSF文凭证书)旧金山分校毕业证如何办理一比一原版(UCSF文凭证书)旧金山分校毕业证如何办理
一比一原版(UCSF文凭证书)旧金山分校毕业证如何办理
nuttdpt
 
Open Source Contributions to Postgres: The Basics POSETTE 2024
Open Source Contributions to Postgres: The Basics POSETTE 2024Open Source Contributions to Postgres: The Basics POSETTE 2024
Open Source Contributions to Postgres: The Basics POSETTE 2024
ElizabethGarrettChri
 
DSSML24_tspann_CodelessGenerativeAIPipelines
DSSML24_tspann_CodelessGenerativeAIPipelinesDSSML24_tspann_CodelessGenerativeAIPipelines
DSSML24_tspann_CodelessGenerativeAIPipelines
Timothy Spann
 
4th Modern Marketing Reckoner by MMA Global India & Group M: 60+ experts on W...
4th Modern Marketing Reckoner by MMA Global India & Group M: 60+ experts on W...4th Modern Marketing Reckoner by MMA Global India & Group M: 60+ experts on W...
4th Modern Marketing Reckoner by MMA Global India & Group M: 60+ experts on W...
Social Samosa
 
一比一原版(UMN文凭证书)明尼苏达大学毕业证如何办理
一比一原版(UMN文凭证书)明尼苏达大学毕业证如何办理一比一原版(UMN文凭证书)明尼苏达大学毕业证如何办理
一比一原版(UMN文凭证书)明尼苏达大学毕业证如何办理
nyfuhyz
 
一比一原版(UO毕业证)渥太华大学毕业证如何办理
一比一原版(UO毕业证)渥太华大学毕业证如何办理一比一原版(UO毕业证)渥太华大学毕业证如何办理
一比一原版(UO毕业证)渥太华大学毕业证如何办理
aqzctr7x
 
一比一原版兰加拉学院毕业证(Langara毕业证书)学历如何办理
一比一原版兰加拉学院毕业证(Langara毕业证书)学历如何办理一比一原版兰加拉学院毕业证(Langara毕业证书)学历如何办理
一比一原版兰加拉学院毕业证(Langara毕业证书)学历如何办理
hyfjgavov
 
Experts live - Improving user adoption with AI
Experts live - Improving user adoption with AIExperts live - Improving user adoption with AI
Experts live - Improving user adoption with AI
jitskeb
 
Palo Alto Cortex XDR presentation .......
Palo Alto Cortex XDR presentation .......Palo Alto Cortex XDR presentation .......
Palo Alto Cortex XDR presentation .......
Sachin Paul
 
Udemy_2024_Global_Learning_Skills_Trends_Report (1).pdf
Udemy_2024_Global_Learning_Skills_Trends_Report (1).pdfUdemy_2024_Global_Learning_Skills_Trends_Report (1).pdf
Udemy_2024_Global_Learning_Skills_Trends_Report (1).pdf
Fernanda Palhano
 
Intelligence supported media monitoring in veterinary medicine
Intelligence supported media monitoring in veterinary medicineIntelligence supported media monitoring in veterinary medicine
Intelligence supported media monitoring in veterinary medicine
AndrzejJarynowski
 
一比一原版(Unimelb毕业证书)墨尔本大学毕业证如何办理
一比一原版(Unimelb毕业证书)墨尔本大学毕业证如何办理一比一原版(Unimelb毕业证书)墨尔本大学毕业证如何办理
一比一原版(Unimelb毕业证书)墨尔本大学毕业证如何办理
xclpvhuk
 
原版一比一多伦多大学毕业证(UofT毕业证书)如何办理
原版一比一多伦多大学毕业证(UofT毕业证书)如何办理原版一比一多伦多大学毕业证(UofT毕业证书)如何办理
原版一比一多伦多大学毕业证(UofT毕业证书)如何办理
mkkikqvo
 
The Ipsos - AI - Monitor 2024 Report.pdf
The  Ipsos - AI - Monitor 2024 Report.pdfThe  Ipsos - AI - Monitor 2024 Report.pdf
The Ipsos - AI - Monitor 2024 Report.pdf
Social Samosa
 
原版制作(unimelb毕业证书)墨尔本大学毕业证Offer一模一样
原版制作(unimelb毕业证书)墨尔本大学毕业证Offer一模一样原版制作(unimelb毕业证书)墨尔本大学毕业证Offer一模一样
原版制作(unimelb毕业证书)墨尔本大学毕业证Offer一模一样
ihavuls
 
Population Growth in Bataan: The effects of population growth around rural pl...
Population Growth in Bataan: The effects of population growth around rural pl...Population Growth in Bataan: The effects of population growth around rural pl...
Population Growth in Bataan: The effects of population growth around rural pl...
Bill641377
 

Recently uploaded (20)

06-12-2024-BudapestDataForum-BuildingReal-timePipelineswithFLaNK AIM
06-12-2024-BudapestDataForum-BuildingReal-timePipelineswithFLaNK AIM06-12-2024-BudapestDataForum-BuildingReal-timePipelineswithFLaNK AIM
06-12-2024-BudapestDataForum-BuildingReal-timePipelineswithFLaNK AIM
 
Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...
Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...
Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...
 
Challenges of Nation Building-1.pptx with more important
Challenges of Nation Building-1.pptx with more importantChallenges of Nation Building-1.pptx with more important
Challenges of Nation Building-1.pptx with more important
 
ViewShift: Hassle-free Dynamic Policy Enforcement for Every Data Lake
ViewShift: Hassle-free Dynamic Policy Enforcement for Every Data LakeViewShift: Hassle-free Dynamic Policy Enforcement for Every Data Lake
ViewShift: Hassle-free Dynamic Policy Enforcement for Every Data Lake
 
一比一原版(UCSF文凭证书)旧金山分校毕业证如何办理
一比一原版(UCSF文凭证书)旧金山分校毕业证如何办理一比一原版(UCSF文凭证书)旧金山分校毕业证如何办理
一比一原版(UCSF文凭证书)旧金山分校毕业证如何办理
 
Open Source Contributions to Postgres: The Basics POSETTE 2024
Open Source Contributions to Postgres: The Basics POSETTE 2024Open Source Contributions to Postgres: The Basics POSETTE 2024
Open Source Contributions to Postgres: The Basics POSETTE 2024
 
DSSML24_tspann_CodelessGenerativeAIPipelines
DSSML24_tspann_CodelessGenerativeAIPipelinesDSSML24_tspann_CodelessGenerativeAIPipelines
DSSML24_tspann_CodelessGenerativeAIPipelines
 
4th Modern Marketing Reckoner by MMA Global India & Group M: 60+ experts on W...
4th Modern Marketing Reckoner by MMA Global India & Group M: 60+ experts on W...4th Modern Marketing Reckoner by MMA Global India & Group M: 60+ experts on W...
4th Modern Marketing Reckoner by MMA Global India & Group M: 60+ experts on W...
 
一比一原版(UMN文凭证书)明尼苏达大学毕业证如何办理
一比一原版(UMN文凭证书)明尼苏达大学毕业证如何办理一比一原版(UMN文凭证书)明尼苏达大学毕业证如何办理
一比一原版(UMN文凭证书)明尼苏达大学毕业证如何办理
 
一比一原版(UO毕业证)渥太华大学毕业证如何办理
一比一原版(UO毕业证)渥太华大学毕业证如何办理一比一原版(UO毕业证)渥太华大学毕业证如何办理
一比一原版(UO毕业证)渥太华大学毕业证如何办理
 
一比一原版兰加拉学院毕业证(Langara毕业证书)学历如何办理
一比一原版兰加拉学院毕业证(Langara毕业证书)学历如何办理一比一原版兰加拉学院毕业证(Langara毕业证书)学历如何办理
一比一原版兰加拉学院毕业证(Langara毕业证书)学历如何办理
 
Experts live - Improving user adoption with AI
Experts live - Improving user adoption with AIExperts live - Improving user adoption with AI
Experts live - Improving user adoption with AI
 
Palo Alto Cortex XDR presentation .......
Palo Alto Cortex XDR presentation .......Palo Alto Cortex XDR presentation .......
Palo Alto Cortex XDR presentation .......
 
Udemy_2024_Global_Learning_Skills_Trends_Report (1).pdf
Udemy_2024_Global_Learning_Skills_Trends_Report (1).pdfUdemy_2024_Global_Learning_Skills_Trends_Report (1).pdf
Udemy_2024_Global_Learning_Skills_Trends_Report (1).pdf
 
Intelligence supported media monitoring in veterinary medicine
Intelligence supported media monitoring in veterinary medicineIntelligence supported media monitoring in veterinary medicine
Intelligence supported media monitoring in veterinary medicine
 
一比一原版(Unimelb毕业证书)墨尔本大学毕业证如何办理
一比一原版(Unimelb毕业证书)墨尔本大学毕业证如何办理一比一原版(Unimelb毕业证书)墨尔本大学毕业证如何办理
一比一原版(Unimelb毕业证书)墨尔本大学毕业证如何办理
 
原版一比一多伦多大学毕业证(UofT毕业证书)如何办理
原版一比一多伦多大学毕业证(UofT毕业证书)如何办理原版一比一多伦多大学毕业证(UofT毕业证书)如何办理
原版一比一多伦多大学毕业证(UofT毕业证书)如何办理
 
The Ipsos - AI - Monitor 2024 Report.pdf
The  Ipsos - AI - Monitor 2024 Report.pdfThe  Ipsos - AI - Monitor 2024 Report.pdf
The Ipsos - AI - Monitor 2024 Report.pdf
 
原版制作(unimelb毕业证书)墨尔本大学毕业证Offer一模一样
原版制作(unimelb毕业证书)墨尔本大学毕业证Offer一模一样原版制作(unimelb毕业证书)墨尔本大学毕业证Offer一模一样
原版制作(unimelb毕业证书)墨尔本大学毕业证Offer一模一样
 
Population Growth in Bataan: The effects of population growth around rural pl...
Population Growth in Bataan: The effects of population growth around rural pl...Population Growth in Bataan: The effects of population growth around rural pl...
Population Growth in Bataan: The effects of population growth around rural pl...
 

Step By Step Analyzing Price Elasticit1.pdf

  • 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.