<div class="main-container">
<div class="sidebar">
<h2>Confidence Intervals</h2>
<ul>
<li><a href="#introduction">Introduction</a></li>
<li><a href="#case-1">Case 1: Z-Test</a></li>
<li><a href="#case-2">Case 2: t-Test</a></li>
<li><a href="#case-3">Case 3: Proportion</a></li>
<li><a href="#case-4">Case 4: Z vs t</a></li>
<li><a href="#case-5">Case 5: One-Sided</a></li>
<li><a href="#summary">Summary</a></li>
<li><a href="#references">References</a></li>
</ul>
</div>
<div class="content">
<!-- TOP BANNER IMAGE -->
<div class="top-photo">
<img src="Desain tanpa judul copy.svg" alt="Top Photo">
</div>
<div class="header">
<h1>Study Cases: Confidence Intervals</h1>
<p>Week 13 - Complete Guide with Real-World Business Applications</p>
</div>
<div id="introduction" class="intro-section">
<h3>Primary Learning Objectives</h3>
<p>Building comprehensive understanding of confidence intervals from basic level to advanced applications, enabling students to apply statistical inference in real-world business scenarios.</p>
<ul>
<li><strong>Methodology:</strong> Integrative approach combining conceptual explanations, mathematical derivations, descriptive statistical analysis, and interactive data interpretation to facilitate deep learning</li>
<li><strong>Material Coverage:</strong> Five core case studies covering Z-test for means (sigma known), t-test for means (sigma unknown), confidence intervals for proportions, comparison of Z vs t distributions, and one-sided confidence bounds</li>
<li><strong>Pedagogical Approach:</strong> Each case study is explained through four stages - problem context, formula understanding, step-by-step calculation, and business interpretation</li>
<li><strong>Practical Relevance:</strong> Material is designed to demonstrate direct applications in various fields such as e-commerce analytics, UX research, A/B testing, API performance monitoring, and SLA compliance verification</li>
</ul>
</div>
<div class="important-note">
<h4>Important Note</h4>
<p>A solid understanding of the concepts in this document will serve as an important foundation for advanced statistical topics such as hypothesis testing, regression analysis, experimental design, and predictive modeling. Each section is designed to build understanding progressively and cumulatively, ensuring that students develop both theoretical knowledge and practical skills in statistical inference and decision-making under uncertainty.</p>
</div>
<div class="case-header" id="case-1">
<h2>Case Study 1: Z-Test for Mean (σ Known)</h2>
<p><strong>Business Context:</strong> E-commerce Platform - Daily Transaction Analysis</p>
</div>
<h3>Problem Statement</h3>
<p>An e-commerce platform recently launched a new feature and wants to estimate the <strong>average number of daily transactions per user</strong>. Historical data shows the population standard deviation is consistent at σ = 3.2 transactions.</p>
<div class="given-info">
<strong>Given Information:</strong>
<ul>
<li>Population standard deviation: <strong>σ = 3.2 transactions</strong></li>
<li>Sample size: <strong>n = 100 users</strong></li>
<li>Sample mean: <strong>x̄ = 12.6 transactions</strong></li>
</ul>
</div>
<h3>Understanding the Formula</h3>
<div class="formula-container">
<h4>Confidence Interval for Mean (σ Known)</h4>
<div class="formula-content">
\[CI = \bar{x} \pm Z_{\alpha/2} \times \frac{\sigma}{\sqrt{n}}\]
</div>
<p><strong>Components:</strong></p>
<ul>
<li><strong>x̄:</strong> Sample mean = 12.6</li>
<li><strong>Z<sub>α/2</sub>:</strong> Critical value from standard normal distribution</li>
<li><strong>σ:</strong> Population standard deviation = 3.2</li>
<li><strong>n:</strong> Sample size = 100</li>
</ul>
</div>
<h3>Step-by-Step Calculation</h3>
<div class="step-container">
<h4>STEP 1: Calculate Standard Error</h4>
<div class="formula-content">
\[SE = \frac{\sigma}{\sqrt{n}} = \frac{3.2}{\sqrt{100}} = \frac{3.2}{10} = 0.32\]
</div>
<div class="interpretation">
<strong>Interpretation:</strong> The standard error is 0.32 transactions, measuring the variability of our sample mean.
</div>
</div>
<div class="step-container">
<h4>STEP 2: Find Critical Z-Values</h4>
<table>
<thead>
<tr>
<th>Confidence Level</th>
<th>Z-Critical</th>
</tr>
</thead>
<tbody>
<tr>
<td>90%</td>
<td>1.6449</td>
</tr>
<tr>
<td>95%</td>
<td>1.9600</td>
</tr>
<tr>
<td>99%</td>
<td>2.5758</td>
</tr>
</tbody>
</table>
</div>
<div class="step-container">
<h4>STEP 3: Calculate Confidence Intervals</h4>
<p><strong>Formula:</strong> CI = x̄ ± Z × SE</p>
<ul>
<li><strong>90% CI:</strong> 12.6 ± (1.6449 × 0.32) = [12.074, 13.126]</li>
<li><strong>95% CI:</strong> 12.6 ± (1.9600 × 0.32) = [11.973, 13.227]</li>
<li><strong>99% CI:</strong> 12.6 ± (2.5758 × 0.32) = [11.776, 13.424]</li>
</ul>
</div>
<div class="result-container">
<h4>95% Confidence Interval Result</h4>
<div class="result-value">
[11.973, 13.227] transactions
</div>
<p><strong>Interpretation:</strong> We are 95% confident that the true average daily transactions per user lies between 11.97 and 13.23 transactions.</p>
</div>
<h3>All Confidence Levels Comparison</h3>
<table>
<thead>
<tr>
<th>Confidence</th>
<th>Lower</th>
<th>Upper</th>
<th>Width</th>
</tr>
</thead>
<tbody>
<tr>
<td>90%</td>
<td>12.074</td>
<td>13.126</td>
<td>1.053</td>
</tr>
<tr>
<td>95%</td>
<td>11.973</td>
<td>13.227</td>
<td>1.254</td>
</tr>
<tr>
<td>99%</td>
<td>11.776</td>
<td>13.424</td>
<td>1.649</td>
</tr>
</tbody>
</table>
<div class="insight-container">
<h4>Business Insights</h4>
<p><strong>Performance Baseline:</strong></p>
<ul>
<li>Users perform approximately 12-13 transactions daily</li>
<li>Narrow CI indicates consistent behavior</li>
<li>Large sample size provides precise estimates</li>
</ul>
<p><strong>Operational Planning:</strong></p>
<ul>
<li>Server capacity: Plan for 13.2 transactions per user (upper bound)</li>
<li>Use 95% CI as standard for business reporting</li>
</ul>
</div>
<div class="case-header" id="case-2">
<h2>Case Study 2: t-Test for Mean (σ Unknown)</h2>
<p><strong>Business Context:</strong> UX Research - Mobile App Task Completion</p>
</div>
<h3>Problem Statement</h3>
<p>A UX research team measures task completion time for a newly launched mobile application. The population standard deviation is unknown.</p>
<div class="given-info">
<strong>Sample Data (minutes):</strong>
<p>8.4, 7.9, 9.1, 8.7, 8.2, 9.0, 7.8, 8.5, 8.9, 8.1, 8.6, 8.3</p>
<ul>
<li>Sample size: <strong>n = 12</strong></li>
<li>Sample mean: <strong>x̄ = 8.4583 minutes</strong></li>
<li>Sample SD: <strong>s = 0.4233 minutes</strong></li>
</ul>
</div>
<h3>Understanding the Formula</h3>
<div class="formula-container">
<h4>Confidence Interval for Mean (σ Unknown)</h4>
<div class="formula-content">
\[CI = \bar{x} \pm t_{\alpha/2, df} \times \frac{s}{\sqrt{n}}\]
</div>
<p><strong>Key Differences from Z-Test:</strong></p>
<ul>
<li>Uses t-distribution (accounts for uncertainty in σ)</li>
<li>Uses sample SD (s) instead of population σ</li>
<li>Requires degrees of freedom: df = n - 1 = 11</li>
</ul>
</div>
<div class="step-container">
<h4>STEP 1: Calculate Standard Error</h4>
<div class="formula-content">
\[SE = \frac{s}{\sqrt{n}} = \frac{0.4233}{\sqrt{12}} = 0.1222\]
</div>
</div>
<div class="step-container">
<h4>STEP 2: Find Critical t-Values (df = 11)</h4>
<table>
<thead>
<tr>
<th>Confidence</th>
<th>t-Critical</th>
</tr>
</thead>
<tbody>
<tr>
<td>90%</td>
<td>1.7959</td>
</tr>
<tr>
<td>95%</td>
<td>2.2010</td>
</tr>
<tr>
<td>99%</td>
<td>3.1058</td>
</tr>
</tbody>
</table>
</div>
<div class="result-container">
<h4>95% Confidence Interval Result</h4>
<div class="result-value">
[8.189, 8.727] minutes
</div>
<p><strong>Interpretation:</strong> We are 95% confident that the true average task completion time is between 8.19 and 8.73 minutes.</p>
</div>
<div class="case-header" id="case-3">
<h2>Case Study 3: Proportion - A/B Testing</h2>
<p><strong>Business Context:</strong> CTA Button Click-Through Rate</p>
</div>
<h3>Problem Statement</h3>
<p>A team runs an A/B test on a new Call-To-Action button design to estimate the true click-through rate.</p>
<div class="given-info">
<strong>Given Information:</strong>
<ul>
<li>Total users: <strong>n = 400</strong></li>
<li>Clicks: <strong>x = 156</strong></li>
<li>Sample proportion: <strong>p̂ = 0.39 (39%)</strong></li>
</ul>
</div>
<h3>Understanding the Formula</h3>
<div class="formula-container">
<h4>Confidence Interval for Proportion</h4>
<div class="formula-content">
\[CI = \hat{p} \pm Z_{\alpha/2} \times \sqrt{\frac{\hat{p}(1-\hat{p})}{n}}\]
</div>
</div>
<div class="step-container">
<h4>Calculate Standard Error</h4>
<div class="formula-content">
\[SE = \sqrt{\frac{0.39 \times 0.61}{400}} = 0.0244\]
</div>
</div>
<div class="result-container">
<h4>95% Confidence Interval Result</h4>
<div class="result-value">
[34.22%, 43.78%]
</div>
<p><strong>Interpretation:</strong> We are 95% confident the true CTR is between 34.22% and 43.78%. This is excellent compared to typical rates of 2-5%.</p>
</div>
<div class="case-header" id="case-4">
<h2>Case Study 4: Z-Test vs t-Test Comparison</h2>
<p><strong>Business Context:</strong> API Latency Measurement</p>
</div>
<h3>Problem Statement</h3>
<p>Compare confidence intervals when σ is known (Z-test) versus unknown (t-test).</p>
<div class="given-info">
<strong>Given (Both Teams):</strong>
<ul>
<li>n = 36, x̄ = 210 ms</li>
<li>Team A: σ = 24 ms (known)</li>
<li>Team B: s = 24 ms (estimated)</li>
</ul>
</div>
<table>
<thead>
<tr>
<th>Test</th>
<th>95% Lower</th>
<th>95% Upper</th>
<th>Width</th>
</tr>
</thead>
<tbody>
<tr>
<td>Z-Test</td>
<td>202.16</td>
<td>217.84</td>
<td>15.68</td>
</tr>
<tr>
<td>t-Test</td>
<td>201.88</td>
<td>218.12</td>
<td>16.24</td>
</tr>
</tbody>
</table>
<div class="insight-container">
<h4>Key Finding</h4>
<p>The t-test interval is 3.6% wider to account for uncertainty in estimating σ. As sample size increases, t-values converge to Z-values.</p>
</div>
<div class="case-header" id="case-5">
<h2>Case Study 5: One-Sided Confidence Interval</h2>
<p><strong>Business Context:</strong> SLA Compliance Testing</p>
</div>
<h3>Problem Statement</h3>
<p>A customer service team wants to ensure average response time is below 2 hours (SLA requirement).</p>
<div class="given-info">
<strong>Given Information:</strong>
<ul>
<li>n = 40, x̄ = 1.75 hours, s = 0.30 hours</li>
<li>SLA Requirement: < 2 hours</li>
</ul>
</div>
<div class="result-container">
<h4>95% One-Sided Upper Bound</h4>
<div class="result-value">
Upper Bound = 1.83 hours
</div>
<p><strong>Conclusion:</strong> SLA is MET - we are 95% confident the true mean is below 1.83 hours, which is under the 2-hour threshold.</p>
</div>
<div id="summary" class="case-header">
<h2>Summary: When to Use Each Test</h2>
</div>
<table>
<thead>
<tr>
<th>Test Type</th>
<th>When to Use</th>
<th>Key Feature</th>
</tr>
</thead>
<tbody>
<tr>
<td>Z-Test (Mean)</td>
<td>σ known, n ≥ 30</td>
<td>Narrower intervals</td>
</tr>
<tr>
<td>t-Test (Mean)</td>
<td>σ unknown, any n</td>
<td>More conservative</td>
</tr>
<tr>
<td>Proportion Test</td>
<td>np̂ ≥ 10, n(1-p̂) ≥ 10</td>
<td>For categorical data</td>
</tr>
<tr>
<td>One-Sided</td>
<td>Threshold testing</td>
<td>Directional bound</td>
</tr>
</tbody>
</table>
<div class="insight-container">
<h4>Key Takeaways</h4>
<ul>
<li><strong>Higher confidence → Wider interval:</strong> Trade-off between precision and certainty</li>
<li><strong>Larger sample → Narrower interval:</strong> More data = more precision</li>
<li><strong>95% is standard:</strong> Most common in business and research</li>
<li><strong>t-test is safer:</strong> When σ unknown, always use t-test</li>
</ul>
</div>
<script>
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
anchor.addEventListener('click', function (e) {
e.preventDefault();
const target = document.querySelector(this.getAttribute('href'));
if (target) {
target.scrollIntoView({
behavior: 'smooth',
block: 'start'
});
}
});
});
</script>
</body