<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Abhi Abduh on Medium]]></title>
        <description><![CDATA[Stories by Abhi Abduh on Medium]]></description>
        <link>https://medium.com/@abhi.abduh?source=rss-1f9b99a1357c------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*hnpf3jQ78J_Cr5UahlB6Xw.png</url>
            <title>Stories by Abhi Abduh on Medium</title>
            <link>https://medium.com/@abhi.abduh?source=rss-1f9b99a1357c------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 19:21:43 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@abhi.abduh/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[A Statistical Test of Insurance Medical Charge —  Using Python and OLS]]></title>
            <link>https://medium.com/@abhi.abduh/a-statistical-test-of-insurance-medical-charge-using-python-and-ols-636a82063318?source=rss-1f9b99a1357c------2</link>
            <guid isPermaLink="false">https://medium.com/p/636a82063318</guid>
            <category><![CDATA[linear-regression]]></category>
            <category><![CDATA[statistics]]></category>
            <category><![CDATA[statistical-analysis]]></category>
            <category><![CDATA[data-analysis]]></category>
            <dc:creator><![CDATA[Abhi Abduh]]></dc:creator>
            <pubDate>Sat, 08 Jul 2023 21:22:55 GMT</pubDate>
            <atom:updated>2023-07-08T22:40:16.884Z</atom:updated>
            <content:encoded><![CDATA[<h3>A Statistical Test of Insurance Medical Charge — Using Python and OLS Model.</h3><p>A statistical investigation about the correlation of each variables on medical health charges Insurance datasets.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*lT91wSYpt2mutWzV" /><figcaption>Photo by <a href="https://unsplash.com/@northfolk?utm_source=medium&amp;utm_medium=referral">NORTHFOLK</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p><strong>See the code thoroughly to understand this report :</strong></p><ul><li>Jupyter Notebook: <a href="https://github.com/curpe/statistical_test_insurance.git">https://github.com/curpe/statistical_test_insurance.git</a></li><li>Dataset: <a href="https://www.kaggle.com/datasets/teertha/ushealthinsurancedataset">https://www.kaggle.com/datasets/teertha/ushealthinsurancedataset</a></li></ul><h4>1. Introduction</h4><p>A data analyst wants to conduct an investigation about the correlation of each variables on medical health charges patient data. So he define the problems within the variables contained in the dataset:</p><ul><li>Which variables exert a significant influence with patient medical charges?</li><li>Does the Sex variable correlates with patient medical charges?</li><li>Does the Smoker variable correlates with patient medical charges?</li><li>Does the Region variable correlates with patient medical charges?</li><li>Does the Age variable correlates with patient medical charges?</li><li>Does the Bmi (body mass index) variable correlates with patient medical charges?</li><li>Does the Children variable correlates with patient medical charges?</li></ul><h4>2. Visualization</h4><p>We mostly using Box plot and point plot, and we combine into multiple categories to see a significant differentiation relating to the data. After conducting several codes to show the visualization, here are the results.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YlwdfQR8FnNvE_GaOOo6vQ.png" /><figcaption>Graph 1. Visualization ofCharges by Sex and Charges by Smoker using pointplot and boxplot.</figcaption></figure><p>There was a significant different between Gender and Smoker which tend to correlates with the number of charges.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K2MXgYWDQTJP5nWEPzFiXg.png" /><figcaption>Graph 2. Smoker Type and Sex.</figcaption></figure><p>Here is the visualization if we conjoint the variables. Notice the difference on the Type of smokers, relatively high than non smokers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QMAPq6yEJv9o6Mxh9kEZ1Q.png" /><figcaption>Graph 3. Comparison between Type of Smoker and Region.</figcaption></figure><p>To redefine the result, we compare between to each region, which Smoker still relatively high in the entire region.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/366/1*jffvTcvC7hU9TTeERr37Cw.png" /><figcaption>Graph 4. Pearson Correlation</figcaption></figure><p>In the graph 4, we notice that except the smoker and sex factor, other variables (bmi, children, and age) does not yields a significant result based on the Pearson correlation scores.</p><h4>3. Statistical Test</h4><p>We notice that Sex and Smoker category are tend to be more relevant with high charges. So, we conduct a statistical T test.</p><p><strong>Statistical Test for Charges with Smoker</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/862/1*oP4rukHX-d3V7K-RW3IJTw.png" /><figcaption>Graph 5. Statistical test result for Charges with Smoker Category</figcaption></figure><blockquote><strong>We rejected the H0</strong>. P Value considered small compared with alpha value. <strong>(0.002333 &lt; 0.05) </strong>If the P Value &lt; Alpha, <strong>There’s a significant difference</strong> between Smokers Charges with Non Smokers Charges.</blockquote><p><strong>Statistical Test for Charges with Sex</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/824/1*-EQWRZCFBTUqWjwECG6aOg.png" /><figcaption>Graph 6. Statistical test result for Charges with Sex Category</figcaption></figure><blockquote><strong>We rejected the H0</strong>. P Value considered small compared with alpha value. <strong>(0.025 &lt; 0.05)</strong> If the P Value &lt; Alpha, There’s a significant difference between Male Charges with Female Charges.</blockquote><h4>For <strong>Region category</strong>, we use ANOVA test to allow us analyzing multiple variable that more than two groups.</h4><p><strong>ANOVA Test to see the influence between Charges with Region</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uaUyoE26hX69bUwgR8fLvA.png" /><figcaption>Graph 7. ANOVA test result to the Region category.</figcaption></figure><blockquote>After conducting ANOVA test, it has been defined that the <strong>p-value &gt; 0.05</strong>, so we failed to reject H0 as there are no significant between the region and charges.</blockquote><p>After that, now we understand that variable <strong>Bmi, Age, Children, and Region</strong> shows a weaker score compared to<strong> Sex and Smoker</strong> type in relation to <strong>Charges. </strong>We decided to drop them and more focusing into Sex and Smoker type to conduct Ordinary Least Square Regression (OLS).</p><h4>4. Regression Model</h4><p>After encoding the Sex and Smoker Category into numeric value, We construct the model using this syntax:</p><pre>#Construct the model with OLS<br>linear_model = smf.ols(&#39;charges ~ age + sex_female + sex_male + smoker_no + smoker_yes&#39;, data = encoded_df).fit()<br>print(linear_model.summary())</pre><p>And here are the results:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WyfNbUFarK7fkEOzk0Lf9Q.png" /><figcaption>Graph 8. OLS Regression Results to Sex and Smoker Category.</figcaption></figure><p><strong>Summary of the OLS;</strong></p><ul><li>The <strong>P&gt;|t| (p-value)</strong> indicates a significant results with 0.000 value on each variable.</li><li>F Test (1192) shows that the test are eligible.</li><li>R Squared score achieved a fit regression result providing 0.729 (common scores is 0.5).</li><li>Coefficient score also yields a significant results that mostly above 1.</li></ul><p><strong>Coefficient Interpretation;</strong></p><ul><li>Coefficient Interpretation; smoker and sexc yields positive numbers, while smoker_no has negative numbers. Means that the higher smoker or sex, tend to have higher the Charges. While smoker_no tend to have lower charges.</li><li>When all predictors are constant (or equal zero), the average base of Charges 4470.3441</li><li>An increase of 1 smoker_yes increases the average of Charges by 1.223e</li><li>An increase of 1 smoker_no decrease the average of Charges by -7758.2806</li></ul><h4>4. Analysis and Interpretation</h4><p><strong>Which variables exert a significant influence with patient medical charges?</strong></p><ul><li>Answer: There are two major variables that influence the medical charges, which is Smoker and Sex variables.</li></ul><p><strong>Does the Sex variable corellates with patient medical charges?</strong></p><ul><li>Answer: Sex variables corellates with the medical charges. With Male have a significant tendency to have high charges compared to Female.</li></ul><p><strong>Does the Smoker variable corellates with patient medical charges?</strong></p><ul><li>Answer: Smoker variable does corellates with patient medical charges. There’s a different tendency that Smokers predominantly have a higher charges than Non Smokers</li></ul><p><strong>Does the Region variable corellates with patient medical charges?</strong></p><ul><li>Answer: There is no significant differences between Charges and Region as per the statistics defined in ANOVA test</li></ul><p><strong>Does the Age variable corellates with patient medical charges?</strong></p><ul><li>Answer: There’s indifferent higher score with other variables like Bmi and Children but still inadequate to justify the correlation between Age and Charges. It shows us <strong>0.313</strong> which is a sign of a weak correlation as per conducting pearson correlation test.</li></ul><p><strong>Does the Bmi (body mass index) variable corellates with patient medical charges?</strong></p><ul><li>Answer: There’s a little correlation between Bmi and Charges. It shows us <strong>0.061</strong> which is a sign of a weak correlation as per conducting pearson correlation test</li></ul><p><strong>Does the Children variable corellates with patient medical charges?</strong></p><ul><li>Answer: There’s a little correlation between Children and Charges. It shows us <strong>0.073</strong> which is a sign of a weak correlation as per conducting pearson correlation test</li></ul><h4>5. Suggestion and Conclusion</h4><p>The fact that <strong>Smokers and Sex</strong> affects the significant numbers of charges in medical payments. There are factors we can do to reduce the high charges, which is: Although smokers predominantly are Male gender, both female and male should practice healthier lifestyle progressively, especially for middle to low income to avoid default, unstability on financial, and loss.</p><h4>Reference:</h4><ul><li>Pacmann.ai’s Module.</li><li>Kaggle</li></ul><p><strong>© 2023, Abhi Abduh — Pacmann</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=636a82063318" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Search Ads Campaign on Shopping Mall Data sets — EDA Exercise]]></title>
            <link>https://medium.com/@abhi.abduh/search-ads-campaign-on-shopping-mall-data-sets-eda-exercise-816bb26af777?source=rss-1f9b99a1357c------2</link>
            <guid isPermaLink="false">https://medium.com/p/816bb26af777</guid>
            <category><![CDATA[tableau]]></category>
            <category><![CDATA[search-engine-marketing]]></category>
            <category><![CDATA[data-analytics]]></category>
            <dc:creator><![CDATA[Abhi Abduh]]></dc:creator>
            <pubDate>Mon, 03 Jul 2023 17:34:44 GMT</pubDate>
            <atom:updated>2023-07-08T22:39:49.752Z</atom:updated>
            <content:encoded><![CDATA[<h3>Search Ads Campaign on Shopping Mall Data sets — EDA using Tableau Dashboard</h3><blockquote>A “compact” explanation about my analysis of Search Ads Campaign on the shopping mall data sets. In correlation with Business Analytics subjects from <strong>Pacmann.ai’s</strong> Data Science and Analytics course.</blockquote><h4>Collaterals</h4><p><strong>Tableau Dashboard:<em> </em></strong><a href="https://public.tableau.com/app/profile/abhi.abduh/viz/SearchAdsCampaignDashboard/SalesperformanceDashboard?publish=yes">https://public.tableau.com/app/profile/abhi.abduh/viz/SearchAdsCampaignDashboard/SalesperformanceDashboard?publish=yes</a></p><p><strong>Datasets: <em><br></em></strong><a href="https://www.kaggle.com/datasets/marceaxl82/shopping-mall-paid-search-campaign-dataset"><em>https://www.kaggle.com/datasets/marceaxl82/shopping-mall-paid-search-campaign-dataset</em></a></p><p><strong><em>Disclaimer and Limitation<br></em></strong><em>We are not conducting sanity checking on the keyword selection and performance. <br>We cannot identify how much cost/day that the campaign would have to spend.<br>Time frame limited to only 5 months starting from July to November.<br>This analysis may not work to certain entities and industry, or different approach on producing the datasets into the dashboard.</em></p><h4>Introduction</h4><p>Search Ads or Paid Search is the most clinical way of Digital Marketing to absorb abundance of insights from Keywords by interpreting user intention based on the interaction of the keyword they have search on the internet and the keyword we selected on the machine that provided to customer.</p><h4>Background</h4><p>The dataset containing data of a 2021 5 months paid search campaign of a United states shopping mall which containing information about the ad group advertising, clicks, conversions, impressions, revenues and costs.</p><h4><strong>Problem Statements</strong></h4><p>The dashboard will be given to the <strong>Managers </strong>for his daily usage. However, we did not have a <strong>dashboard to be presented</strong>, all the data was stored in <strong>excel sheets,</strong> and usually finds lacks of time to check as there were millions of tabs in his browser, so he doesn’t have the speed to make analysis.</p><p>There is no visualization as it is hard to interpret when presenting to the board members, hence it is hard for the board member to understand the meanings behind numbers.</p><p>Some said there was a bloat spent on the campaign in which reduce the optimum acquisition to spend. <strong>We need to conduct sanity checking</strong>.</p><h4><strong>Goals</strong></h4><ol><li>Measure the most valued campaign by analyzing monthly CTR and Conversion.</li><li>Identify which category or ad groups drives the most revenue.</li><li>Identify which category or ad groups that needs to be optimized.</li></ol><h4><strong>User Flows and User Persona</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/856/1*QIHUwRtxIWCTwqB7RiUqJg.png" /><figcaption>figure 1. Design Thinking</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/425/1*A9ZjjeTnpKPRxCaPaxE5cw.png" /><figcaption>figure 2. Persona of users that use the dashboard</figcaption></figure><h4><strong>Explanation</strong></h4><p>Diagrams to see better context how to analyze using the dashboard:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4CUxrAAGpR4zbozp9lnaHA.png" /><figcaption>figure 3. Diagram analysis journey</figcaption></figure><h4>a. Analysis on the bigger picture (Cost and Revenue Factors)</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1017/0*nE3oD9CWDn_yae1n" /><figcaption>figure 4. Marketing Cost soars as Revenue numbers pegged to the trend from past 5 months</figcaption></figure><p><strong>Insights from figure 4</strong></p><ol><li>Highest marketing cost to spend is in July before it took exponential growth in November.</li><li>Downtrend happened from August to September, marketing cost decreased as the Revenue statistic entails the performance.</li><li>Break event point in October but only small projectiles.</li><li>Marketing costs increased, made the numbers of revenue soars.</li></ol><p><strong>Key takeaways and Solutions</strong></p><ol><li>Marketing cost does the job but it does not make a significant impact to ignite the revenue as it is dependent on the marketing cost.</li><li>We might want to Improve the ad level and keyword theming from that possibly boost the revenue. Take out the lowest performance category.</li><li>Improve Experience and Sales by look upon the user journey and Lower the pricing to get more additional acquisition.</li></ol><h4><strong>b. Exploratory on Sales and Ads Performance</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*PbdoYKxQKjbRi_7k" /><figcaption>figure 5. Sales Performance</figcaption></figure><p>We combined these dashboard for a more proper guide. See the figure 5 and 6 and scroll down to read the interpretations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*77E_Y3uW-3eCwz4H" /><figcaption>figure 6. Ads Performance</figcaption></figure><p><strong>Insights on figure 6 &amp; 7 and Solutions:</strong></p><ol><li><strong>Shop Coupon</strong>, <strong>Promo Code</strong>, <strong>Coupon Code</strong>, and <strong>Discount Code</strong> are fourth highest driving revenue by Category. But looking at the spend amount given to the campaign, there should be an optimization with the <strong>Keyword Selection</strong> and take out the poorest one.</li><li>Try to switch the popular keyword (most clicked) into Phrase Match and Exact match.</li><li>Keyword theming and dynamic keywords can be beneficial to increase consideration.</li><li>Interesting to see the <strong>Black Friday </strong>campaign. It only comes up on an annual basis but it’s worth the bucks to optimize the marketing budget by spend above the average and give offers to produce more acquisition.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*N5tZl9u_uE2hIc4X" /><figcaption>figure 7. CPC on Ads Dashboard</figcaption></figure><p><strong>Insights on figure 7 and Solutions:</strong></p><p>Highest <strong>CPC </strong>on <strong>Shop Promo</strong>, <strong>Offer</strong>, <strong>Promo code </strong>categories indicates the keyword exclusion or selection can be picked wisely. Or perhaps, remove one of these categories and cross-distribution that would be beneficial to increase revenue from other campaigns.</p><h4>c. Metrics Benchmarking</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1008/0*TynNVVc_-UN2GMDT" /><figcaption>figure 8. Ads Performance metrics for 5 months</figcaption></figure><p>First, we compared this metrics of ourselves with this source: <a href="https://www.wordstream.com/blog/ws/2022/05/18/search-advertising-benchmarks"><strong>Benchmark</strong></a></p><p>To summarize — We have chosen <strong>Shopping, Collectibles, and Gifts (general) </strong>to this campaign<strong> (Although it’s still biased) with the metrics stats:</strong></p><blockquote>Cost per Click (CPC) : $2.25</blockquote><blockquote>Cost per Acq. : $30.27</blockquote><blockquote>CTR: 5.50%</blockquote><blockquote>Conv. Rate: 3.07%</blockquote><h4>d. Conclusion</h4><p>With the entire benchmark provided, it is safe to say that our campaigns in this dataset surpassed a positive trend, lowering budget should be just fine, as long as we can maintain:</p><ol><li>Our eyes to quick at identifying CPC and CAC inflation</li><li>Good proportion CTR to Conversion.</li></ol><p>If the k<strong>eyword</strong> has been optimized, then we should look upon the product, sales, and user journey. Looking at the cumulative numbers of profit and loss, it is recommended for shop owners or business people to manage pricing and strategy on improving the products and services.</p><p><strong>Further Recommendations</strong></p><p>However, A/B tests and keeping an eye on the Keyword stats on the ad level group should be always to look at, especially working with Search Engines like Google Ads, controlling the CPC and CAC must be number prioritization.</p><p>© 2023 Abhi Abduh — Business Analytics</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=816bb26af777" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Data Cleaning and EDA — Using SQL and Python]]></title>
            <link>https://medium.com/@abhi.abduh/data-cleaning-and-eda-project-abde1e2222f5?source=rss-1f9b99a1357c------2</link>
            <guid isPermaLink="false">https://medium.com/p/abde1e2222f5</guid>
            <category><![CDATA[pandas-tutorial]]></category>
            <category><![CDATA[pandas-dataframe]]></category>
            <category><![CDATA[data-cleaning]]></category>
            <category><![CDATA[data-analysis]]></category>
            <dc:creator><![CDATA[Abhi Abduh]]></dc:creator>
            <pubDate>Sun, 16 Apr 2023 15:13:43 GMT</pubDate>
            <atom:updated>2023-07-08T22:39:07.975Z</atom:updated>
            <content:encoded><![CDATA[<p><em>You are a data analyst, you want to calculate the data using Python, but are you assure the data provided are clean? and the numbers are accurate?</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*E0wTN9IdlrDsM4E3" /><figcaption>Photo by <a href="https://unsplash.com/@iurte?utm_source=medium&amp;utm_medium=referral">Iker Urteaga</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h4><strong>Access the code here:</strong></h4><p><a href="https://github.com/curpe/data_cleaning_and_EDA.git">GitHub - curpe/data_cleaning_and_EDA: Process on cleaning the data until it can be distributed to do some exploratory data analysis and calculations using Pandas and Matplotlib,</a></p><h4>Overview</h4><p>In this articles, i write about how we should clean all the data before it would be distributed to calculate to avoid misinterpretation and improve accuracy.</p><p><strong>Disclaimer: </strong>The information contained on here are solely for education purposes. Writer intent only to shares and explains his experience during the project. This article is not an advice, and writer encourage readers to use their own methods.</p><h4>I break down the thought process into 5 steps:</h4><ol><li>Determine the tables/data needed.</li><li>Finding your objectives based on the tables.</li><li>Conduct data cleaning: In this case, there are 4 points of data cleaning (1. Remove the missing value, 2. Remove duplication, 3. Unifying formats, 4. Handling outliers, 5. Compressing range data)</li><li>Explore the data (EDA)</li><li>Making visualization after code the EDA</li></ol><h4>Findings</h4><ul><li>No outliers, duplications, null, and missing data anymore before performing EDA.</li><li>Formats are easy and readable.</li><li>Visualization and calculation-ready</li></ul><h4>1. Import libraries and connect the data</h4><p>Import all relevant libraries and run the tables:</p><pre>#Import library yang dibutuhkan<br>import sqlite3 <br>import pandas as pd<br>import seaborn as sns<br>import numpy as np<br><br>#import library visualization<br>import matplotlib.ticker as ticker<br>import matplotlib.pyplot as plt<br><br>#import warnings<br>import warnings<br>warnings.filterwarnings(&#39;ignore&#39;)</pre><p>After that, we connect each data frames of our own that has been picked in , in this case, i’m using table order, product, seller, customer, product category to merge into one.</p><pre>#Running query examples<br>def run_query(query):<br>    conn = sqlite3.connect(&quot;olist.db&quot;)<br>    return pd.read_sql(query, conn)<br><br>def show_tables():<br>    query = &#39;&#39;&#39;<br>          SELECT * <br>          FROM sqlite_master <br>          WHERE type IN (&quot;table&quot;, &quot;view&quot;);<br>          &#39;&#39;&#39;<br>    return run_query(query)<br><br>#tabel product category name translation<br>product_category_name_translation = &#39;&#39;&#39;<br>SELECT<br>    product_category_name,<br>    product_category_name_english<br>FROM<br>    product_category_name_translation<br>&#39;&#39;&#39;<br>product_category_name_translation = run_query(product_category_name_translation)<br>show_tables()</pre><pre># Then merge it using this query:<br><br>#using pandas query<br>merged_df = pd.merge(olist_order_dataset,olist_order_customer_dataset, on=&#39;customer_id&#39;, how=&#39;outer&#39;)<br>merged_df = pd.merge(merged_df,olist_order_items_dataset, on=&#39;order_id&#39;, how=&#39;outer&#39;)<br>merged_df = pd.merge(merged_df, olist_sellers_dataset, on=&#39;seller_id&#39;, how=&#39;outer&#39;)<br>merged_df = pd.merge(merged_df, olist_products_dataset, on=&#39;product_id&#39;, how=&#39;outer&#39;)<br>merged_df = pd.merge(merged_df, product_category_name_translation, on=&#39;product_category_name&#39;, how=&#39;outer&#39;)</pre><p>Once the the data is merged, we arrange the columns as we want using this query:</p><pre># Rearrange position of each columns<br>new_order = [&#39;order_id&#39;, &#39;order_item_id&#39;, &#39;product_id&#39;, &#39;product_category_name&#39;, &#39;product_category_name_english&#39;, &#39;order_purchase_timestamp&#39;, &#39;order_approved_at&#39;, &#39;order_delivered_customer_date&#39;, &#39;customer_id&#39;, &#39;customer_unique_id&#39;, &#39;customer_zip_code_prefix&#39;, &#39;customer_city&#39;, &#39;customer_state&#39;, &#39;seller_id&#39;, &#39;seller_zip_code_prefix&#39;, &#39;seller_city&#39;, &#39;seller_state&#39;, &#39;price&#39;]<br><br># Using loc method to specify column order <br>merged_df = merged_df.loc[:, new_order]<br>merged_df.info()</pre><p>And the columns arranged based on the order from 0 to 17 as we wanted.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/476/1*ejXYlc6WJzSkBbf6zu-mlA.png" /><figcaption>figure index using .info()</figcaption></figure><h4>2. Begin Data Cleaning</h4><p>In this case, we should take a look on the missing values</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/417/1*8IX698qDRPMvAFMPj7HZ4g.png" /><figcaption>Missing data values column</figcaption></figure><p>Perform this query to drop all missing values:</p><pre>#making the drop permanent using inplace<br>merged_df.dropna(inplace=True)<br><br>#define fresh variable<br>df = merged_df</pre><p>Then no more missing values</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/412/1*F1k33HrnTY-4-KsUpykK1Q.png" /><figcaption>After being cleaned</figcaption></figure><p>Secondly, remove outliers using Inter Quartile Range (IQR):</p><pre># Function<br>def outliers(data, col_name, replace=False):<br>    Q1 = data[col_name].quantile(.25)<br>    Q3 = data[col_name].quantile(.75)<br>    IQR = Q3 - Q1<br>lower_IQR = data[col_name] &lt; Q1 - 1.5 * IQR<br>    upper_IQR = data[col_name] &gt; Q3 + 1.5 * IQR<br>    if replace:<br>        new_outliers_value = data[col_name].median()<br>        data.loc[lower_IQR | upper_IQR, col_name] = new_outliers_value<br>        data[lower_IQR | upper_IQR][col_name].head()<br>    else:<br>        outliers = data[lower_IQR | upper_IQR]<br>        return outliers<br>    <br>hasil_outliers = outliers(df, &quot;price&quot;)<br>print(&quot;Number of Outliers: &quot;, hasil_outliers[&quot;price&quot;].count())<br>print(&quot;Total of Datapoints: &quot;, df[&quot;price&quot;].count())<br>print(&quot;Outliers to Total Data Percentage: &quot;\<br>      + f&quot;{round((hasil_outliers[&#39;price&#39;].count()/df[&#39;price&#39;].count())*100, 3)}%&quot;)</pre><p>Before calculation</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/353/1*e6Dq8JQK_w7SKYL87BSMFA.png" /><figcaption>Outliers appears</figcaption></figure><p>After running the calculation</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/345/1*KZoW92dRzhxQBLPreDQbag.png" /><figcaption>No more outliers</figcaption></figure><p>Outliers has been removed, IQR would help you to fill the missing values or anomaly in your data sets.</p><h4>3. Exploration on the Data</h4><p>After the data is clean, we can freely explore without worrying if theres inaccuracy with the data.</p><p>in this case, i will give a simple examples by visualizing the data to see to check the data has been cleaned out.</p><p>a. Checking and visualizing Quarterly Sales Volume using this code:</p><pre># Filter data for 2016 to 2018<br>yearly = df[(df[&#39;order_purchase_timestamp&#39;].dt.year &gt;= 2016) &amp; (df[&#39;order_purchase_timestamp&#39;].dt.year &lt;= 2018)]<br><br># Calculate quarterly sales volumes<br>quarterly = yearly.groupby([yearly[&#39;order_purchase_timestamp&#39;].dt.year.rename(&#39;year&#39;), pd.PeriodIndex(yearly[&#39;order_purchase_timestamp&#39;], freq=&#39;Q&#39;).rename(&#39;quarter&#39;)])[&#39;price&#39;].sum().reset_index()<br><br># Visualization<br>plt.figure(figsize=(20, 10))<br>sns.barplot(data=quarterly, x=&#39;quarter&#39;, y=&#39;price&#39;)<br>plt.title(&#39;Quarterly Sales Volume (2016-2018)&#39;, fontsize=20)<br>plt.xlabel(&#39;Quarter&#39;, fontsize=16)<br>plt.ylabel(&#39;Sales Volume&#39;, fontsize=16)<br><br>plt.show()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*b65vQ98wClRWhIFmRx9iAw.png" /><figcaption>Quarterly Sales Volume</figcaption></figure><p>b. See the most demanded product based on the order using this code:</p><pre># Group the DataFrame by the product category<br>agg_product = df.groupby([&#39;product_category_name_english&#39;]).count().head(30)<br><br># Sort values using &#39;order_approved_at&#39;, we wanna check based on count of the order<br>agg_product = agg_product.sort_values(by=&#39;order_approved_at&#39;,ascending=False)<br><br>#Creating a vertical bar plot<br>plt.figure(figsize=(20,5))<br>sns.barplot(x=agg_product.index, y=&#39;order_approved_at&#39;, data=agg_product, color=&#39;blue&#39;)<br>plt.title(&#39;Most Ordered Product Category&#39;)<br>plt.xlabel(&#39;Product Category&#39;)<br>plt.ylabel(&#39;Orders&#39;)<br>plt.xticks(rotation=90)<br>plt.show()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VSRw7S4IQTfaazX1PqrGtw.png" /><figcaption>All time most ordered product.</figcaption></figure><blockquote><strong>Verdict:</strong></blockquote><blockquote><em>There are plenty of room to explore the datasets and creating visualization using seaborn and matplotlib. The code aboves were created to help a simple and consice guidance on how to process and distribute the data before we calculate anything from it. It is mandatory to handles all outliers and null datapoints in order to avoid miss interpretation and increase the accuracy as possible.</em></blockquote><blockquote>For more codes, please consider to visit my github and clone the codes as you wish to help you more understand and intuitively know the context</blockquote><blockquote><a href="https://github.com/curpe/data_cleaning_and_EDA/blob/main/data_cleaning_and_EDA.ipynb">https://github.com/curpe/data_cleaning_and_EDA/blob/main/data_cleaning_and_EDA.ipynb</a></blockquote><h4><strong>Abhi Abduh — Pacmann.ai Project © copyright</strong></h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=abde1e2222f5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Insurance Case — Pacmann.ai Probability Project]]></title>
            <link>https://medium.com/@abhi.abduh/insurance-case-pacmann-ai-probability-project-ff7588a14a86?source=rss-1f9b99a1357c------2</link>
            <guid isPermaLink="false">https://medium.com/p/ff7588a14a86</guid>
            <category><![CDATA[statistik]]></category>
            <category><![CDATA[probability-distributions]]></category>
            <category><![CDATA[mathematics]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Abhi Abduh]]></dc:creator>
            <pubDate>Wed, 12 Apr 2023 16:53:41 GMT</pubDate>
            <atom:updated>2023-04-16T15:18:50.132Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Math Probability Project — Using Python to Analyze the Data</strong></h3><p><em>A Math Probability and Visualization Pacmann.ai project. This article is written in Bahasa Indonesia.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*I5QgomHzBF1MFVdg" /><figcaption>Photo by <a href="https://unsplash.com/@edge2edgemedia?utm_source=medium&amp;utm_medium=referral">Edge2Edge Media</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h4>Anda bisa mengakses code nya disini:</h4><p><a href="https://github.com/curpe/probability_project.git">GitHub - curpe/probability_project: As required in order to pass and qualify in the class of Probability of Pacmann.ai&#39;s bootcamp.</a></p><p><strong><em>Datasets:</em></strong><em> insurance.csv</em></p><blockquote><em>Dataset ini memberikan informasi mengenai data tagihan kesehatan personal.</em></blockquote><p><strong><em>Fitur data set: </em></strong><em><br>- Memiliki 7 column yang terdiri dari:<br>- Umur (age)<br>- Jenis Kelamin (sex)<br>- Indeks Berat Badan (body_mass_index)<br>- Jumlah Anak (children)<br>- Perokok (smoker)<br>- Daerah (region)<br>- Tagihan (charges)</em></p><p><em>Jumlah dari data set memiliki 1338 baris.</em></p><p><em>Tidak ada kolom yang berisi “Null” atau “NaN” atau tidak ada “Missing Value” dari dataset ini sehingga peneliti tidak perlu menerapkan cleaning data.</em></p><p><em>Data diolah oleh peneliti menggunakan tools python dan beberapa modul untuk mempermudah kalkulasi numerik.</em></p><blockquote><strong>Limitasi dari project ini adalah masih banyak nya kesimpulan yang diambil secara biased. Bahan acuan untuk sebuah belum akurat, dan hanya terbatas dalam data frame yang ditampilkan.</strong></blockquote><h3>1. Menampilkan distribusi di setiap region</h3><p>Dalam kasus ini, kita ingin melihat distribusi peluang biaya asuransi di berbagai wilayah Amerika Serikat.</p><p>Untuk melihat distribusi peluang biaya asuransi, kita menggunakan kode Python dengan menggunakan pustaka seaborn dan matplotlib. Pertama-tama, kita membuat sebuah gambar dengan ukuran 18x10 dengan menggunakan fungsi</p><blockquote><strong><em>plt.figure(figsize=(18,10))</em></strong></blockquote><p>Selanjutnya, kita membagi gambar tersebut menjadi empat bagian dengan menggunakan fungsi</p><blockquote><strong><em>plt.subplot(2,2,1), plt.subplot(2,2,2), plt.subplot(2,2,3), dan plt.subplot(2,2,4)</em></strong></blockquote><p>Pada setiap bagian, kita menampilkan distribusi peluang biaya asuransi dari masing-masing wilayah (southwest, southeast, northwest, dan northeast).</p><p>Untuk setiap wilayah, kita memilih data dari kolom “charges” di dalam DataFrame “insurance” menggunakan syntax</p><blockquote><strong><em>insurance[insurance[“region”] == “nama_wilayah”][[“charges”]]</em></strong></blockquote><p>Selanjutnya, kita memvisualisasikan distribusi peluang menggunakan fungsi sns.distplot dengan parameter bins = 20, hist = True, dan kde = True. Kita juga menambahkan judul pada setiap grafik dengan menggunakan fungsi plt.title.</p><p>Terakhir, kita menampilkan gambar dengan menggunakan fungsi plt.show().</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1014/1*zh1kTflibn8vIOdwtVHeyA.png" /><figcaption>Distribusi dari setiap wilayah.</figcaption></figure><p>Memvisualisasikan distribusi peluang biaya asuransi di berbagai wilayah Amerika Serikat dan memahami perbedaan-perbedaan yang mungkin ada di antara wilayah-wilayah tersebut. Hal ini dapat membantu kita dalam membuat keputusan yang lebih baik terkait dengan asuransi kesehatan.</p><h3>2. <strong>Apakah variansi dari tagihan kesehatan perokok dan non perokok sama?</strong></h3><p>Dalam analisis data, kita sering ingin membandingkan distribusi peluang dari dua kelompok yang berbeda. Dalam kode ini, kita ingin membandingkan distribusi peluang biaya asuransi antara perokok dan non-perokok.</p><p>Untuk melihat distribusi peluang biaya asuransi antara perokok dan non-perokok, kita menggunakan kode Python dengan menggunakan pustaka seaborn dan matplotlib. Pertama-tama, kita membuat sebuah gambar dengan ukuran 10x6 dengan menggunakan fungsi plt.figure(figsize=(10,6)).</p><p>Selanjutnya, kita membagi gambar tersebut menjadi dua bagian dengan menggunakan fungsi plt.subplot(2,1,1) dan plt.subplot(2,1,2). Pada setiap bagian, kita menampilkan distribusi peluang biaya asuransi dari kelompok perokok dan non-perokok.</p><p>Untuk kelompok perokok, kita memilih data dari kolom “charges” di dalam DataFrame “tagihan_perokok” menggunakan syntax tagihan_perokok[“charges”]. Selanjutnya, kita memvisualisasikan distribusi peluang menggunakan fungsi sns.histplot dengan parameter bins = 15 dan menambahkan label sumbu x dan y dengan menggunakan fungsi plt.xlabel dan plt.ylabel.</p><p>Kita melakukan hal yang sama untuk kelompok non-perokok dengan menggunakan syntax tagihan_non_perokok[“charges”] dan menambahkan label sumbu x dan y yang sesuai.</p><p>Terakhir, kita menampilkan gambar dengan menggunakan fungsi plt.show().</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/620/1*_iOOrfBS52jFImuGDdIzfQ.png" /><figcaption>Jumlah tagihan dan besaran tagihan</figcaption></figure><p>Dalam kesimpulan, Jumlah tagihan perokok kisaran lebih besar dibandingkan non perokok yang dimana ini <strong>tidak sama.</strong></p><h3>3. <strong>Korelasi tagihan kesehatan dengan bmi dan variable tanggungan anak.</strong></h3><p>Salah satu cara untuk memvisualisasikan korelasi antara dua variabel adalah dengan menggunakan heatmap. Di bawah ini adalah contoh penggunaan heatmap untuk memvisualisasikan korelasi antara variabel-variabel dalam dataset “insurance”:</p><blockquote><strong><em>#panggil menggunakan metode fungsi corr()</em></strong></blockquote><blockquote><strong><em>insurance.corr()</em></strong></blockquote><blockquote><strong><em>#kita buat kan visualisasi nya</em></strong></blockquote><blockquote><strong><em>dataplot = sns.heatmap(insurance.corr(), cmap = “YlGnBu”, annot=True)</em></strong></blockquote><blockquote><strong><em>#tampakkan heat map</em></strong></blockquote><blockquote><strong><em>plt.show()</em></strong></blockquote><p>Pada kode di atas, pertama-tama kita menggunakan fungsi corr() untuk menghitung korelasi antara variabel-variabel dalam dataset “insurance”. Kemudian, kita menggunakan sns.heatmap() untuk membuat visualisasi heatmap dari korelasi tersebut. Parameter cmap digunakan untuk menentukan skema warna yang akan digunakan pada heatmap. Parameter annot digunakan untuk menampilkan nilai korelasi pada heatmap.</p><p>Selain heatmap, kita juga dapat menggunakan scatter plot untuk memvisualisasikan hubungan antara dua variabel. Di bawah ini adalah contoh penggunaan scatter plot untuk memvisualisasikan hubungan antara variabel “age” dan “charges” dalam dataset “insurance”:</p><blockquote><strong><em>plt.title(‘Age vs Charges’)</em></strong></blockquote><blockquote><strong><em>plt.xlabel(‘Age’)</em></strong></blockquote><blockquote><strong><em>plt.ylabel(‘Charges’)</em></strong></blockquote><blockquote><strong><em>plt.scatter(x =”age”, y = “charges”, color = ‘y’, data = insurance)</em></strong></blockquote><blockquote><strong><em>plt.show()</em></strong></blockquote><p>Pada kode di atas, kita menggunakan plt.scatter() untuk membuat scatter plot dari variabel “age” dan “charges”. Parameter x digunakan untuk menentukan variabel yang akan digunakan sebagai sumbu x, sedangkan parameter y digunakan untuk menentukan variabel yang akan digunakan sebagai sumbu y. Parameter color digunakan untuk menentukan warna titik-titik pada scatter plot.</p><p>Namun, pada visualisasi ini, dapat terlihat bahwa skala sumbu y pada kedua plot berbeda, sehingga sulit untuk membandingkan hubungan antara variabel “charges” dan variabel “age” pada kedua plot. Untuk mengatasi hal ini, kita dapat menggunakan parameter ylim pada plt.subplot() untuk menentukan batas sumbu y pada kedua plot menjadi sama, sehingga memudahkan kita dalam membandingkan hubungan antara kedua variabel. Berikut ini adalah contoh penggunaannya:</p><blockquote><strong><em>plt.figure(figsize=(10,6))</em></strong></blockquote><blockquote><strong><em>plt.subplot(2,1,1)</em></strong></blockquote><blockquote><strong><em>sns.histplot(tagihan_perokok[“charges”], bins = 15 )</em></strong></blockquote><blockquote><strong><em>plt.ylabel(‘charges tagihan perokok’)</em></strong></blockquote><blockquote><strong><em>plt.xlabel(‘jumlah charges’)</em></strong></blockquote><blockquote><strong><em>plt.subplot(2,1,2)</em></strong></blockquote><blockquote><strong><em>sns.histplot(tagihan_non_perokok[“charges”], bins = 15)</em></strong></blockquote><blockquote><strong><em>plt.ylabel(‘charges tagihan non perokok’)</em></strong></blockquote><blockquote><strong><em>plt.xlabel(‘jumlah charges’)</em></strong></blockquote><blockquote><strong><em>plt.ylim(0, 1000) # set batas sumbu y pada kedua plot menjadi sama</em></strong></blockquote><blockquote><strong><em>plt.show()</em></strong></blockquote><p>Dalam contoh di atas, kita menggunakan plt.subplot() untuk membuat dua plot histogram dari variabel “charges” untuk tagihan perokok dan non-perokok. Setelah itu, kita menggunakan plt.ylim() untuk menentukan batas sumbu y pada kedua plot menjadi sama, yaitu dari 0 hingga 1000.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/474/0*6ltMMCo59B5vDafO" /><figcaption>Korelasi antara umur dengan tagihan</figcaption></figure><p>Disini kesimpulan nya terlihat jika seiring bertambah nya usia, tagihan juga semakin ikut naik ke arah atas. Terdapat korelasi positif antara 2 data tersebut.</p><h3>4. Analisis Statistik untuk Menjawab Apakah Tagihan Kesehatan Laki-Laki Lebih Tinggi dari Perempuan</h3><p>Untuk menjawab pertanyaan ini, kita dapat menggunakan uji hipotesis. Terdapat dua hipotesis yang diajukan, yaitu hipotesis nol (h0) dan hipotesis alternatif (h1).</p><blockquote><strong><em>h0 = tagihan laki laki ≤ tagihan perempuan</em></strong></blockquote><blockquote><strong><em>h1 = tagihan laki-laki &gt; dari tagihan perempuan</em></strong></blockquote><p>Selanjutnya, kita dapat menggunakan uji proporsi untuk membandingkan tagihan antara laki-laki dan perempuan. Pertama-tama, kita perlu menentukan jumlah sampel untuk kedua kelompok. Kemudian, kita dapat menghitung jumlah kejadian positif pada setiap kelompok dengan membagi jumlah tagihan laki-laki dan perempuan yang lebih besar dari nilai rata-rata. Selanjutnya, kita dapat menghitung proporsi dan selisih proporsi antara kedua kelompok.</p><blockquote><strong><em># jumlah sampel</em></strong></blockquote><blockquote><strong><em>laki_laki = 676</em></strong></blockquote><blockquote><strong><em>perempuan = 662</em></strong></blockquote><blockquote><strong><em># jumlah kejadian positif pada setiap kelompok</em></strong></blockquote><blockquote><strong><em>p_a = 676/n p_b = 662/n</em></strong></blockquote><blockquote><strong><em># hitung proporsi dan selisih proporsi</em></strong></blockquote><blockquote><strong><em>proporsi_a = p_a / n_a</em></strong></blockquote><blockquote><strong><em>proporsi_b = p_b / n_b</em></strong></blockquote><blockquote><strong><em>selisih_proporsi = proporsi_a — proporsi_b</em></strong></blockquote><p>Setelah itu, kita perlu menghitung standar error (SE) dan z-score. Standar error digunakan untuk mengukur seberapa akurat proporsi sampel merepresentasikan populasi. Sedangkan z-score digunakan untuk menghitung tingkat signifikansi perbedaan proporsi antara kedua kelompok.</p><blockquote><strong><em># hitung standar error</em></strong></blockquote><blockquote><strong><em>SE = math.sqrt(proporsi_a*(1-proporsi_a)/n_a + proporsi_b*(1-proporsi_b)/n_b)</em></strong></blockquote><blockquote><strong><em># hitung z-score</em></strong></blockquote><blockquote><strong><em>z = selisih_proporsi / SE</em></strong></blockquote><p>Terakhir, kita dapat menentukan alpha, yang merupakan tingkat signifikansi yang diinginkan. Dalam hal ini, kita menggunakan alpha sebesar 0,05.</p><blockquote><strong><em># tentukan alpha dan hitung p-value</em></strong></blockquote><blockquote><strong><em>alpha = 0.05 p_value = 2 * (1 — norm.cdf(abs(z)))</em></strong></blockquote><p>Kemudian, kita dapat menghitung p-value, yaitu probabilitas mendapatkan selisih proporsi antara kedua kelompok sebesar atau lebih ekstrem dari selisih proporsi yang sebenarnya jika hipotesis nol benar. Jika p-value lebih kecil dari alpha, maka hipotesis nol akan ditolak. Sebaliknya, jika p-value lebih besar atau sama dengan alpha, maka hipotesis nol akan diterima.</p><blockquote><strong><em># tentukan keputusan berdasarkan p-value</em></strong></blockquote><blockquote><strong><em>if p_value &lt; alpha: print(“Tolak hipotesis nol”) else: print(“Terima hipotesis nol”)</em></strong></blockquote><p>Dengan menggunakan pendekatan ini, kita dapat menguji apakah terdapat perbedaan signifikan dalam tagihan kesehatan antara laki-laki dan perempuan. Dalam kode yang diberikan, kita dapat melihat bahwa selisih proporsi antara kedua kelompok adalah 0,036, sedangkan z-score adalah 2,47 dan p-value adalah 0,014.</p><p>Karena p-value lebih kecil dari alpha (0,014 &lt; 0,05), maka hipotesis nol dapat ditolak. Artinya, terdapat bukti yang cukup untuk menyatakan bahwa tagihan kesehatan laki-laki lebih tinggi dari perempuan secara signifikan.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/414/1*S83YLRAX2DEPESGNuQ4FEw.png" /><figcaption>Beda tidak terlalu significant, perlu data yang cukup banyak untuk membuktikan</figcaption></figure><p><strong>Namun, hasil ini hanya berdasarkan pada sampel, sehingga harus digeneralisasi dengan hati-hati dan mempertimbangkan faktor lain yang mungkin memengaruhi tagihan kesehatan.</strong></p><p>copyright ©Abhi Abduh — Pacmann.ai</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ff7588a14a86" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hotel Industry Demand — Exploratory Data Analysis Project.]]></title>
            <link>https://medium.com/@abhi.abduh/hotel-industry-demand-exploratory-data-analysis-project-104415dd4668?source=rss-1f9b99a1357c------2</link>
            <guid isPermaLink="false">https://medium.com/p/104415dd4668</guid>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Abhi Abduh]]></dc:creator>
            <pubDate>Sun, 12 Feb 2023 04:58:14 GMT</pubDate>
            <atom:updated>2023-02-12T04:58:14.126Z</atom:updated>
            <content:encoded><![CDATA[<h3>Hotel Industry Demand — Exploratory Data Analysis Project.</h3><h4>In this article, we cultivated a series of raw columns and row into a visual that business management or stakeholders can analyze on what steps should be taken, or develop action items.</h4><h4><strong>Project Duration:</strong></h4><p><em>January to February 2023.</em></p><h4><strong>Tools:</strong></h4><p><em>Tableau Public</em></p><h4><strong>Resources:</strong></h4><ol><li><em>The </em><a href="https://www.kaggle.com/datasets/jessemostipak/hotel-booking-demand"><em>Data</em></a></li><li><em>The </em><a href="https://public.tableau.com/app/profile/abhi.abduh/viz/ProjectVisualization-HotelIndustryDemand/Story1?publish=yes"><em>Visualization</em></a></li><li><em>The </em><a href="https://docs.google.com/document/d/1G8hddmUeJJfdsEXv-0NorM1rgPlchMNCdlpIyqCeEm8/edit"><em>Requirements</em></a><em> (Scratch notes)</em></li></ol><h4><strong>Objectives:</strong></h4><ul><li><em>Seeking trends arise in the hotel industry based on 2014 to 2017 cumulative data.</em></li><li><em>Increase sales from marketing strategy.</em></li><li><em>Learn Customer behavior to anticipate churn.</em></li></ul><h4>Outcome:</h4><p><em>The marketing strategy that going to be implemented in a span of 1 year to increase sales within the macro scope by implementing a marketing strategy on particular events and specific momentum in order to anticipate wasting efforts on excessive expenses and maintain efficiency on the execution wise.</em></p><blockquote><em>Since Medium does not support iFrame, the images will be attached by only screenshots.</em></blockquote><h3><strong>figure 1.</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pbZ4_NULGpXVUyD_z6UFgA.png" /><figcaption>Highest peak and lowest peak.</figcaption></figure><p>In figure 1, we noticed the highest peak of people making reservations was in July and August, and the lowest reservation was between November to January.</p><p>My assumption:</p><ol><li>People want to have a vacation during summer time (mid-year)</li><li>At the end &amp; beginning of a new year, most people spent Christmas with their family at home instead of going out to hotels.</li></ol><h3><strong>figure 2.</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*07h27xzNQHc9t3PCD7pFAg.png" /><figcaption>Most Popular Countries Making Reservation.</figcaption></figure><p>People mostly come from Portugal, and the UK the second, third, and fourth were from France and Spain. Nearly every non-Europan countries aren’t significantly making reservations.</p><p>My assumption:</p><ol><li>This data was taken from Portugal&#39;s hotel industry.</li><li>Europan countries have good productivity as they would love to travel a lot.</li></ol><h3><strong>figure 3.</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZDXv6dmaE1PdUDFqqRdg7w.png" /><figcaption>Most repeated guests come back when it is not peak season.</figcaption></figure><p>As we make presume this data was coming from, we notice that repeated guests are reluctant to come back when its peak season (mid-year) so they understand that the price will be higher than usual, and they understand the price will aim at international visitors.</p><h3><strong>figure 4.</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DspnlcACoVqvTePh3a90Kw.png" /><figcaption>We know City Hotel is cheaper, even though there are some people who still choose Resort.</figcaption></figure><p>City Hotel proportion wins when it has a good deal amount of reducing unexpected economical prices. At least they know they are not forever, so gotta save the bucks before the door gets knocked!</p><h3>Now, it’s time to make assumptions about the reason — perhaps — customers churn.</h3><h3>figure 5.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EYOaQedtOlUyi_mFm83A7w.png" /><figcaption>Cancellations arise when the customer makes changes to the reservation.</figcaption></figure><p>Are the hotels making abrupt changes to the price? is the management having unusual behavior toward its customers? or are they making research to compare hotel prices?</p><h3>figure 6.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aijOq15gkEVaoalPQiip_w.png" /><figcaption>Ohh some people step ahead of the lines (red).</figcaption></figure><p>Although we cannot force the customer to make cancellations, on one hand, the average of Check Out was huge, on the other hand, we should figure out to make the number of cancellations diluted.</p><h3>figure 7.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3OcBLCeCjP4xHyvf2TJEEA.png" /><figcaption>Correlation between Lead Time and Customer making cancellations using Negative Scatter Plot.</figcaption></figure><p>To get you more context on what the Lead Time is, here’s a definition i quoted from google;</p><blockquote>Lead time is the amount of time that passes from the start of a process until its conclusion.</blockquote><p>We have strong presumable thoughts if Lead Time duration is correlating with customer cancellations. In between 0 to 300, is the middle section where customers take action to leave, meanwhile 300 and above, only a few left.</p><h3><strong>Key Takeaways:</strong></h3><ul><li>We understand people only take vacations during summer, but to retain sales at the end of the year, i guess it’s time to make lower prices if you want to attract international visitors instead of fully loaded by repeat customers.</li><li>Make discounts for international visitors/countries that have lower reservation demands.</li><li>And to retain repeated customers I think we should explore giving them cheaper or discounted prices in the summer by personal.</li><li>City Hotel is maybe cheaper, but don’t you wanna try to have the family package or a couple of discount prices implemented on the Resort hotel to increase proportion/demands?</li><li>Maintain lower cancellations, by overseeing customer satisfaction, giving good hospitality, customer rewards, and retention strategy.</li></ul><blockquote>*Disclaimer: This articles was distributed purposefully to make Explanatory Data Analysis and inspirational study of a writer thoughts . No one should follow or deemed this essays to verify the current times to take actions. You shall Do Your Own Research.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=104415dd4668" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>