Accendo Reliability

Your Reliability Engineering Professional Development Site

  • Home
  • About
    • Contributors
    • About Us
    • Colophon
    • Survey
  • Reliability.fm
  • Articles
    • CRE Preparation Notes
    • NoMTBF
    • on Leadership & Career
      • Advanced Engineering Culture
      • ASQR&R
      • Engineering Leadership
      • Managing in the 2000s
      • Product Development and Process Improvement
    • on Maintenance Reliability
      • Aasan Asset Management
      • AI & Predictive Maintenance
      • Asset Management in the Mining Industry
      • CMMS and Maintenance Management
      • CMMS and Reliability
      • Conscious Asset
      • EAM & CMMS
      • Everyday RCM
      • History of Maintenance Management
      • Life Cycle Asset Management
      • Maintenance and Reliability
      • Maintenance Management
      • Plant Maintenance
      • Process Plant Reliability Engineering
      • RCM Blitz®
      • ReliabilityXperience
      • Rob’s Reliability Project
      • The Intelligent Transformer Blog
      • The People Side of Maintenance
      • The Reliability Mindset
    • on Product Reliability
      • Accelerated Reliability
      • Achieving the Benefits of Reliability
      • Apex Ridge
      • Field Reliability Data Analysis
      • Metals Engineering and Product Reliability
      • Musings on Reliability and Maintenance Topics
      • Product Validation
      • Reliability by Design
      • Reliability Competence
      • Reliability Engineering Insights
      • Reliability in Emerging Technology
      • Reliability Knowledge
    • on Risk & Safety
      • CERM® Risk Insights
      • Equipment Risk and Reliability in Downhole Applications
      • Operational Risk Process Safety
    • on Systems Thinking
      • Communicating with FINESSE
      • The RCA
    • on Tools & Techniques
      • Big Data & Analytics
      • Experimental Design for NPD
      • Innovative Thinking in Reliability and Durability
      • Inside and Beyond HALT
      • Inside FMEA
      • Institute of Quality & Reliability
      • Integral Concepts
      • Learning from Failures
      • Progress in Field Reliability?
      • R for Engineering
      • Reliability Engineering Using Python
      • Reliability Reflections
      • Statistical Methods for Failure-Time Data
      • Testing 1 2 3
      • The Manufacturing Academy
  • eBooks
  • Resources
    • Accendo Authors
    • FMEA Resources
    • Glossary
    • Feed Forward Publications
    • Openings
    • Books
    • Webinar Sources
    • Podcasts
  • Courses
    • Your Courses
    • Live Courses
      • Introduction to Reliability Engineering & Accelerated Testings Course Landing Page
      • Advanced Accelerated Testing Course Landing Page
    • Integral Concepts Courses
      • Reliability Analysis Methods Course Landing Page
      • Applied Reliability Analysis Course Landing Page
      • Statistics, Hypothesis Testing, & Regression Modeling Course Landing Page
      • Measurement System Assessment Course Landing Page
      • SPC & Process Capability Course Landing Page
      • Design of Experiments Course Landing Page
    • The Manufacturing Academy Courses
      • An Introduction to Reliability Engineering
      • Reliability Engineering Statistics
      • An Introduction to Quality Engineering
      • Quality Engineering Statistics
      • FMEA in Practice
      • Process Capability Analysis course
      • Root Cause Analysis and the 8D Corrective Action Process course
      • Return on Investment online course
    • Industrial Metallurgist Courses
    • FMEA courses Powered by The Luminous Group
    • Foundations of RCM online course
    • Reliability Engineering for Heavy Industry
    • How to be an Online Student
    • Quondam Courses
  • Calendar
    • Call for Papers Listing
    • Upcoming Webinars
    • Webinar Calendar
  • Login
    • Member Home
  • Barringer Process Reliability Introduction Course Landing Page
  • Upcoming Live Events
You are here: Home / Articles / Two Proportions Hypothesis Testing

by Fred Schenkelberg Leave a Comment

Two Proportions Hypothesis Testing

Two Proportions Hypothesis Testing

In the article, Hypothesis Tests for Proportion, the comparison is between a given value and the sample. In this case, let’s compare two populations. We take a sample which provides a proportion representing each population and determines if the populations are different from each other based on the two samples.

The exact solution uses the Binomial distribution, yet when np and 1 – np are greater than 5, then we can use a normal approximation for the test statistic and critical value.

Set up the Hypothesis Test

Given two proportions, p1 and p2, based on samples from two populations, we want to evaluate one of three cases.

The null hypothesis in each case is the two populations are the same, thus the two proportions are equal.

$$ \large\displaystyle {{H}_{o}}:{{p}_{1}}-{{p}_{2}}=0$$

The three possible alternatives are:

$$ \large\displaystyle \begin{array}{l}{{H}_{a}}:{{p}_{1}}-{{p}_{2}}>0\\{{H}_{a}}:{{p}_{1}}-{{p}_{2}}<0\\{{H}_{a}}:{{p}_{1}}-{{p}_{2}}\ne 0\end{array}$$

The test statistic based using a normal approximation is

$$ \large\displaystyle z=\frac{{{p}_{1}}-{{p}_{2}}}{{{\sigma }_{{{p}_{1}}-{{p}_{2}}}}}$$

Where the standard deviation of the difference is

$$ \large\displaystyle {{\sigma }_{{{p}_{1}}-{{p}_{2}}}}=\sqrt{{{p}_{{{p}_{1}}-{{p}_{2}}}}(1-{{p}_{{{p}_{1}}-{{p}_{2}}}})\left( \frac{1}{{{n}_{1}}}+\frac{1}{{{n}_{2}}} \right)}$$

And the proportion of the combined proportion is

$$ \large\displaystyle {{p}_{{{p}_{1}}-{{p}_{2}}}}=\frac{{{y}_{1}}+{{y}_{2}}}{{{n}_{1}}+{{n}_{2}}}$$

Where there are y success from each sample of n items from the respective populations.

The critical value is from the standard normal table for the given value of confidence using α = 1 – C, or α/2 for the two-sided test.

If the test statistic is larger outside the critical region then we have evidence the alternative hypothesis is true.

An example

Earlier today I was checking the statistics for an A/B test running on my website. The server provides alternative visitors with one or two versions of the page. Each page in the test is slightly different and I’m interested to know if one page is performing better encouraging visitors to sign up for an email list.

Both pages have 345 visits as of this morning. The is n1 = n2 = 345.

Page 1, has 18 email signs ups, y1 = 18. Page 2 has 14 sign ups, thus y2 = 14.

We’re interested is there is a difference in either direction thus a two sided alternative hypothesis.

$$ \large\displaystyle \begin{array}{l}{{H}_{o}}:{{p}_{1}}-{{p}_{2}}=0\\{{H}_{a}}:{{p}_{1}}-{{p}_{2}}\ne 0\end{array}$$

Let’s say we’re interested in knowing with a confidence of 90%, thus α = 0.10 and α/2 = 0.05. We then find the critical region outside ±1.645.

We need to estimate the combined proportion first.

$$ \large\displaystyle {{p}_{{{p}_{1}}-{{p}_{2}}}}=\frac{{{y}_{1}}+{{y}_{2}}}{{{n}_{1}}+{{n}_{2}}}=\frac{18+14}{345+345}=0.0464$$

And we then can estimate the combined standard deviation.

$$ \large\displaystyle \begin{array}{l}{{\sigma }_{{{p}_{1}}-{{p}_{2}}}}=\sqrt{{{p}_{{{p}_{1}}-{{p}_{2}}}}(1-{{p}_{{{p}_{1}}-{{p}_{2}}}})\left( \frac{1}{{{n}_{1}}}+\frac{1}{{{n}_{2}}} \right)}\\{{\sigma }_{{{p}_{1}}-{{p}_{2}}}}=\sqrt{0.0464(1-0.0464)\left( \frac{1}{345}+\frac{1}{345} \right)}\\{{\sigma }_{{{p}_{1}}-{{p}_{2}}}}=0.016\end{array}$$

The test statistic, z, is then

$$ \large\displaystyle z=\frac{{{p}_{1}}-{{p}_{2}}}{{{\sigma }_{{{p}_{1}}-{{p}_{2}}}}}=\frac{0.052-0.041}{0.016}=0.72$$

Which is not outside the critical region of ±1.645 thus there is no convincing evidence the two pages are converting at a different rate.


Related:

Hypothesis Tests for Proportion (article)

Hypothesis Tests for Variance Case I (article)

equal variance hypothesis (article)

Filed Under: Articles, CRE Preparation Notes, Probability and Statistics for Reliability Tagged With: Hypothesis testing

About Fred Schenkelberg

I am the reliability expert at FMS Reliability, a reliability engineering and management consulting firm I founded in 2004. I left Hewlett Packard (HP)’s Reliability Team, where I helped create a culture of reliability across the corporation, to assist other organizations.

« Incorporating Reliability into Your Future
Why success with HALT begins long before doing HALT »

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

CRE Preparation Notes

Article by Fred Schenkelberg

Join Accendo

Join our members-only community for full access to exclusive eBooks, webinars, training, and more.

It’s free and only takes a minute.

Get Full Site Access

Not ready to join?
Stay current on new articles, podcasts, webinars, courses and more added to the Accendo Reliability website each week.
No membership required to subscribe.

[popup type="" link_text="Get Weekly Email Updates" link_class="button" ][display_form id=266][/popup]

  • CRE Preparation Notes
  • CRE Prep
  • Reliability Management
  • Probability and Statistics for Reliability
  • Reliability in Design and Development
  • Reliability Modeling and Predictions
  • Reliability Testing
  • Maintainability and Availability
  • Data Collection and Use

© 2025 FMS Reliability · Privacy Policy · Terms of Service · Cookies Policy