{"id":40,"date":"2022-12-05T21:50:09","date_gmt":"2022-12-05T21:50:09","guid":{"rendered":"https:\/\/pressbooks.ccconline.org\/accmarketinganalytics2\/chapter\/module-3-readings-and-videos-part-2\/"},"modified":"2023-03-13T21:19:49","modified_gmt":"2023-03-13T21:19:49","slug":"module-3-readings-and-videos-part-2","status":"publish","type":"chapter","link":"https:\/\/pressbooks.ccconline.org\/accmarketinganalytics2\/chapter\/module-3-readings-and-videos-part-2\/","title":{"raw":"Module 3: Reading and Videos Part 2","rendered":"Module 3: Reading and Videos Part 2"},"content":{"raw":"<img class=\" wp-image-39 aligncenter\" src=\"https:\/\/pressbooks.ccconline.org\/accmarketinganalytics\/wp-content\/uploads\/sites\/105\/2022\/12\/Picture3.2-300x256.png\" alt=\"Cartoon showing market with sign stating &quot;Customers who bought this item: bananas, Also bought: carrots, bread, milk, etc.&quot;\" width=\"436\" height=\"372\" \/>\r\n<h1>Market Basket Analysis<\/h1>\r\nMarket basket analysis uses purchase transaction data to identify associations between products or combinations of products and services that occur together frequently. A market basket analysis can be applied on past customer transactions at the store or on the website to understand customer buying habits.\r\n\r\n<strong>Instructor Note:<\/strong> The following video is a great overview of market basket analysis and help support the lecture below and it is up to you as the instructor to determine which parts of the video you share and when.\r\n\r\n[embed]https:\/\/youtu.be\/guVvtZ7ZClw[\/embed]\r\n<h2>Decision Making using market basket analysis<\/h2>\r\nThere are many practical applications of market basket analysis, and both online and brick-and-mortar businesses, particularly retailers, apply market basket analysis. Once a product is placed in a shopping basket, market basket analysis enables companies to influence a customer\u2019s selection of other products. While some of these products may be on the customer\u2019s shopping list, other product selections could be influenced by marketers using different strategies to remind or introduce customers to additional products or services. While market basket analysis is useful for in-store recommendations, it is even more valuable for online purchasing because the information on product selection is in real time \u2013 once the item is placed in an online shopping cart, the retailer can provide immediate suggestions of other items customers are likely to purchase. Amazon uses collaborative filtering to offer customized recommendations to customers making online purchases. Target has been successful using transaction data to engage customers. They use customer sales patterns to influence and assist with product selections. Traditional supermarkets use the analysis to plot item location in their stores to increase sales. Market basket analysis enables marketers to identify what products are being purchased together. Uncovering relationships between products and service bundle purchases is important for understanding customer purchase patterns and maximizing sales.\r\n<h2>Affinity Analysis<\/h2>\r\nMarket basket analysis is an unsupervised learning algorithm that explores patterns between two or more items using association rules, or affinity analysis. An association rule helps define relationships in a transaction dataset using if-then statements. By analyzing transaction data, we discover dependencies between items purchased in the form of IF [item A] THEN [item b] statements. For example, if soda (antecedent) is purchased, then milk (consequent) will also likely be purchased. Thus, the antecedent corresponds to the IF item, and the consequent corresponds to the THEN item in the association rule. Association analysis identifies that the antecedent and consequent of the rule share a co-occurrent relationship. These rules are commonly generated using the Apriori algorithm. The Apriori algorithm identifies combinations of items in datasets that are associated with each other. Associations are identified based on the frequency in which the products occur together in the basket.\r\n<h2>Concepts of support, confidence, and lift.<\/h2>\r\nWhen using market basket analysis, there are three measures that indicate the reliability of the associations: support, confidence, and lift. Support measures the frequency of the specific association rule and shows the number of transactions that include the items of interest divided by the total number of transactions. (Using Exhibit 9-5) For example, the itemset [Soda; Milk] appears six out of ten times. Support can be calculated as 6\/10 or 0.60.\u00a0 This means, 60 percent of baskets contain both soda and milk.\r\n\r\nConfidence measures the conditional probability of the consequent occurring given that the antecedent occurs. It is calculated as the count of purchases consisting of both items in the association rules divided by the total number of times the antecedent item is purchased. This measure indicates the percentage of times the association rules is correct. Here, using the association rule IF [soda] THEN [milk], confidence is 6\/8 or 0.75.\u00a0 When a grocery basket contains soda, 75 percent of them also contain milk.\r\n\r\nFinally, lift enables us to evaluate the strength of the association. In a lift ratio. We divide the confidence with a benchmark score called \u2018expected confidence.\u2019\u00a0 Calculate expected confidence as the number of total transactions that includes the consequent item divided by the total number of transactions. So, using the association rule IF [soda] THEN [milk], expected confidence would be 6\/10 or 0.6.\u00a0 Then lift ratio is calculated as the ratio of the confidence divided by the expected confidence, here 0.75\/0.60 or 1.25.\u00a0 Lift validates that a transaction containing both products is not random. A lift value of 1 indicates no relationship within the itemset. A lift value higher than 1 indicates a relationship between the products or services that is higher than would be expected if they were independent. A lift value below 1 indicates a negative relationship that the products or services in the itemset are unlikely to be purchased together. If soda is purchased, then with a confidence of 75 percent milk will also be purchased. The lift of 1.25 suggests that the purchase of milk is 1.25 times more likely when soda is purchased compared to shoppers just purchasing milk.\r\n<h2>Collaborative filtering and association rule<\/h2>\r\n<span class=\"TextRun SCXW192141051 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW192141051 BCX0\">In association rules, the goal is to find items that are frequently purchased together and to make a customer recommendation every time one of those items is added to the basket. This application is useful when there are products or services frequently purchased together repeatedly. But what is a <\/span><span class=\"NormalTextRun ContextualSpellingAndGrammarErrorV2Themed SCXW192141051 BCX0\">company<\/span><span class=\"NormalTextRun SCXW192141051 BCX0\"> wants to offer personalized recommendations for the user when items are not purchased as frequently? In cases like this, collaborative filtering can be used which enables us to analyze data on user preferences, then recommend products based on their similarity to other customers. The goal of collaborative filtering is to recommend new products and services to a customer who has not purchased them before. The goals differ from collaborative filtering to association rules. While association rules use if-then statements, collaborative filtering has two main types: item to item filtering and user to item filtering.<\/span><\/span><span class=\"EOP SCXW192141051 BCX0\" data-ccp-props=\"{&quot;134245417&quot;:false,&quot;201341983&quot;:0,&quot;335559739&quot;:240,&quot;335559740&quot;:276}\">\u00a0<\/span>\r\n\r\n<img class=\"alignnone size-full wp-image-149\" src=\"https:\/\/pressbooks.ccconline.org\/accmarketinganalytics2\/wp-content\/uploads\/sites\/105\/2022\/12\/Picture1-2.jpg\" alt=\"Table 1 example of items and frequency\" width=\"420\" height=\"538\" \/>\r\n\r\n&nbsp;\r\n\r\n&nbsp;\r\n\r\n&nbsp;\r\n\r\n&nbsp;","rendered":"<p><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-39 aligncenter\" src=\"https:\/\/pressbooks.ccconline.org\/accmarketinganalytics\/wp-content\/uploads\/sites\/105\/2022\/12\/Picture3.2-300x256.png\" alt=\"Cartoon showing market with sign stating &quot;Customers who bought this item: bananas, Also bought: carrots, bread, milk, etc.&quot;\" width=\"436\" height=\"372\" srcset=\"https:\/\/pressbooks.ccconline.org\/accmarketinganalytics2\/wp-content\/uploads\/sites\/105\/2022\/12\/Picture3.2-300x256.png 300w, https:\/\/pressbooks.ccconline.org\/accmarketinganalytics2\/wp-content\/uploads\/sites\/105\/2022\/12\/Picture3.2-1024x873.png 1024w, https:\/\/pressbooks.ccconline.org\/accmarketinganalytics2\/wp-content\/uploads\/sites\/105\/2022\/12\/Picture3.2-768x655.png 768w, https:\/\/pressbooks.ccconline.org\/accmarketinganalytics2\/wp-content\/uploads\/sites\/105\/2022\/12\/Picture3.2-65x55.png 65w, https:\/\/pressbooks.ccconline.org\/accmarketinganalytics2\/wp-content\/uploads\/sites\/105\/2022\/12\/Picture3.2-225x192.png 225w, https:\/\/pressbooks.ccconline.org\/accmarketinganalytics2\/wp-content\/uploads\/sites\/105\/2022\/12\/Picture3.2-350x298.png 350w, https:\/\/pressbooks.ccconline.org\/accmarketinganalytics2\/wp-content\/uploads\/sites\/105\/2022\/12\/Picture3.2.png 1155w\" sizes=\"auto, (max-width: 436px) 100vw, 436px\" \/><\/p>\n<h1>Market Basket Analysis<\/h1>\n<p>Market basket analysis uses purchase transaction data to identify associations between products or combinations of products and services that occur together frequently. A market basket analysis can be applied on past customer transactions at the store or on the website to understand customer buying habits.<\/p>\n<p><strong>Instructor Note:<\/strong> The following video is a great overview of market basket analysis and help support the lecture below and it is up to you as the instructor to determine which parts of the video you share and when.<\/p>\n<p><iframe loading=\"lazy\" id=\"oembed-1\" title=\"Apriori Algorithm Explained | Association Rule Mining | Finding Frequent Itemset | Edureka\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/guVvtZ7ZClw?feature=oembed&#38;rel=0&#38;rel=0\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n<h2>Decision Making using market basket analysis<\/h2>\n<p>There are many practical applications of market basket analysis, and both online and brick-and-mortar businesses, particularly retailers, apply market basket analysis. Once a product is placed in a shopping basket, market basket analysis enables companies to influence a customer\u2019s selection of other products. While some of these products may be on the customer\u2019s shopping list, other product selections could be influenced by marketers using different strategies to remind or introduce customers to additional products or services. While market basket analysis is useful for in-store recommendations, it is even more valuable for online purchasing because the information on product selection is in real time \u2013 once the item is placed in an online shopping cart, the retailer can provide immediate suggestions of other items customers are likely to purchase. Amazon uses collaborative filtering to offer customized recommendations to customers making online purchases. Target has been successful using transaction data to engage customers. They use customer sales patterns to influence and assist with product selections. Traditional supermarkets use the analysis to plot item location in their stores to increase sales. Market basket analysis enables marketers to identify what products are being purchased together. Uncovering relationships between products and service bundle purchases is important for understanding customer purchase patterns and maximizing sales.<\/p>\n<h2>Affinity Analysis<\/h2>\n<p>Market basket analysis is an unsupervised learning algorithm that explores patterns between two or more items using association rules, or affinity analysis. An association rule helps define relationships in a transaction dataset using if-then statements. By analyzing transaction data, we discover dependencies between items purchased in the form of IF [item A] THEN [item b] statements. For example, if soda (antecedent) is purchased, then milk (consequent) will also likely be purchased. Thus, the antecedent corresponds to the IF item, and the consequent corresponds to the THEN item in the association rule. Association analysis identifies that the antecedent and consequent of the rule share a co-occurrent relationship. These rules are commonly generated using the Apriori algorithm. The Apriori algorithm identifies combinations of items in datasets that are associated with each other. Associations are identified based on the frequency in which the products occur together in the basket.<\/p>\n<h2>Concepts of support, confidence, and lift.<\/h2>\n<p>When using market basket analysis, there are three measures that indicate the reliability of the associations: support, confidence, and lift. Support measures the frequency of the specific association rule and shows the number of transactions that include the items of interest divided by the total number of transactions. (Using Exhibit 9-5) For example, the itemset [Soda; Milk] appears six out of ten times. Support can be calculated as 6\/10 or 0.60.\u00a0 This means, 60 percent of baskets contain both soda and milk.<\/p>\n<p>Confidence measures the conditional probability of the consequent occurring given that the antecedent occurs. It is calculated as the count of purchases consisting of both items in the association rules divided by the total number of times the antecedent item is purchased. This measure indicates the percentage of times the association rules is correct. Here, using the association rule IF [soda] THEN [milk], confidence is 6\/8 or 0.75.\u00a0 When a grocery basket contains soda, 75 percent of them also contain milk.<\/p>\n<p>Finally, lift enables us to evaluate the strength of the association. In a lift ratio. We divide the confidence with a benchmark score called \u2018expected confidence.\u2019\u00a0 Calculate expected confidence as the number of total transactions that includes the consequent item divided by the total number of transactions. So, using the association rule IF [soda] THEN [milk], expected confidence would be 6\/10 or 0.6.\u00a0 Then lift ratio is calculated as the ratio of the confidence divided by the expected confidence, here 0.75\/0.60 or 1.25.\u00a0 Lift validates that a transaction containing both products is not random. A lift value of 1 indicates no relationship within the itemset. A lift value higher than 1 indicates a relationship between the products or services that is higher than would be expected if they were independent. A lift value below 1 indicates a negative relationship that the products or services in the itemset are unlikely to be purchased together. If soda is purchased, then with a confidence of 75 percent milk will also be purchased. The lift of 1.25 suggests that the purchase of milk is 1.25 times more likely when soda is purchased compared to shoppers just purchasing milk.<\/p>\n<h2>Collaborative filtering and association rule<\/h2>\n<p><span class=\"TextRun SCXW192141051 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"auto\"><span class=\"NormalTextRun SCXW192141051 BCX0\">In association rules, the goal is to find items that are frequently purchased together and to make a customer recommendation every time one of those items is added to the basket. This application is useful when there are products or services frequently purchased together repeatedly. But what is a <\/span><span class=\"NormalTextRun ContextualSpellingAndGrammarErrorV2Themed SCXW192141051 BCX0\">company<\/span><span class=\"NormalTextRun SCXW192141051 BCX0\"> wants to offer personalized recommendations for the user when items are not purchased as frequently? In cases like this, collaborative filtering can be used which enables us to analyze data on user preferences, then recommend products based on their similarity to other customers. The goal of collaborative filtering is to recommend new products and services to a customer who has not purchased them before. The goals differ from collaborative filtering to association rules. While association rules use if-then statements, collaborative filtering has two main types: item to item filtering and user to item filtering.<\/span><\/span><span class=\"EOP SCXW192141051 BCX0\" data-ccp-props=\"{&quot;134245417&quot;:false,&quot;201341983&quot;:0,&quot;335559739&quot;:240,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-149\" src=\"https:\/\/pressbooks.ccconline.org\/accmarketinganalytics2\/wp-content\/uploads\/sites\/105\/2022\/12\/Picture1-2.jpg\" alt=\"Table 1 example of items and frequency\" width=\"420\" height=\"538\" srcset=\"https:\/\/pressbooks.ccconline.org\/accmarketinganalytics2\/wp-content\/uploads\/sites\/105\/2022\/12\/Picture1-2.jpg 420w, https:\/\/pressbooks.ccconline.org\/accmarketinganalytics2\/wp-content\/uploads\/sites\/105\/2022\/12\/Picture1-2-234x300.jpg 234w, https:\/\/pressbooks.ccconline.org\/accmarketinganalytics2\/wp-content\/uploads\/sites\/105\/2022\/12\/Picture1-2-65x83.jpg 65w, https:\/\/pressbooks.ccconline.org\/accmarketinganalytics2\/wp-content\/uploads\/sites\/105\/2022\/12\/Picture1-2-225x288.jpg 225w, https:\/\/pressbooks.ccconline.org\/accmarketinganalytics2\/wp-content\/uploads\/sites\/105\/2022\/12\/Picture1-2-350x448.jpg 350w\" sizes=\"auto, (max-width: 420px) 100vw, 420px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"author":83,"menu_order":2,"template":"","meta":{"pb_show_title":"on","pb_short_title":"","pb_subtitle":"","pb_authors":[],"pb_section_license":""},"chapter-type":[],"contributor":[],"license":[],"class_list":["post-40","chapter","type-chapter","status-publish","hentry"],"part":35,"_links":{"self":[{"href":"https:\/\/pressbooks.ccconline.org\/accmarketinganalytics2\/wp-json\/pressbooks\/v2\/chapters\/40","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pressbooks.ccconline.org\/accmarketinganalytics2\/wp-json\/pressbooks\/v2\/chapters"}],"about":[{"href":"https:\/\/pressbooks.ccconline.org\/accmarketinganalytics2\/wp-json\/wp\/v2\/types\/chapter"}],"author":[{"embeddable":true,"href":"https:\/\/pressbooks.ccconline.org\/accmarketinganalytics2\/wp-json\/wp\/v2\/users\/83"}],"version-history":[{"count":4,"href":"https:\/\/pressbooks.ccconline.org\/accmarketinganalytics2\/wp-json\/pressbooks\/v2\/chapters\/40\/revisions"}],"predecessor-version":[{"id":150,"href":"https:\/\/pressbooks.ccconline.org\/accmarketinganalytics2\/wp-json\/pressbooks\/v2\/chapters\/40\/revisions\/150"}],"part":[{"href":"https:\/\/pressbooks.ccconline.org\/accmarketinganalytics2\/wp-json\/pressbooks\/v2\/parts\/35"}],"metadata":[{"href":"https:\/\/pressbooks.ccconline.org\/accmarketinganalytics2\/wp-json\/pressbooks\/v2\/chapters\/40\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/pressbooks.ccconline.org\/accmarketinganalytics2\/wp-json\/wp\/v2\/media?parent=40"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/pressbooks.ccconline.org\/accmarketinganalytics2\/wp-json\/pressbooks\/v2\/chapter-type?post=40"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/pressbooks.ccconline.org\/accmarketinganalytics2\/wp-json\/wp\/v2\/contributor?post=40"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/pressbooks.ccconline.org\/accmarketinganalytics2\/wp-json\/wp\/v2\/license?post=40"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}