Skip to main content

Welcome to a Grasp lesson

Create a free account to keep studying and create your own study path.

Lesson 18

Predicting Lingerie Style Adoption

Recommended resources

Introduction

In our last lesson, we focused on interpreting the coefficients of a logistic regression model by converting them into odds ratios. This allowed us to understand how individual design features, like the presence of an underwire or the percentage of lace, influence the odds of a lingerie piece being a 'Top Pick'. Now, we will take the final, practical step: using the complete model to calculate the precise probability of that outcome for any given style.

This lesson directly addresses your goal of making data-driven decisions in the style optimization phase. By mastering this calculation, you can take a set of proposed designs, each with different attributes, and generate a quantitative score—the predicted probability of success—for each. This allows you to rank and prioritize styles for the photoshoot based on the model's insights. Given your background in statistical modeling, the two-step process of calculating the linear output and then transforming it into a probability will be familiar; our focus will be on its direct application to our design context.


From Log-Odds to Probability

The process of generating a probability from a logistic regression model involves two main steps. First, we calculate a value, traditionally denoted as , by plugging the specific features of our lingerie piece into the linear part of the model equation. This value represents the log-odds of the outcome.

Second, because log-odds are not intuitive and can range from negative to positive infinity, we need to map this value to a probability, which must lie between 0 and 1. This is accomplished using the sigmoid function, sometimes called the logistic function.

The image below illustrates this transformation. On the left, we have a standard linear equation producing a value. On the right, we see how the sigmoid function takes that value and transforms it into a probability on an S-shaped curve, ensuring the output is always between 0 and 1.

This image shows how the output of a linear equation, \(z\), which can be any real number, is mapped by the sigmoid function to a value between 0 and 1, which can be interpreted as a probability.

To formalize this, let's review the precise formulas.

Calculating a probability with the sigmoid function

This guide from Google's Machine Learning Crash Course clearly lays out the sigmoid function and the two-step calculation process.

First, read the section Sigmoid function to see the formula and its characteristic S-shaped graph. Then, carefully study the next section, Transforming linear output using the sigmoid function. This part connects the linear equation for z (the log-odds) to the final probability y' via the sigmoid transformation.

As you saw in the reading, the process is:

  1. Calculate the log-odds :
  2. Calculate the probability using the sigmoid function: This is mathematically equivalent to the formula , which you might also encounter.

A Worked Example: Scoring a New Lingerie Design

Let's use the model from our previous lessons to calculate the probability that a new, hypothetical lingerie piece will be a 'Top Pick'.

Model Equation:

New Design Profile:
Imagine a new plunge bra style that is not a balconette, is underwired, and features 60% lace coverage.

  • Lace_Coverage_Pct = 60
  • Is_Underwired = 1
  • Style_Is_Balconette = 0

Step 1: Calculate the log-odds (z)
We substitute the values for our new design into the equation:

The log-odds of this piece being a 'Top Pick' are 0.5.

Step 2: Convert log-odds to probability (P)
Now, we apply the sigmoid function to :

Conclusion: Based on our model, this new plunge bra has an estimated 62.3% probability of being a 'Top Pick'. This score can now be compared directly with scores for other competing designs.

The following video provides another excellent walkthrough of this exact process, using a model with several variables.

6.3 Logistic Regression: Using Model Equation To Answer Questions

This video from MarinStatsLectures demonstrates how to plug values into a fitted logistic regression model to estimate the probability of an outcome.

Watch the segment from the beginning until the final calculation. Pay close attention to how the presenter substitutes the specific characteristics of the individual (age, race, smoking status, etc.) into the model equation to first get the value of the exponent (our z) and then compute the final probability.


Numerical Exercise

Now it's your turn to apply this process. This is the core task for this lesson and directly reflects the kind of analysis you would perform when evaluating a new design.

Suppose you have developed a new logistic regression model for your boudoir photoshoot context. The outcome is whether a piece is selected for the "feature look" (Feature_Look = 1). Your fitted model is:

Where:

  • Is_Sheer: 1 if the fabric is sheer, 0 otherwise.
  • Has_Garter_Straps: 1 if the piece includes garter straps, 0 otherwise.
  • Price_USD: The retail price of the piece in US dollars.

Your Task:
You are considering a new design for the photoshoot: a sheer babydoll nightie with integrated garter straps, priced at $90.

  1. What are the values for Is_Sheer, Has_Garter_Straps, and Price_USD for this piece?
  2. Calculate the log-odds () for this design.
  3. Calculate the final predicted probability that this piece will be selected as a 'Feature Look'. Show your steps.

Use a calculator for the exponentiation. You can use .

Click for the solution.

1. Feature Values:

  • Is_Sheer = 1 (since the babydoll is sheer)
  • Has_Garter_Straps = 1 (since it has integrated garter straps)
  • Price_USD = 90

2. Calculate the log-odds (z):
Substitute the values into the model equation:

3. Calculate the predicted probability (P):
Apply the sigmoid function to :

First, calculate .

Final Answer: The predicted probability that this sheer babydoll nightie will be chosen as a 'Feature Look' is approximately 9.1%. Based on this model, it might not be a top contender compared to other potential styles.


Conclusion

In this lesson, we've completed our journey with logistic regression by learning how to use a fitted model for its ultimate purpose: prediction. You are now equipped to take the coefficients from a model, combine them with the specific features of a new lingerie design, and calculate a clear, interpretable probability of success.

Key Takeaways:

  • Logistic regression prediction is a two-step process: calculate the linear sum (log-odds), then transform into a probability using the sigmoid function .
  • This process allows you to generate a numerical score (a probability) for any item, enabling a quantitative comparison between different design options.
  • By applying this method, you can systematically rank potential lingerie styles for a photoshoot, focusing your creative efforts on those with the highest predicted chance of success.

We have now covered the essentials of both multiple linear regression and logistic regression. In our next module, we will shift our focus from prediction to a more nuanced and challenging topic: causal inference. Our first lesson will explore Simpson's paradox, a fascinating statistical phenomenon that highlights how easily we can draw incorrect conclusions from data if we don't account for underlying causal structures. This will be critical for avoiding common fallacies in your design analysis.