{"id":8832,"date":"2026-02-11T14:07:41","date_gmt":"2026-02-11T14:07:41","guid":{"rendered":"https:\/\/myengineeringbuddy.com\/blog\/?p=8832"},"modified":"2026-07-12T04:23:15","modified_gmt":"2026-07-12T04:23:15","slug":"how-to-solve-hypothesis-testing-complete-step-by-step-stats-guide","status":"publish","type":"post","link":"https:\/\/www.myengineeringbuddy.com\/blog\/how-to-solve-hypothesis-testing-complete-step-by-step-stats-guide\/","title":{"rendered":"Hypothesis Testing Explained: A Complete Step-by-Step Stats Guide"},"content":{"rendered":"\n<div style=\"background-color:#f8f8f8; border-left:4px solid #d0d0d0; padding:12px 16px; margin-bottom:20px;\"><strong>Key Takeaways<\/strong>\n<ul>\n<li>All hypothesis tests follow the same five-step framework, regardless of test type.<\/li>\n<li>The p-value is the probability of observing your data if H\u2080 were true \u2014 not the probability H\u2080 is true.<\/li>\n<li>Choose your test based on data type: means use t-tests; categorical counts use chi-square.<\/li>\n<li>State hypotheses before seeing data \u2014 setting them after invalidates the test.<\/li>\n<li>Rejecting H\u2080 provides evidence for H\u2081; it does not prove H\u2081 is true.<\/li>\n<\/ul><\/div>\n\n<p>Hypothesis testing intimidates most students because it feels abstract. You&#8217;re asked to &#8220;test&#8221; something, but the logic remains fuzzy. The truth: hypothesis testing is a structured decision-making process that becomes intuitive once you follow the five-step framework. This guide walks you through each step with real worked examples, software implementations, and common mistakes to avoid.<\/p>\n\n<p>Students working through statistics problems often find that a solid grasp of <a href=\"https:\/\/www.myengineeringbuddy.com\/subject\/discrete-mathematics\/\">discrete mathematics tutor<\/a> concepts \u2014 particularly logic and set theory \u2014 builds the foundation that makes hypothesis testing click.<\/p>\n\n<h2>The 5-Step Hypothesis Testing Framework<\/h2>\n\n<p>All hypothesis tests follow the same logical structure, regardless of test type. Master this framework and you can apply it to any test.<\/p>\n\n<h3>Step 1: State the Hypotheses (H\u2080 and H\u2081)<\/h3>\n\n<p>Every hypothesis test begins with two competing claims about the population parameter.<\/p>\n\n<p><strong>Null Hypothesis (H\u2080):<\/strong> The default assumption\u2014usually &#8220;no effect&#8221; or &#8220;no difference.&#8221;<\/p>\n<ul>\n<li>Example: \u03bc = 100 (the population mean equals 100)<\/li>\n<li>Example: p\u2081 = p\u2082 (the two populations have equal proportions)<\/li>\n<li>Always contains &#8220;=&#8221; (equality)<\/li>\n<\/ul>\n\n<p><strong>Alternative Hypothesis (H\u2081):<\/strong> Your research claim\u2014what you want to prove.<\/p>\n<ul>\n<li><strong>Two-tailed:<\/strong> H\u2081: \u03bc \u2260 100 (different, either direction)<\/li>\n<li><strong>One-tailed (left):<\/strong> H\u2081: \u03bc &lt; 100 (less than)<\/li>\n<li><strong>One-tailed (right):<\/strong> H\u2081: \u03bc &gt; 100 (greater than)<\/li>\n<\/ul>\n\n<p><strong>Key Decision:<\/strong> Should you state your claim as H\u2080 or H\u2081?<\/p>\n\n<p><strong>Best practice:<\/strong> State your claim as H\u2081 (the alternative). Here&#8217;s why: If evidence supports H\u2081, you have a stronger result (&#8220;We found evidence for&#8230;&#8221;) than if you fail to reject H\u2080 (&#8220;We didn&#8217;t find evidence against&#8230;&#8221;).<\/p>\n\n<p><strong>Common Mistake:<\/strong> Choosing between hypotheses <em>after<\/em> seeing the data. This is &#8220;cart before the horse&#8221; and invalidates your test. Hypotheses must be determined beforehand.<\/p>\n\n<h3>Step 2: Choose Significance Level (\u03b1)<\/h3>\n\n<p>The significance level (alpha) is your Type I error tolerance\u2014the probability of falsely rejecting a true null hypothesis.<\/p>\n\n<p><strong>Standard:<\/strong> \u03b1 = 0.05 (5% false positive rate tolerated)<br>\n<strong>Conservative:<\/strong> \u03b1 = 0.01 (1% false positive rate, stricter)<br>\n<strong>Lenient:<\/strong> \u03b1 = 0.10 (10%, less common)<\/p>\n\n<p><strong>In Plain Language:<\/strong> If \u03b1 = 0.05, you&#8217;re willing to be wrong 5% of the time by claiming an effect exists when it doesn&#8217;t.<\/p>\n\n<p><strong>When to adjust \u03b1:<\/strong><\/p>\n<ul>\n<li>Medical\/safety testing: Use \u03b1 = 0.01 (lower tolerance for false positives)<\/li>\n<li>Exploratory research: Can use \u03b1 = 0.10<\/li>\n<li>Standard: \u03b1 = 0.05<\/li>\n<\/ul>\n\n<h3>Step 3: Select Test Statistic<\/h3>\n\n<p>The test statistic is a single number calculated from your sample data that summarizes evidence against H\u2080. Different data types require different tests.<\/p>\n\n<p>Those running analyses in <a href=\"https:\/\/www.myengineeringbuddy.com\/subject\/data-science\/\">data science tutoring<\/a> sessions frequently encounter all of these test types in real-world datasets.<\/p>\n\n<p><strong>When to use each test:<\/strong><\/p>\n<table style=\"border-collapse:collapse; width:100%;\">\n<tbody>\n<tr style=\"background-color:#edfbfc;\">\n<td style=\"border:1px solid #f2f3f5; padding:8px;\"><strong>Data Type<\/strong><\/td>\n<td style=\"border:1px solid #f2f3f5; padding:8px;\"><strong>Test<\/strong><\/td>\n<td style=\"border:1px solid #f2f3f5; padding:8px;\"><strong>Formula<\/strong><\/td>\n<td style=\"border:1px solid #f2f3f5; padding:8px;\"><strong>Example<\/strong><\/td>\n<\/tr>\n<tr>\n<td style=\"border:1px solid #f2f3f5; padding:8px;\"><strong>1 mean vs. population<\/strong><\/td>\n<td style=\"border:1px solid #f2f3f5; padding:8px;\">One-sample t-test<\/td>\n<td style=\"border:1px solid #f2f3f5; padding:8px;\">t = (x\u0304 &#8211; \u03bc\u2080) \/ (s\/\u221an)<\/td>\n<td style=\"border:1px solid #f2f3f5; padding:8px;\">Is average engineer height 5&#8217;10&#8221;?<\/td>\n<\/tr>\n<tr>\n<td style=\"border:1px solid #f2f3f5; padding:8px;\"><strong>2 independent means<\/strong><\/td>\n<td style=\"border:1px solid #f2f3f5; padding:8px;\">Two-sample t-test<\/td>\n<td style=\"border:1px solid #f2f3f5; padding:8px;\">t = (x\u0304\u2081 &#8211; x\u0304\u2082) \/ \u221a(s\u2081\u00b2\/n\u2081 + s\u2082\u00b2\/n\u2082)<\/td>\n<td style=\"border:1px solid #f2f3f5; padding:8px;\">Do men and women earn differently?<\/td>\n<\/tr>\n<tr>\n<td style=\"border:1px solid #f2f3f5; padding:8px;\"><strong>2 paired means<\/strong><\/td>\n<td style=\"border:1px solid #f2f3f5; padding:8px;\">Paired t-test<\/td>\n<td style=\"border:1px solid #f2f3f5; padding:8px;\">t = (d\u0304) \/ (sd\/\u221an)<\/td>\n<td style=\"border:1px solid #f2f3f5; padding:8px;\">Does weight change before\/after diet?<\/td>\n<\/tr>\n<tr>\n<td style=\"border:1px solid #f2f3f5; padding:8px;\"><strong>2+ categorical variables<\/strong><\/td>\n<td style=\"border:1px solid #f2f3f5; padding:8px;\">Chi-square test<\/td>\n<td style=\"border:1px solid #f2f3f5; padding:8px;\">\u03c7\u00b2 = \u03a3(O &#8211; E)\u00b2 \/ E<\/td>\n<td style=\"border:1px solid #f2f3f5; padding:8px;\">Is product preference independent of gender?<\/td>\n<\/tr>\n<tr>\n<td style=\"border:1px solid #f2f3f5; padding:8px;\"><strong>1 proportion vs. population<\/strong><\/td>\n<td style=\"border:1px solid #f2f3f5; padding:8px;\">One-sample z-test<\/td>\n<td style=\"border:1px solid #f2f3f5; padding:8px;\">z = (p\u0302 &#8211; p\u2080) \/ \u221a(p\u2080(1-p\u2080)\/n)<\/td>\n<td style=\"border:1px solid #f2f3f5; padding:8px;\">Is defect rate 5%?<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n\n<p><strong>How to choose:<\/strong><\/p>\n<ul>\n<li>Comparing <strong>means<\/strong> of continuous data \u2192 t-test or z-test<\/li>\n<li>Comparing <strong>counts<\/strong> or <strong>proportions<\/strong> \u2192 chi-square test<\/li>\n<li><strong>Small sample<\/strong> (n &lt; 30) \u2192 t-test<\/li>\n<li><strong>Large sample<\/strong> (n \u2265 30) \u2192 can use z-test (or t-test still valid)<\/li>\n<\/ul>\n\n<h3>Step 4: Calculate Test Statistic and Find P-value<\/h3>\n\n<p>This is mechanical computation\u2014most done by software. The test statistic measures how far your sample result is from the null hypothesis value, expressed in standard errors.<\/p>\n\n<p><strong>P-value interpretation:<\/strong> The p-value is the <strong>probability of observing your sample result (or more extreme) if H\u2080 were true.<\/strong><\/p>\n<ul>\n<li><strong>Small p-value<\/strong> (&lt; 0.05): Unlikely result under H\u2080 \u2192 suggests H\u2080 is false<\/li>\n<li><strong>Large p-value<\/strong> (\u2265 0.05): Likely result under H\u2080 \u2192 H\u2080 is plausible<\/li>\n<\/ul>\n\n<p><strong>Not the probability that H\u2080 is true.<\/strong> This is the most common misconception. <a href=\"https:\/\/www.yourstatsguru.com\/epar\/our-publications\/common-misconceptions-about-hypothesis-testing\/\" target=\"_blank\" rel=\"noopener\">yourstatsguru<\/a><\/p>\n\n<h3>Step 5: Make Decision and Interpret Results<\/h3>\n\n<p><strong>Decision rule:<\/strong><\/p>\n<ul>\n<li><strong>If p-value &lt; \u03b1:<\/strong> Reject H\u2080 (statistically significant result)<\/li>\n<li><strong>If p-value \u2265 \u03b1:<\/strong> Fail to reject H\u2080 (not statistically significant)<\/li>\n<\/ul>\n\n<p><strong>Interpretation language matters:<\/strong><\/p>\n\n<p>\u2713 <strong>Correct:<\/strong> &#8220;We reject H\u2080 and conclude there is significant evidence for H\u2081.&#8221;<br>\n\u2717 <strong>Incorrect:<\/strong> &#8220;We proved H\u2081&#8221; or &#8220;H\u2080 is false&#8221;<\/p>\n\n<p>\u2713 <strong>Correct:<\/strong> &#8220;We failed to reject H\u2080; insufficient evidence for H\u2081.&#8221;<br>\n\u2717 <strong>Incorrect:<\/strong> &#8220;H\u2080 is true&#8221; or &#8220;No effect exists&#8221;<\/p>\n\n<h2>Worked Example 1: One-Sample T-Test (Engineering Context)<\/h2>\n\n<p><strong>Scenario:<\/strong> A metal rod manufacturer claims rods average 100 mm in length. Quality control tests a random sample of 25 rods to verify this claim.<\/p>\n\n<p><strong>Data:<\/strong><\/p>\n<ul>\n<li>Sample mean: x\u0304 = 101.5 mm<\/li>\n<li>Sample std. dev: s = 2.3 mm<\/li>\n<li>Sample size: n = 25<\/li>\n<li>Claimed population mean: \u03bc\u2080 = 100 mm<\/li>\n<\/ul>\n\n<p><strong>Step 1: State Hypotheses<\/strong><\/p>\n<ul>\n<li>H\u2080: \u03bc = 100 (rods average 100 mm)<\/li>\n<li>H\u2081: \u03bc \u2260 100 (rods differ from 100 mm, two-tailed)<\/li>\n<\/ul>\n\n<p><strong>Step 2: Choose \u03b1 = 0.05<\/strong><\/p>\n\n<p><strong>Step 3: Select One-Sample T-Test<\/strong><\/p>\n\n<p><strong>Step 4: Calculate Test Statistic<\/strong><\/p>\n\n<p>t = (x\u0304 &#8211; \u03bc\u2080) \/ (s \/ \u221an)<br>\nt = (101.5 &#8211; 100) \/ (2.3 \/ \u221a25)<br>\nt = 1.5 \/ (2.3 \/ 5)<br>\nt = 1.5 \/ 0.46<br>\nt = 3.26<\/p>\n\n<p><strong>Degrees of freedom:<\/strong> df = n &#8211; 1 = 24<\/p>\n\n<p><strong>Find p-value:<\/strong> Using t-distribution table or software with t = 3.26, df = 24, two-tailed:<br>\np-value \u2248 0.0038<\/p>\n\n<p><strong>Step 5: Make Decision<\/strong><\/p>\n\n<p>p-value (0.0038) &lt; \u03b1 (0.05) \u2192 <strong>Reject H\u2080<\/strong><\/p>\n\n<p><strong>Interpretation:<\/strong> &#8220;The sample provides strong evidence that rods differ significantly from the claimed 100 mm average (t(24) = 3.26, p = 0.0038). Quality control should investigate the manufacturing process.&#8221;<\/p>\n\n<p>Understanding probability distributions is essential context for interpreting these results \u2014 the guide on <a href=\"https:\/\/www.myengineeringbuddy.com\/blog\/choosing-the-right-probability-distribution-a-statistics-guide-for-engineers\/\">choosing the right probability distribution for engineers<\/a> covers the underlying theory in depth.<\/p>\n\n<h2>Worked Example 2: Two-Sample T-Test (A\/B Testing Context)<\/h2>\n\n<p><strong>Scenario:<\/strong> An e-commerce company tests two website designs to see if Design B increases average order value. They randomly assign customers to Design A (current) or Design B (test) and track average orders.<\/p>\n\n<p><strong>Data:<\/strong><\/p>\n<ul>\n<li>Design A: n\u2081 = 150, x\u0304\u2081 = $52.40, s\u2081 = $18.20<\/li>\n<li>Design B: n\u2082 = 150, x\u0304\u2082 = $58.75, s\u2082 = $19.80<\/li>\n<\/ul>\n\n<p><strong>Step 1: State Hypotheses<\/strong><\/p>\n<ul>\n<li>H\u2080: \u03bc\u2081 = \u03bc\u2082 (no difference in order value between designs)<\/li>\n<li>H\u2081: \u03bc\u2081 \u2260 \u03bc\u2082 (designs differ in order value, two-tailed)<\/li>\n<\/ul>\n\n<p><strong>Step 2: Choose \u03b1 = 0.05<\/strong><\/p>\n\n<p><strong>Step 3: Select Two-Sample T-Test<\/strong><\/p>\n\n<p><strong>Step 4: Calculate Test Statistic<\/strong><\/p>\n\n<p>t = (x\u0304\u2081 &#8211; x\u0304\u2082) \/ \u221a(s\u2081\u00b2\/n\u2081 + s\u2082\u00b2\/n\u2082)<br>\nt = (52.40 &#8211; 58.75) \/ \u221a((18.20\u00b2\/150) + (19.80\u00b2\/150))<br>\nt = -6.35 \/ \u221a(2.205 + 2.613)<br>\nt = -6.35 \/ \u221a4.818<br>\nt = -6.35 \/ 2.195<br>\nt = -2.89<\/p>\n\n<p><strong>Degrees of freedom:<\/strong> Approximation: df \u2248 298<\/p>\n\n<p><strong>Find p-value:<\/strong> Using t-distribution with t = -2.89, df \u2248 298, two-tailed:<br>\np-value \u2248 0.0041<\/p>\n\n<p><strong>Step 5: Make Decision<\/strong><\/p>\n\n<p>p-value (0.0041) &lt; \u03b1 (0.05) \u2192 <strong>Reject H\u2080<\/strong><\/p>\n\n<p><strong>Interpretation:<\/strong> &#8220;Design B significantly increases average order value by $6.35 compared to Design A (t(298) = -2.89, p = 0.0041). This provides strong evidence to recommend rolling out Design B.&#8221;<\/p>\n\n<p>Students who struggle with the mathematical mechanics here may find it useful to revisit foundational material \u2014 this guide on <a href=\"https:\/\/www.myengineeringbuddy.com\/blog\/calculus-help-engineering-majors\/\">calculus for engineering majors<\/a> addresses the quantitative reasoning skills that underpin statistical computation.<\/p>\n\n<h2>Worked Example 3: Chi-Square Test (Categorical Data)<\/h2>\n\n<p><strong>Scenario:<\/strong> A university wants to know if student satisfaction with campus facilities differs by class year (freshmen, sophomores, juniors, seniors).<\/p>\n\n<p><strong>Survey Results:<\/strong><\/p>\n<table style=\"border-collapse:collapse; width:100%;\">\n<tbody>\n<tr style=\"background-color:#edfbfc;\">\n<td style=\"border:1px solid #f2f3f5; padding:8px;\"><strong>Class<\/strong><\/td>\n<td style=\"border:1px solid #f2f3f5; padding:8px;\"><strong>Satisfied<\/strong><\/td>\n<td style=\"border:1px solid #f2f3f5; padding:8px;\"><strong>Unsatisfied<\/strong><\/td>\n<td style=\"border:1px solid #f2f3f5; padding:8px;\"><strong>Total<\/strong><\/td>\n<\/tr>\n<tr>\n<td style=\"border:1px solid #f2f3f5; padding:8px;\">Freshman<\/td>\n<td style=\"border:1px solid #f2f3f5; padding:8px;\">45<\/td>\n<td style=\"border:1px solid #f2f3f5; padding:8px;\">55<\/td>\n<td style=\"border:1px solid #f2f3f5; padding:8px;\">100<\/td>\n<\/tr>\n<tr>\n<td style=\"border:1px solid #f2f3f5; padding:8px;\">Sophomore<\/td>\n<td style=\"border:1px solid #f2f3f5; padding:8px;\">52<\/td>\n<td style=\"border:1px solid #f2f3f5; padding:8px;\">48<\/td>\n<td style=\"border:1px solid #f2f3f5; padding:8px;\">100<\/td>\n<\/tr>\n<tr>\n<td style=\"border:1px solid #f2f3f5; padding:8px;\">Junior<\/td>\n<td style=\"border:1px solid #f2f3f5; padding:8px;\">58<\/td>\n<td style=\"border:1px solid #f2f3f5; padding:8px;\">42<\/td>\n<td style=\"border:1px solid #f2f3f5; padding:8px;\">100<\/td>\n<\/tr>\n<tr>\n<td style=\"border:1px solid #f2f3f5; padding:8px;\">Senior<\/td>\n<td style=\"border:1px solid #f2f3f5; padding:8px;\">62<\/td>\n<td style=\"border:1px solid #f2f3f5; padding:8px;\">38<\/td>\n<td style=\"border:1px solid #f2f3f5; padding:8px;\">100<\/td>\n<\/tr>\n<tr>\n<td style=\"border:1px solid #f2f3f5; padding:8px;\"><strong>Total<\/strong><\/td>\n<td style=\"border:1px solid #f2f3f5; padding:8px;\"><strong>217<\/strong><\/td>\n<td style=\"border:1px solid #f2f3f5; padding:8px;\"><strong>183<\/strong><\/td>\n<td style=\"border:1px solid #f2f3f5; padding:8px;\"><strong>400<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n\n<p><strong>Step 1: State Hypotheses<\/strong><\/p>\n<ul>\n<li>H\u2080: Class year and satisfaction are independent (no association)<\/li>\n<li>H\u2081: Class year and satisfaction are associated (not independent)<\/li>\n<\/ul>\n\n<p><strong>Step 2: Choose \u03b1 = 0.05<\/strong><\/p>\n\n<p><strong>Step 3: Select Chi-Square Test of Independence<\/strong><\/p>\n\n<p><strong>Step 4: Calculate Expected Frequencies and \u03c7\u00b2 Statistic<\/strong><\/p>\n\n<p><strong>Expected frequency formula:<\/strong> E = (Row Total \u00d7 Column Total) \/ N<\/p>\n\n<p>For Freshman-Satisfied: E = (100 \u00d7 217) \/ 400 = 54.25<br>\nFor Freshman-Unsatisfied: E = (100 \u00d7 183) \/ 400 = 45.75<\/p>\n\n<p>(Continuing for all cells&#8230;)<\/p>\n\n<p><strong>Chi-square statistic:<\/strong><br>\n\u03c7\u00b2 = \u03a3 (Observed &#8211; Expected)\u00b2 \/ Expected<br>\n\u03c7\u00b2 = (45-54.25)\u00b2\/54.25 + (55-45.75)\u00b2\/45.75 + &#8230; = 8.47<\/p>\n\n<p><strong>Degrees of freedom:<\/strong> df = (rows &#8211; 1) \u00d7 (columns &#8211; 1) = (4-1) \u00d7 (2-1) = 3<\/p>\n\n<p><strong>Find p-value:<\/strong> Using chi-square distribution with \u03c7\u00b2 = 8.47, df = 3:<br>\np-value \u2248 0.037<\/p>\n\n<p><strong>Step 5: Make Decision<\/strong><\/p>\n\n<p>p-value (0.037) &lt; \u03b1 (0.05) \u2192 <strong>Reject H\u2080<\/strong><\/p>\n\n<p><strong>Interpretation:<\/strong> &#8220;There is significant association between class year and satisfaction with campus facilities (\u03c7\u00b2(3) = 8.47, p = 0.037). Upper-class students report higher satisfaction than freshmen.&#8221;<\/p>\n\n<p>Running chi-square and t-tests in <a href=\"https:\/\/www.myengineeringbuddy.com\/subject\/matlab\/\">MATLAB tutoring<\/a> sessions is a common application \u2014 MATLAB&#8217;s Statistics and Machine Learning Toolbox handles all the test types covered in this guide.<\/p>\n\n<h2>Common Mistakes and How to Avoid Them<\/h2>\n\n<h3>Mistake 1: Setting Hypotheses After Seeing Data<\/h3>\n\n<p><strong>What students do:<\/strong> Calculate sample statistics, then write hypotheses based on results.<\/p>\n\n<p><strong>Why it&#8217;s wrong:<\/strong> This defeats hypothesis testing. You already know the answer from summary statistics.<\/p>\n\n<p><strong>How to fix it:<\/strong> Write hypotheses BEFORE data analysis. Hypothesis testing is a &#8220;blind guess&#8221; that you then test with data.<\/p>\n\n<h3>Mistake 2: Misinterpreting P-Values<\/h3>\n\n<p><strong>Wrong:<\/strong> &#8220;The p-value is the probability H\u2080 is true&#8221; (0.05 = 5% chance H\u2080 true)<\/p>\n\n<p><strong>Correct:<\/strong> &#8220;The p-value is the probability of observing this data (or more extreme) if H\u2080 were true&#8221;<\/p>\n\n<p><strong>Example:<\/strong> p = 0.03 means &#8220;there&#8217;s a 3% chance we&#8217;d see results this extreme if H\u2080 were true&#8221;\u2014NOT &#8220;3% chance H\u2080 is true.&#8221; <a href=\"https:\/\/www.yourstatsguru.com\/epar\/our-publications\/common-misconceptions-about-hypothesis-testing\/\" target=\"_blank\" rel=\"noopener\">yourstatsguru<\/a><\/p>\n\n<h3>Mistake 3: Confusing Test Selection<\/h3>\n\n<p><strong>Wrong:<\/strong> Using z-test for small samples (n &lt; 30)<\/p>\n\n<p><strong>Correct:<\/strong> Use t-test for small samples; z-test for large samples or known population \u03c3.<\/p>\n\n<p><strong>Wrong:<\/strong> Using t-test for categorical data (proportions)<\/p>\n\n<p><strong>Correct:<\/strong> Use chi-square for categorical; z-test or binomial for single proportion.<\/p>\n\n<p>Students who work through these distinctions in <a href=\"https:\/\/www.myengineeringbuddy.com\/subject\/spss\/\">SPSS tutoring<\/a> sessions often find that running the tests in software reinforces which procedure applies to which data type.<\/p>\n\n<h3>Mistake 4: Ignoring Type I and II Errors<\/h3>\n\n<p><strong>Type I Error (False Positive):<\/strong> Rejecting H\u2080 when it&#8217;s actually true. <a href=\"https:\/\/byjus.com\/maths\/type-i-and-type-ii-errors\/\" target=\"_blank\" rel=\"noopener\">byjus<\/a><\/p>\n<ul>\n<li>Probability = \u03b1 (your chosen significance level)<\/li>\n<li>Example: Concluding a drug works when it doesn&#8217;t<\/li>\n<\/ul>\n\n<p><strong>Type II Error (False Negative):<\/strong> Failing to reject H\u2080 when it&#8217;s actually false.<\/p>\n<ul>\n<li>Probability = \u03b2<\/li>\n<li>Example: Concluding a drug doesn&#8217;t work when it does<\/li>\n<\/ul>\n\n<p><strong>Key insight:<\/strong> You can&#8217;t minimize both errors simultaneously. Lowering \u03b1 increases \u03b2. Choose based on consequences.<\/p>\n\n<h3>Mistake 5: Saying &#8220;Prove&#8221; or &#8220;Accept&#8221; H\u2080<\/h3>\n\n<p><strong>Wrong:<\/strong> &#8220;We proved H\u2081&#8221; or &#8220;We accept H\u2080&#8221;<\/p>\n\n<p><strong>Correct:<\/strong> &#8220;We reject H\u2080 in favor of H\u2081&#8221; or &#8220;We fail to reject H\u2080&#8221;<\/p>\n\n<p>Hypothesis testing provides evidence, not proof.<\/p>\n\n<p>If you&#8217;ve recently struggled with a stats exam, the recovery strategies in this guide on <a href=\"https:\/\/www.myengineeringbuddy.com\/blog\/failed-statics-midterm-study-strategy-fix\/\">what to do after failing a midterm<\/a> apply directly to statistics courses as well.<\/p>\n\n<h2>Software Walkthroughs<\/h2>\n\n<h3>Excel: One-Sample T-Test<\/h3>\n\n<p>Data in cells A2:A26 (25 rod lengths)<\/p>\n\n<p>Formula:<\/p>\n\n<p>=T.TEST(A2:A26, 100, 2, 1)<\/p>\n\n<p>Where:<br>\n&#8211; A2:A26 = data range<br>\n&#8211; 100 = hypothesized mean<br>\n&#8211; 2 = two-tailed test<br>\n&#8211; 1 = one-sample test<\/p>\n\n<p>Result: p-value directly displayed<\/p>\n\n<h3>R: Two-Sample T-Test<\/h3>\n\n<p># Create data<br>\ndesign_a &lt;- rnorm(150, mean = 52.4, sd = 18.2)<br>\ndesign_b &lt;- rnorm(150, mean = 58.75, sd = 19.8)<\/p>\n\n<p># Perform two-sample t-test<br>\nresult &lt;- t.test(design_a, design_b)<\/p>\n\n<p># View results<br>\nprint(result)<br>\n# Shows: t-statistic, df, p-value, confidence interval<\/p>\n\n<h3>Python: Chi-Square Test<\/h3>\n\n<p>from scipy.stats import chi2_contingency<br>\nimport pandas as pd<\/p>\n\n<p># Create contingency table<br>\ndata = np.array([[45, 55], [52, 48], [58, 42], [62, 38]])<\/p>\n\n<p># Perform chi-square test<br>\nchi2, p_value, dof, expected = chi2_contingency(data)<\/p>\n\n<p>print(f&#8221;Chi-square statistic: {chi2:.2f}&#8221;)<br>\nprint(f&#8221;P-value: {p_value:.4f}&#8221;)<br>\nprint(f&#8221;Degrees of freedom: {dof}&#8221;)<\/p>\n\n<p>Analysts who run these tests regularly in <a href=\"https:\/\/www.myengineeringbuddy.com\/subject\/stata\/\">Stata tutoring<\/a> sessions will recognize that Stata&#8217;s ttest and tabulate commands produce equivalent output with minimal syntax.<\/p>\n\n<h2>Practice Problems<\/h2>\n\n<h3>Problem 1<\/h3>\n\n<p>A coffee shop claims its espresso shots average 30 mL. A customer measures 12 shots: mean = 28.5 mL, SD = 1.8 mL. Test at \u03b1 = 0.05.<\/p>\n<ul>\n<li>Solution: t(11) = -2.88, p \u2248 0.015. Reject H\u2080. Shots are significantly smaller than claimed.<\/li>\n<\/ul>\n\n<h3>Problem 2<\/h3>\n\n<p>Two teaching methods are tested. Method A: n = 40, mean = 75, SD = 12. Method B: n = 40, mean = 79, SD = 13. Test at \u03b1 = 0.05.<\/p>\n<ul>\n<li>Solution: t \u2248 -1.35, p \u2248 0.18. Fail to reject H\u2080. No significant difference.<\/li>\n<\/ul>\n\n<h3>Problem 3<\/h3>\n\n<p>Survey data: Does preference for Product X differ by age group?<\/p>\n<ul>\n<li>Younger: 70 prefer, 30 don&#8217;t. Older: 50 prefer, 50 don&#8217;t. Test at \u03b1 = 0.05.<\/li>\n<li>Solution: \u03c7\u00b2 \u2248 8.0, p \u2248 0.005. Reject H\u2080. Strong association between age and preference.<\/li>\n<\/ul>\n\n<p>For students who want to see how these statistical reasoning skills connect to broader mathematical problem-solving, this post on <a href=\"https:\/\/www.myengineeringbuddy.com\/blog\/a-level-further-maths-momentum-and-impulse\/\">A-Level Further Maths momentum and impulse<\/a> illustrates how structured frameworks apply across quantitative disciplines.<\/p>\n\n<h2>Related Reading<\/h2>\n<ul>\n<li><a href=\"https:\/\/www.myengineeringbuddy.com\/blog\/sequences-series-vs-calculus-1\/\">Sequences and series vs Calculus 1: what to expect<\/a><\/li>\n<li><a href=\"https:\/\/www.myengineeringbuddy.com\/blog\/integration-techniques-series-guide\/\">Integration techniques: a series guide for students<\/a><\/li>\n<li><a href=\"https:\/\/www.myengineeringbuddy.com\/blog\/a-level-maths-exam-triage-calculus-trigonometry\/\">A-Level Maths exam triage: calculus and trigonometry<\/a><\/li>\n<li><a href=\"https:\/\/www.myengineeringbuddy.com\/blog\/statics-first-exam-guide\/\">Statics first exam guide<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Key Takeaways All hypothesis tests follow the same five-step framework,  [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":8833,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[116],"tags":[],"class_list":["post-8832","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-engineering-mathematics"],"_links":{"self":[{"href":"https:\/\/www.myengineeringbuddy.com\/blog\/wp-json\/wp\/v2\/posts\/8832","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.myengineeringbuddy.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.myengineeringbuddy.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.myengineeringbuddy.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.myengineeringbuddy.com\/blog\/wp-json\/wp\/v2\/comments?post=8832"}],"version-history":[{"count":2,"href":"https:\/\/www.myengineeringbuddy.com\/blog\/wp-json\/wp\/v2\/posts\/8832\/revisions"}],"predecessor-version":[{"id":12037,"href":"https:\/\/www.myengineeringbuddy.com\/blog\/wp-json\/wp\/v2\/posts\/8832\/revisions\/12037"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.myengineeringbuddy.com\/blog\/wp-json\/wp\/v2\/media\/8833"}],"wp:attachment":[{"href":"https:\/\/www.myengineeringbuddy.com\/blog\/wp-json\/wp\/v2\/media?parent=8832"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.myengineeringbuddy.com\/blog\/wp-json\/wp\/v2\/categories?post=8832"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.myengineeringbuddy.com\/blog\/wp-json\/wp\/v2\/tags?post=8832"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}