Conjoint analysis is a sophisticated research method used to determine how people value different attributes (features, functions, benefits) of a product or service. This guide provides an overview for how to set up a conjoint study, specifically focusing on analyzing product features based on respondent choices. For this type of Conjoint, we recommend setting up a survey instance and using the code below to create your survey vs. importing from a word doc due to the complexity of the programming.
Introduction to Conjoint Analysis
Conjoint analysis helps in understanding how decision-makers evaluate and make choices between products or services. It breaks down the decision process into comprehensible parts, assesses the underlying preferences, and predicts how these preferences influence consumer decision-making.
Step 1: Create a Survey in a Project
To start, create a new survey within a project. Use the code below to indicate the type of Conjoint you want to create - in this case a choice-based approach. "intertools" is a Python feature that creates feature combinations.
from itertools import combinations, product
from survey import Survey
s = Survey(**globals())
Step 2: Add Screener Question
The first part of the code collects demographic information from respondents, such as age and gender. These questions help segment the data and understand preferences across different demographic groups.
# Ask demo questions
age = s.numeric_question(
question="How old are you?",
min_max=(18, 65),
recodes={"0-17": "Under 18", "18-34": "18-34", "35-54": "35-54", "55-120": "55+"},
)
gender = s.multi_choice_question(
question="What is your gender?", options=["Male", "Female"]
)
Step 3: Introducing Conjoint Analysis
Before diving into the conjoint questions, introduce the concept to respondents. Explain that they'll be presented with different combinations of product features and asked to choose their preferred option. This sets the context for the questions that follow.
# Introduce the conjoint analysis
s.note(
"We are now going to ask you about a number of combinations of product features, "
"and would like you to choose one over the other."
)
Step 4: Setting Up the Features
Identify and list the features and their levels you want to analyze. In the example, features include Brand, Color, Network, and Price, each with multiple options.
# Set the features to be tested
features = {
"Brand": ["Apple", "Samsung"],
"Color": ["Black", "Silver", "Blue", "Pink"],
"Network": ["4G", "5G"],
"Price": ["$200", "$400", "$600", "$800", "$1000"],
}
Step 5: Generating Feature Combinations
Use Python's `itertools` to generate all possible combinations of the features. This step is critical as it forms the basis of your conjoint analysis. Each combination represents a potential product configuration that respondents will evaluate.
# Generate unique combinations of features
combinations = [list(combinations(options, 2)) for options in features.values()]
product_combinations = {
str(i): v
for i, v in enumerate(
[
{k: v for k, v in zip(features.keys(), combination)}
for combination in zip(*pair)
]
for pair in product(*combinations)
)
}
Step 6: Set Up a Counter
We will count the choices when we present them to the respondent and only store them when all the choices have been asked.
# Set up a counter for the choices
choices = {
feature: {choice: 0 for choice in options} for feature, options in features.items()
}
Step 7: Presenting Choices to Respondents
Loop through the generated product combinations, presenting them to respondents in pairs. Ask which option they prefer. The code example simplifies the presentation by listing each feature value on a different line, but more complex displays can be accommodated.
# Now ask the questions
for combo in s.get_least_filled(8, product_combinations, "product combinations"):
combination = product_combinations[combo]
# Set up the options to display... we are just going to display each value on a different line
# But you could use a more complex display if you wanted
options = ["\n".join(combination[i][key] for key in features) for i in range(2)]
# Ask the question
choice = s.multi_choice_question(
"Which do you prefer from?", options=options, reportable=False, combo=combo
)
Step 8: Counting and Storing Choices
As respondents make their choices, tally these preferences for each feature option. This step is critical for later analysis, as it quantifies the preference for each feature level.
# Count the choices
combo = combination[0] if choice == options[0] else combination[1]
for key, value in combo.items():
choices[key][value] += 1
# Store the counted choices
for feature, options in choices.items():
for option, count in options.items():
s.store_value("Conjoint Preference for " + feature, count, **{feature: option})
s.complete()
Finally, the counted choices are stored for analysis. This data is what you'll use to understand which features are most and least important to your target audience.
Conclude the survey and ensure all data is saved properly. This includes demographic information, individual choices, and the tallied preferences for each feature level.
Bringing It All Together
Our final survey looks like this:
from itertools import combinations, product
from survey import Survey
s = Survey(**globals())
# Ask demo questions
age = s.numeric_question(
question="How old are you?",
min_max=(18, 65),
recodes={"0-17": "Under 18", "18-34": "18-34", "35-54": "35-54", "55-120": "55+"},
)
gender = s.multi_choice_question(
question="What is your gender?", options=["Male", "Female"]
)
# Introduce the conjoint analysis
s.note(
"We are now going to ask you about a number of combinations of product features, "
"and would like you to choose one over the other."
)
# Set the features to be tested
features = {
"Brand": ["Apple", "Samsung"],
"Color": ["Black", "Silver", "Blue", "Pink"],
"Network": ["4G", "5G"],
"Price": ["$200", "$400", "$600", "$800", "$1000"],
}
# Generate unique combinations of features
combinations = [list(combinations(options, 2)) for options in features.values()]
product_combinations = {
str(i): v
for i, v in enumerate(
[
{k: v for k, v in zip(features.keys(), combination)}
for combination in zip(*pair)
]
for pair in product(*combinations)
)
}
# Set up a counter for the choices
choices = {
feature: {choice: 0 for choice in options} for feature, options in features.items()
}
# Now ask the questions
for combo in s.get_least_filled(8, product_combinations, "product combinations"):
combination = product_combinations[combo]
# Set up the options to display... we are just going to display each value on a different line
# But you could use a more complex display if you wanted
options = ["\n".join(combination[i][key] for key in features) for i in range(2)]
# Ask the question
choice = s.multi_choice_question(
"Which do you prefer from?", options=options, reportable=False, combo=combo
)
# Count the choices
combo = combination[0] if choice == options[0] else combination[1]
for key, value in combo.items():
choices[key][value] += 1
# Store the counted choices
for feature, options in choices.items():
for option, count in options.items():
s.store_value("Conjoint Preference for " + feature, count, **{feature: option})
s.complete()
Setting up a conjoint study involves careful planning and execution. By following the steps outlined above and utilizing the provided Python code, you can systematically collect and analyze data on consumer preferences for different product features. This approach offers invaluable insights into what drives consumer decision-making, allowing businesses to tailor their products and services to meet market demands more effectively.