WGU D599 Exam 3: Market Basket Analysis |
Complete Report, Apriori Algorithm, Python
Code & Association Rules | 2026/2027
Updated {JUST RELEASED}
Practice Question Bank & Answer Rationale
THIS PACK CONTAINS
99 exam-style multiple-choice questions. Each question includes the correct answer and a complete rationale
for focused revision.
COVERAGE
This exam assesses mastery of market basket analysis and association rule mining, focusing on the Apriori
algorithm, frequent itemset generation, rule evaluation metrics (support, confidence, lift), and Python
implementation using libraries such as mlxtend and apyori. Students must demonstrate the ability to
preprocess transactional data, generate and interpret association rules, and apply these techniques to
real-world business scenarios.
STUDY GUIDE
Recommended duration: 3 hours. Passing target: 80%.
HIGHP - Page 1 of 30
,1. Given transactions {A,B,C}, {A,B}, {A,C}, {B,C}, {A,B,C,D}, what is the support count of
itemset {A,B}?
[ ] A. 2
[ ] B. 3
[ ] C. 4
[ ] D. 5
CORRECT: B. 3
Support count is the number of transactions containing the itemset. {A,B} appears in transactions 1, 2, and 5,
so count=3. Other counts are incorrect.
2. For rule {A}->{B}, confidence is 0.8 and support of {B} is 0.5. What is the lift?
[ ] A. 1.6
[ ] B. 0.4
[ ] C. 1.25
[ ] D. 0.625
CORRECT: A. 1.6
Lift = confidence / support(B) = 0..5 = 1.6. This indicates a positive association. Other options misapply
the formula.
3. In Apriori, if an itemset is infrequent, what can be said about its supersets?
[ ] A. They must be frequent.
[ ] B. They must be infrequent.
[ ] C. They may or may not be frequent.
[ ] D. They have higher support.
CORRECT: B. They must be infrequent.
Apriori's downward closure property states that all supersets of an infrequent itemset are also infrequent. This
is fundamental for pruning. Other options contradict this principle.
4. Which Python library function is commonly used to generate frequent itemsets in
market basket analysis?
[ ] A. apriori from mlxtend.frequent_patterns
[ ] B. association_rules from apyori
[ ] C. frequent_patterns from sklearn
[ ] D. itemsets from pandas
HIGHP - Page 2 of 30
, CORRECT: A. apriori from mlxtend.frequent_patterns
The mlxtend library provides the apriori function in frequent_patterns to generate frequent itemsets. Other
options are not standard for this purpose.
5. When preparing transaction data for Apriori in Python, which format is typically
required?
[ ] A. A list of lists of items
[ ] B. A one-hot encoded boolean DataFrame
[ ] C. A sparse matrix of counts
[ ] D. A dictionary of item frequencies
CORRECT: B. A one-hot encoded boolean DataFrame
mlxtend's apriori expects a one-hot encoded boolean DataFrame (or a list of lists for apyori). One-hot
encoding is standard for mlxtend. Other formats are not directly accepted.
6. A rule has lift = 1.0. What does this imply about the items?
[ ] A. They are positively correlated.
[ ] B. They are negatively correlated.
[ ] C. They are independent.
[ ] D. They are perfectly correlated.
CORRECT: C. They are independent.
Lift = 1 indicates independence; the occurrence of the antecedent does not affect the consequent. Lift >1
indicates positive correlation, <1 negative. Other options misinterpret lift.
7. Which metric is most useful for identifying rules that are not simply due to high item
frequency?
[ ] A. Support
[ ] B. Confidence
[ ] C. Lift
[ ] D. Leverage
CORRECT: C. Lift
Lift accounts for the baseline frequency of the consequent, revealing true associations beyond high support.
Confidence can be high for frequent consequents. Leverage is similar but less common. Support alone is
insufficient.
HIGHP - Page 3 of 30
Complete Report, Apriori Algorithm, Python
Code & Association Rules | 2026/2027
Updated {JUST RELEASED}
Practice Question Bank & Answer Rationale
THIS PACK CONTAINS
99 exam-style multiple-choice questions. Each question includes the correct answer and a complete rationale
for focused revision.
COVERAGE
This exam assesses mastery of market basket analysis and association rule mining, focusing on the Apriori
algorithm, frequent itemset generation, rule evaluation metrics (support, confidence, lift), and Python
implementation using libraries such as mlxtend and apyori. Students must demonstrate the ability to
preprocess transactional data, generate and interpret association rules, and apply these techniques to
real-world business scenarios.
STUDY GUIDE
Recommended duration: 3 hours. Passing target: 80%.
HIGHP - Page 1 of 30
,1. Given transactions {A,B,C}, {A,B}, {A,C}, {B,C}, {A,B,C,D}, what is the support count of
itemset {A,B}?
[ ] A. 2
[ ] B. 3
[ ] C. 4
[ ] D. 5
CORRECT: B. 3
Support count is the number of transactions containing the itemset. {A,B} appears in transactions 1, 2, and 5,
so count=3. Other counts are incorrect.
2. For rule {A}->{B}, confidence is 0.8 and support of {B} is 0.5. What is the lift?
[ ] A. 1.6
[ ] B. 0.4
[ ] C. 1.25
[ ] D. 0.625
CORRECT: A. 1.6
Lift = confidence / support(B) = 0..5 = 1.6. This indicates a positive association. Other options misapply
the formula.
3. In Apriori, if an itemset is infrequent, what can be said about its supersets?
[ ] A. They must be frequent.
[ ] B. They must be infrequent.
[ ] C. They may or may not be frequent.
[ ] D. They have higher support.
CORRECT: B. They must be infrequent.
Apriori's downward closure property states that all supersets of an infrequent itemset are also infrequent. This
is fundamental for pruning. Other options contradict this principle.
4. Which Python library function is commonly used to generate frequent itemsets in
market basket analysis?
[ ] A. apriori from mlxtend.frequent_patterns
[ ] B. association_rules from apyori
[ ] C. frequent_patterns from sklearn
[ ] D. itemsets from pandas
HIGHP - Page 2 of 30
, CORRECT: A. apriori from mlxtend.frequent_patterns
The mlxtend library provides the apriori function in frequent_patterns to generate frequent itemsets. Other
options are not standard for this purpose.
5. When preparing transaction data for Apriori in Python, which format is typically
required?
[ ] A. A list of lists of items
[ ] B. A one-hot encoded boolean DataFrame
[ ] C. A sparse matrix of counts
[ ] D. A dictionary of item frequencies
CORRECT: B. A one-hot encoded boolean DataFrame
mlxtend's apriori expects a one-hot encoded boolean DataFrame (or a list of lists for apyori). One-hot
encoding is standard for mlxtend. Other formats are not directly accepted.
6. A rule has lift = 1.0. What does this imply about the items?
[ ] A. They are positively correlated.
[ ] B. They are negatively correlated.
[ ] C. They are independent.
[ ] D. They are perfectly correlated.
CORRECT: C. They are independent.
Lift = 1 indicates independence; the occurrence of the antecedent does not affect the consequent. Lift >1
indicates positive correlation, <1 negative. Other options misinterpret lift.
7. Which metric is most useful for identifying rules that are not simply due to high item
frequency?
[ ] A. Support
[ ] B. Confidence
[ ] C. Lift
[ ] D. Leverage
CORRECT: C. Lift
Lift accounts for the baseline frequency of the consequent, revealing true associations beyond high support.
Confidence can be high for frequent consequents. Leverage is similar but less common. Support alone is
insufficient.
HIGHP - Page 3 of 30