Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: THEend8_
PM 410 Customer Analytics
Product Optimization Exercise:
Because this HW is challenging, there are two policy changes as listed below These apply
to this HW only and not to future homeworks unless declared by me explicitly for those
future homeworks.
You can code in either R or Python. However, I strongly encourage you to do it in
Python because Python is the language favored in most jobs for MSBA students and
it is important to me that you get as much job-oriented preparation as possible in
my course. To incentivize you to work in Python, I will give you bonus points added
to your class participation score if you do this HW in Python rather than R.
HW collaboration is allowed to a limited extent as described here: You may discuss
this HW, solution approaches and Python/R function usage with your classmates.
Joint on-screen viewing of code and results can be done to the extent it helps a
student who is stuck to get unstuck just enough to proceed with the HW on his/her
own. However, there is to be no sharing/transmission of program code or any
written submission because that detracts from learning. Such sharing is a violation
of UCLA's Code of Conduct.
You can use generative AI tools (like ChatGPT, Bing Chat, Bard, GitHub Copilot). If
you do use these, then please be sure to submit details on what you did via Optional
Task 4 so that you get extra credit.
Now to the problem statement for this HW: You are producing beverage mugs and are
trying to identify the best price-feature-vector. Assume the following attributes and
attribute levels:
Price: $30, $10, $5
Time Insulated: 0.5 hrs, 1 hrs, 3 hrs
Capacity: 12 oz, 20 oz, 32 oz
Cleanability: Difficult (7 min), Fair (5 min), Easy (2 min)
Containment: Slosh resistant, Spill resistant, Leak resistant
Brand: A, B, C
Assume the following as the "proposed market scenario", ie the scenario with the current
competitors and our proposed candidate.
Incumbents
1: $30, 3 hrs, 20 oz, Clean Easy, Leak Resistant, Brand A
2: $10, 1 hrs, 20 oz, Clean Fair, Spill Resistant, Brand B
Our proposed candidate
3: $ 30, 1 hrs, 20 oz, Clean Easy, Leak Resistant, Brand C
Assume the following cost structure:
Time Insulated: 0.5 hrs costs $0.5, 1 hrs costs $1, 3 hrs costs $3
Capacity: 12 oz costs $1.00, 20 oz costs $2.6, 32 oz costs $2.8
Cleanability: Difficult (7 min) costs $1, Fair (5 min) costs $2.2, Easy (2 min) costs $3.0
Containment: Slosh resistant costs $0.5, Spill resistant costs $0.8, Leak resistant costs
$1
You are given data on the preference parameters of 311 consumers in this file: mugs-
preference-parameters-full.xlsx. The CSV version of this file is here: mugs-preference-
parameters-full.csv
BE
4/11/23, 5:38 PM 410 Customer Analytics
Question 1: Using the compensatory rule with logit adjustment: Compute and report
our candidate's share, cost, margin and expected profit per person under the "proposed
market scenario" given above. This question is a strict subset of the next question. If you
have done the next question successfully, then all you need to do for this question is
report the numbers for Product Candidate 45 which corresponds to our proposed
candidate in the "proposed market scenario" given above. Even though this question is a
strict subset of the next question, I am asking for it separately. This is because not all
students may be able to do the next question successfully as it is a larger and more
general computation. Hint to check your answer: The number you should get for
expected profit per person is between 4 and 4.5.
Question 2: Discrete Optimization: Consider each of the three levels for each of the five
attributes and enumerate all the possibilities in lexical order with Price as the leftmost
attribute changing slowest and taking levels sequentially $30, $10, $5, then Time
Insulated as the left-second-most attribute changing second-slowest and taking values
sequentially 0.5 hrs, 1 hrs, 3 hrs and so on. You will have 243 product candidates. (The
lexical order produces indices as shown in this file. Please make sure you list your
products in that exact same order. The lexical order of products is obtained by looping
as shown in the following R code, which has close similarity in python: mugs-products-
lexical-order-loop.R.) Again using the compensatory rule, compute and report the
following four columns of numbers for each candidate: the share, the cost,the margin
and the expected profit per person (all under the current competition incumbents). The
table that you submit needs to have all 243 rows. Hint to check your answer: product
candidate 230 has a negative expected profit per customer of between -1.75 and -1.85,
and product candidate 106 has an expected profit per customer of between 0.7 and 0.8 .
Question 3: Using the 243-row table you produced in the previous step: Identify the
product with the highest expected profit per person. For this optimal product, list the
values of the five attributes and its share, cost , margin and expected profit per person.
Question 4. According to the pure algorithmic analytical approach, the best product
is the one with the highest expected profit per person (abbreviated here as "EPPP").
However, depending on the objectives of the company, your product manager boss may
not agree that this is the best product. He/she may argue you need to consider, as
primary criterion, one or more of the remaining three metrics: Share or Cost or Margin or
Revenue.
1. What would be the business rationale to launch the product with the highest
market share (instead of the product with the highest EPPP)? Respond in 1-5
sentences. In the 243-row table, identify the product with the highest market
share and give the values of the five attributes. To answer this question it may
help to plot the 243 products on EPPP versus share like is shown on Product-
Price Optimization Slide 19.
2. What would be the business rationale to launch the product with the highest
margin (instead of the product with the highest EPPP)? Respond in 1-5
sentences. In the 243-row table, identify the product(s) with the highest
margin and give the values of the five attributes.
3. What would be the business rationale to launch the product with the lowest
cost (instead of the product with the highest EPPP)? Respond in 1-5
33DEEEEets
sentences. In the 243-row table, identify the product(s) with the lowest cost
and give the values of the five attributes.
4. What would be the business rationale to launch the product with the highest
revenue per person in the market (instead of the product with the highest
EPPP)? Respond in 1-5 sentences. In the 243-row table, identify the product(s)
with the highest revenue per person in the market and give the values of the
five attributes. Note that revenue per person in the market can be computed as
share times price.
The above questions involve compensatory analysis with logit adjustment, for which you
should use a scaling constant value of c=0.0139.
Hints and explanatory notes for Q1 and Q2
Q1 and Q2 involve following steps analogous to the steps we followed in class in Product-
Price Optimization slides 2 through 18. The excel files for the in-class exercise are
here: mugs-preference-parameters-limited.xlsx and mugs-analysis-limited.xlsx. The
first file gives the starting point with the preference data, the second file gives the ending
point after the analysis has been completed.
Obviously, to do this HW, one first needs a thorough understanding of the file "mugs-
analysis-limited.xlsx" and how it is executing the calculations described on slides 2
through 17. This is something that each student will need to do on his/her own and this
will require fair competence in Excel. Here are some comments that may help you
understand the structure of the "mugs-analysis-limited.xlsx" spreadsheet. Remember
that to calculate the profit of a candidate product we need four critical inputs: (1) A
description of the candidate product and the incumbent products, (2) the preference
parameters, (3) the cost structure, and the dollar values for each price level, and (4) the
"c" value for the logit probability formula. These four inputs appear in pale green color in
cell blocks B2:D5, A20:Q30, P2:P10 and M1 respectively. These are the only inputs to the
model. Every other cell in the spreadsheet is a computation that depends on these four
cell blocks. Let us walk through these cell blocks now:
1. Cell block B2:D5. This gives the level number for each of the four attributes for each
of the three products. The level number indicates which level a certain attribute
takes. The levels are given on Slide 3. The level number for each level is just the
numerical position that level appears in on Slide 3. Therefore, for Price, level=1
means $30, level=2 means $10, level=3 means $5. By similar logic, for Capacity,
level=1 means 12oz, level=2 means 20oz, level=3 means 32oz. The similar logic
applies for Cleanability and Brand as well. Consider the numbers in cells B2:B5 for
Prod1. For Product 1, we see from Slide 3 price=$30, this corresponds to level 1,
and so we enter 1 in cell B2. Continuing with Product 1, it has Capacity=20 oz,
Cleanability=Easy and Brand=A, which correspond to level numbers 2, 3 and 1
respectively and these are the numbers we enter into cells B3, B4 and B5
respectively. Similarly, we enter the level numbers for the attributes for the other
two products.
2. Cell block A20:Q30. This just given the importances for the various attributes and
the preference measures for each attribute level for each attribute. These are the
raw data given to us.
3. Cell block P2:P10. In cells P2:P4 we enter the dollar value each price level number
corresponds to. In cells P5:P10, we enter the cost contribution for each attribute
t
level in every attribute other than price or brand (neither of these two contribute
directly to manufacturing cost).
4. Cell block M1. Here we enter the "c" value, which we computed on Slide 14.
Given the above four sets of inputs, the spreadsheet does the following computations
in sequence, closely following the steps in the lecture slides.
(A) Compute the product of importance and preference level for each attribute level.
These are done in cells S20:AD30.
(B) The utility for each product is just the sum of quantities compute in (A) above,
except that we just pick the factor that applies to the particular attribute level that a
certain product has. This is accomplished by doing a matrix multiplication, where we
multiply the matrix obtained in step (A) above by the dummy variable matrix
describing the level taken by each attribute for each product. The dummy variable
matrix is given in cell block H2:J13. Note that this dummy variable matrix is created
by use of a simple IF function based on the attribute levels given in input (1) of the
four inputs. Using the matrix multiplication, we utilities appear in AF21:AH30.
(C) Given the utilities, we multiply by "c" and exponentiate. This is done in cells
AI21:AK30.
(D) We compute the sum of the above exponentials, and this is done in cells
AO21:AO30.
(E) We use the sum to divide each exponential and get the purchase probability.
This is done in cells AP21:AR30
(F) We average these choice probabilities to give the market share estimates for
each producr and this is in cells AP19:AR19
(G) Now we have to compute the margin of the candidate product. For this we need
to pull the price from the candidate product description and this is done in cell R3.
Then we compute the cost, which is done by looking at the candidate product
description and adding the component costs, which is in cell T3. The margin is in cell
V3
(H) The final number we need is Expected Profit per person, which is margin times
share and computed in cell X3
Once you understand this sequence of steps, it should be moderately easy to write R
code or python code to execute the tasks required for Q1 and Q2.
Optional Tasks for Extra Credit toward Class Participation
Optional Task 1: Suppose you want to determine the elimination-by-aspects (EBA)
choice of a consumer choosing from among P products, each having A attributes. This is
a non-compensatory choice prediction model. You are given the following data
structures: a P-by-A matrix containing the consumer's rating or performance of each
product on each attribute, a vector of length A containing the consumer's importance of
each attribute, a vector of length A giving the consumer's cutoff for each attribute (we
are considering the general case where it is possible for the consumer to have different
cutoffs for different attributes). Write a function called "apply_eba" that takes these three
data structures as input arguments and produces the elimination-by-aspects choice. So
your function should be defined like the following