-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.xml
239 lines (225 loc) · 22.1 KB
/
index.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Mai Le</title>
<link>https://lephanthuymai.github.io/</link>
<atom:link href="https://lephanthuymai.github.io/index.xml" rel="self" type="application/rss+xml" />
<description>Mai Le</description>
<generator>Wowchemy (https://wowchemy.com)</generator><language>en-us</language><copyright>©2022 by Mai Le.</copyright><lastBuildDate>Sun, 13 Jun 2021 22:04:23 -0700</lastBuildDate>
<image>
<url>https://lephanthuymai.github.io/images/icon_huecf101d77c4d50fee89da6355e975757_514918_512x512_fill_lanczos_center_2.png</url>
<title>Mai Le</title>
<link>https://lephanthuymai.github.io/</link>
</image>
<item>
<title>Data Science EDA Package</title>
<link>https://lephanthuymai.github.io/project/datascience-eda/</link>
<pubDate>Sun, 13 Jun 2021 22:04:23 -0700</pubDate>
<guid>https://lephanthuymai.github.io/project/datascience-eda/</guid>
<description></description>
</item>
<item>
<title>Hypothesis Testing Simply Explained</title>
<link>https://lephanthuymai.github.io/post/hypothesis-testing-simply-explained/</link>
<pubDate>Tue, 02 Mar 2021 20:55:42 +0700</pubDate>
<guid>https://lephanthuymai.github.io/post/hypothesis-testing-simply-explained/</guid>
<description><p>When I was working for a software outsourcing firm, we had performance appraisal every six months. A lengthy process was applied to ensure fair recognition but there were always rumors on how employees reporting under certain departments or even under certain managers tend to have higher chances of promotion. The HR department made some simple calculations like averaging ratings of members under each manager/each department then compared the results, but is it enough to use that as an indicator that one department&rsquo;s managers are easier on their employees than another? Similar problems in management when you need to validate a theory or a bias, can be addressed using <strong>hypothesis testing</strong>.</p>
<h2 id="what-is-hypothesis-testing-then">What is hypothesis testing then?</h2>
<img src="https://www.kdnuggets.com/wp-content/uploads/xkcd-p-value-jellybeans.jpg" width="400"/>
<p><em>Source: <a href="https://xkcd.com/882/">https://xkcd.com/882/</a></em></p>
<p>A hypothesis test is a statistical test designed to verify if there is enough evidence in the data sample to reject or not reject an assumption. This assumption is called the <strong>null hypothesis</strong>, it is the status quo, meaning there is no difference among test groups, nothing interesting happens, any observed differences are by sampling or by errors. When examining the data and finding enough &ldquo;evidence&rdquo;, we can reject the null hypothesis and accept an <strong>alternative hypothesis</strong>. In the example of performance appraisal rating above, the null hypothesis states that there is no difference in the way different departments rate their employees, whereas the alternative hypothesis states that there is indeed difference in ratings among departments.</p>
<h2 id="how-can-we-find-evidence-to-reject-the-null-hypothesis">How can we find &ldquo;evidence&rdquo; to reject the null hypothesis?</h2>
<p>This is where things get more complicated: we need to define and compute a <strong><a href="https://en.wikipedia.org/wiki/Test_statistic" target="_blank" rel="noopener">test statistic</a></strong> and a <strong><a href="https://en.wikipedia.org/wiki/P-value" target="_blank" rel="noopener">p-value</a></strong>, then compare the p-value with a predefined threshold called <em>alpha</em>, commonly assigned with 0.05, to decide whether to reject or not reject the null hypothesis.</p>
<img src="https://i.kym-cdn.com/entries/icons/original/000/018/489/nick-young-confused-face-300x256-nqlyaa.jpg" alt="Confused" width="300"/>
<p><em>Source: <a href="https://knowyourmeme.com/memes/confused-nick-young/photos">https://knowyourmeme.com/memes/confused-nick-young/photos</a></em></p>
<h2 id="how-does-it-actually-work">How does it actually work?</h2>
<p>Let&rsquo;s take a closer look at our performance rating example. Our null hypothesis states that there is no difference in ratings between departments, in order to test this hypothesis, we define the test statistic as the difference in the average ratings among different departments.</p>
<p>To demonstrate the analysis, I generated 400 random ratings (continuous random values between 3 and 5) for 2 departments A and B with 200 records each in a way that ratings from department B are generally 0.2 higher than those of department A, then randomly drawn 100 records from each department and saved the dataset in a <a href="rating_samples.csv">csv file</a>.</p>
<img src="csv_file_capture.png" width=200/>
<p>I am using <a href="https://www.r-project.org/about.html" target="_blank" rel="noopener">R</a> to help with the test given its simplicity, more detailed instructions can be found below if you would like to re-produce the analysis.</p>
<p>Let&rsquo;s load the dataset and use R&rsquo;s <code>lm</code> function to conduct the test.</p>
<pre><code>library(tidyverse)
library(broom)
# load the dataset
rating_df &lt;- read_csv(&quot;rating_samples.csv&quot;)
# conduct the test
lm(rating ~ dept, rating_df) %&gt;% tidy() %&gt;% filter(term != '(Intercept)')
</code></pre>
<img src="lm_result.png" width=500/>
<p><code>lm</code> function will use <code>dept</code> A&rsquo;s values as the baseline, each row is the result of the test whether there is a difference between a department&rsquo;s ratings and the baseline department&rsquo;s: if <code>p.value</code> is less than the significance threshold, we can reject the null hypothesis and accept the alternative hypothesis that there is difference between the two groups of data.</p>
<p>Given our <code>p.value</code> for <code>deptB</code> row is 0.000376, which is much lower than the significance threshold <em>alpha=0.05</em>, we have enough evidence to reject the null hypothesis and accept the alternative hypothesis that there is indeed a difference between ratings of department A and B.</p>
<p>Column <code>statistic</code> is our test statistic: the mean of deptB&rsquo;s ratings is at approximately 3.618, whilst column <code>term</code> is the coefficient of department in a linear regression to predict that department&rsquo;s <code>rating</code>, simply put: when a person moves from department A to department B, their rating will likely increase by 0.281.</p>
<p>Sounds like magic? I know!</p>
<p>In case you want to re-create the analysis above, please follow the steps below:</p>
<ol>
<li>Install <a href="https://rstudio.com/products/rstudio/download/" target="_blank" rel="noopener">RStudio</a></li>
<li>Set the working directory to where your analysis files to be: Session &gt; Set Working Directory &gt; Choose Directory &hellip;</li>
<li>Copy or create new <code>rating_samples.csv</code> in the working directory, it should contain department name (<code>dept</code>) and their employee ratings (<code>rating</code>)</li>
<li>Copy and execute the script above in the Console panel</li>
<li>If your <code>p.value</code> for each department (<code>deptX</code>) is less than 0.05, you can reject the null hypothesis and accept the alternative hypothesis: that department&rsquo;s ratings are different from the baseline department&rsquo;s</li>
</ol>
<h2 id="conclusion">Conclusion</h2>
<p>The application of hypothesis testing in management is endless: we can use it to justify the investment in various marketing strategies or use it to validate the effectiveness of different product designs (A/B Testing) or use it to validate if there is a gender bias in recruitment, etc.</p>
<p>There are actually different types of <a href="https://en.wikipedia.org/wiki/Statistical_hypothesis_testing" target="_blank" rel="noopener">hypothesis testing</a>, each with different sets of <a href="https://en.wikipedia.org/wiki/Statistical_assumption" target="_blank" rel="noopener">assumptions</a>, please do proper research before applying this test as using a wrong test will yield a misleading result.</p>
</description>
</item>
<item>
<title>COVID-19 Data Portal</title>
<link>https://lephanthuymai.github.io/project/covid-19-data-portal/</link>
<pubDate>Sun, 21 Feb 2021 13:27:36 +0700</pubDate>
<guid>https://lephanthuymai.github.io/project/covid-19-data-portal/</guid>
<description></description>
</item>
<item>
<title>Surviving a 7-Scrum-Team Project</title>
<link>https://lephanthuymai.github.io/post/surving-a-7-Scrum-team-project/</link>
<pubDate>Fri, 08 Jan 2021 14:36:15 +0700</pubDate>
<guid>https://lephanthuymai.github.io/post/surving-a-7-Scrum-team-project/</guid>
<description><p>I was a Director of Delivery at an outsourcing firm when we got an opportunity to work with this client, let&rsquo;s call them Company H. They would like to build a new generation restaurant management system as a software-as-a-service platform. My role was both Account Manager and Program Manager for this client, I gave the team&rsquo;s overall direction, resolved cross-team impediments, reported the overall status and risks to the PMO and Steering Committee.</p>
<p>The project started with 2 Scrum Teams then eventually grew to 7 Scrum Teams working on a <strong>single</strong> product backlog.</p>
<p>Just like other programs with multiple Scrum teams working on the same product backlog, we experienced the great challenge of dependency and integration hell, on top of that, we had 14-hour timezone difference between the team&rsquo;s and their PO&rsquo;s location, not to mention the challenges of outsourcing nature (tightly bound by contractual terms and sometimes lack of trust). In order to make our life easier, I chose to apply <a href="https://www.scrum.org/scaled-professional-scrum-nexus-practices" target="_blank" rel="noopener">Nexus</a> framework with adaptations to ensure multiple team&rsquo;s works resulted in an integrated product. The model was not perfect but it was the best we could do at the time considering our constraints.</p>
<p><img src="featured.png" alt="Nexus Poster"></p>
<p>Each of our Scrum Team was composed of 1 Product Owner, 1 Scrum Master, 6 developers and 4 testers. Our Nexus Integration Team included an Onsite Coordinator (proxy of the PO), Nexus Scrum Master (rotating role), 3 Scrum Masters (each serving 2 Scrum Teams), 2 members from each Development Team, 1 Technical Architect, 1 Test Architect. At the program level, we had Steering Committee including both companies' executives, Technical Governance and PMO to maintain transparency in communication and decision making.</p>
<p>Each sprint was 2-week duration, we applied Sprint Planning, Daily Scrum for each Scrum team and Nexus Sprint Planning, Nexus Backlog Refinement, Nexus Daily Scrum, Nexus Sprint Review, Nexus Sprint Review at Nexus level.</p>
<p>We conducted <strong>Nexus Backlog Refinement</strong> meeting once every week, in which we had representatives from all Development teams and the PO to review the priority product backlog items and dependencies among them. The PO made initial team assignment for the reviewed product backlog items based on the teams' discussion and dependencies. We utilized Google Spreadsheet retrieving data directly from JIRA API to make the planning easier, we could have used <a href="https://www.atlassian.com/blog/portfolio-for-jira/portfolio-for-jira-3-and-beyond#:~:text=Portfolio%20for%20Jira%20helps%20you,on%20the%20same%20page%20throughout." target="_blank" rel="noopener">JIRA Portfolio</a>, but it was more costly.</p>
<p>In the <strong>Nexus Sprint Planning</strong> meeting, the Development teams sized the backlog items assigned to them, reviewed the plan in comparison to their availability for the new sprint, discuss with other teams and the PO on their plan before finalizing. There was one important outcome missing: we did not define the Nexus Sprint Goal as we did not see how important it was back then.</p>
<p>We had <strong>Nexus Daily Scrum</strong> with representatives from all Development teams to discuss on integration issues, the meetings were very helpful to early identify and address integration challenges, but they were also a pain given a lot of people involved, we tried different approaches to simplify and make these meetings more efficient, eventually we reached to a point when it took less than 1 hour but were not able to reduce it further .</p>
<p>The team applied <strong>Gitflow with feature branch</strong> workflow, when a feature was completed (developed and tested), it would be merged into the dev branch and built automatically to a test environment for the PO to early review and feedback. We had some automated end-end regression test suites to validate integrated workflows and 60-80% unit test (branch) coverage for all code, which helped to save some testing time, but given the early stage of the product with ever-changing features and tight deadline, the majority of the testing was done manually including scripted tests and exploratory tests.</p>
<p>We had <strong>weekly PMO meetings</strong> to report the progress which was visualized using Sprint burn-down chart and Release burn-down chart. Risks were also raised and monitored in those meetings.</p>
<p>The <strong>Nexus Sprint Review</strong> was hosted by the PO, the teams demonstrated what was done, received feedback from the stakeholders, which would be added to the backlog for next sprints. The meeting was recorded and shared across the organization so that everyone was aware of the progress.</p>
<p>The Teams conducted <strong>Nexus Sprint Retrospective</strong> together, then Sprint Retro for each team, feedback/action items were shared among the teams and PO. We applied various practices as Lean Coffee or simple brainstorming technique on Start/Stop/Continue, sometimes the SMs got creative and asked the teams to do sentimental drawings or arranged team outing to create a comfortable environment to share their ideas.</p>
<p>Overall, the processes we applied were helpful, we demonstrated well our capability in a fast-pace project and won much more business with the client, our team size grew from 20-ish engineers to more than 100 engineers at some point, but that was not without challenges, I will write more about our lesson learn, especially in release management in the upcoming posts.</p>
</description>
</item>
<item>
<title>Online Purchase Intention Prediction</title>
<link>https://lephanthuymai.github.io/project/online-purchase-intention-prediction/</link>
<pubDate>Mon, 21 Dec 2020 11:51:55 +0700</pubDate>
<guid>https://lephanthuymai.github.io/project/online-purchase-intention-prediction/</guid>
<description></description>
</item>
<item>
<title>Slides</title>
<link>https://lephanthuymai.github.io/slides/example/</link>
<pubDate>Tue, 05 Feb 2019 00:00:00 +0000</pubDate>
<guid>https://lephanthuymai.github.io/slides/example/</guid>
<description><h1 id="create-slides-in-markdown-with-wowchemy">Create slides in Markdown with Wowchemy</h1>
<p><a href="https://wowchemy.com/" target="_blank" rel="noopener">Wowchemy</a> | <a href="https://owchemy.com/docs/managing-content/#create-slides" target="_blank" rel="noopener">Documentation</a></p>
<hr>
<h2 id="features">Features</h2>
<ul>
<li>Efficiently write slides in Markdown</li>
<li>3-in-1: Create, Present, and Publish your slides</li>
<li>Supports speaker notes</li>
<li>Mobile friendly slides</li>
</ul>
<hr>
<h2 id="controls">Controls</h2>
<ul>
<li>Next: <code>Right Arrow</code> or <code>Space</code></li>
<li>Previous: <code>Left Arrow</code></li>
<li>Start: <code>Home</code></li>
<li>Finish: <code>End</code></li>
<li>Overview: <code>Esc</code></li>
<li>Speaker notes: <code>S</code></li>
<li>Fullscreen: <code>F</code></li>
<li>Zoom: <code>Alt + Click</code></li>
<li><a href="https://github.com/hakimel/reveal.js#pdf-export" target="_blank" rel="noopener">PDF Export</a>: <code>E</code></li>
</ul>
<hr>
<h2 id="code-highlighting">Code Highlighting</h2>
<p>Inline code: <code>variable</code></p>
<p>Code block:</p>
<pre><code class="language-python">porridge = &quot;blueberry&quot;
if porridge == &quot;blueberry&quot;:
print(&quot;Eating...&quot;)
</code></pre>
<hr>
<h2 id="math">Math</h2>
<p>In-line math: $x + y = z$</p>
<p>Block math:</p>
<p>$$
f\left( x \right) = ;\frac{{2\left( {x + 4} \right)\left( {x - 4} \right)}}{{\left( {x + 4} \right)\left( {x + 1} \right)}}
$$</p>
<hr>
<h2 id="fragments">Fragments</h2>
<p>Make content appear incrementally</p>
<pre><code>{{% fragment %}} One {{% /fragment %}}
{{% fragment %}} **Two** {{% /fragment %}}
{{% fragment %}} Three {{% /fragment %}}
</code></pre>
<p>Press <code>Space</code> to play!</p>
<p><span class="fragment " >
One
</span>
<span class="fragment " >
<strong>Two</strong>
</span>
<span class="fragment " >
Three
</span></p>
<hr>
<p>A fragment can accept two optional parameters:</p>
<ul>
<li><code>class</code>: use a custom style (requires definition in custom CSS)</li>
<li><code>weight</code>: sets the order in which a fragment appears</li>
</ul>
<hr>
<h2 id="speaker-notes">Speaker Notes</h2>
<p>Add speaker notes to your presentation</p>
<pre><code class="language-markdown">{{% speaker_note %}}
- Only the speaker can read these notes
- Press `S` key to view
{{% /speaker_note %}}
</code></pre>
<p>Press the <code>S</code> key to view the speaker notes!</p>
<aside class="notes">
<ul>
<li>Only the speaker can read these notes</li>
<li>Press <code>S</code> key to view</li>
</ul>
</aside>
<hr>
<h2 id="themes">Themes</h2>
<ul>
<li>black: Black background, white text, blue links (default)</li>
<li>white: White background, black text, blue links</li>
<li>league: Gray background, white text, blue links</li>
<li>beige: Beige background, dark text, brown links</li>
<li>sky: Blue background, thin dark text, blue links</li>
</ul>
<hr>
<ul>
<li>night: Black background, thick white text, orange links</li>
<li>serif: Cappuccino background, gray text, brown links</li>
<li>simple: White background, black text, blue links</li>
<li>solarized: Cream-colored background, dark green text, blue links</li>
</ul>
<hr>
<section data-noprocess data-shortcode-slide
data-background-image="/media/boards.jpg"
>
<h2 id="custom-slide">Custom Slide</h2>
<p>Customize the slide style and background</p>
<pre><code class="language-markdown">{{&lt; slide background-image=&quot;/media/boards.jpg&quot; &gt;}}
{{&lt; slide background-color=&quot;#0000FF&quot; &gt;}}
{{&lt; slide class=&quot;my-style&quot; &gt;}}
</code></pre>
<hr>
<h2 id="custom-css-example">Custom CSS Example</h2>
<p>Let&rsquo;s make headers navy colored.</p>
<p>Create <code>assets/css/reveal_custom.css</code> with:</p>
<pre><code class="language-css">.reveal section h1,
.reveal section h2,
.reveal section h3 {
color: navy;
}
</code></pre>
<hr>
<h1 id="questions">Questions?</h1>
<p><a href="https://github.com/wowchemy/wowchemy-hugo-modules/discussions" target="_blank" rel="noopener">Ask</a></p>
<p><a href="https://wowchemy.com/docs/managing-content/#create-slides" target="_blank" rel="noopener">Documentation</a></p>
</description>
</item>
</channel>
</rss>