| 17.3.7.2 Algorithms (One Sample Proportion Test)One-Prop-algorithm 
 HypothesesLet /math-a3904f143141153cc70766aff62f962c.png?v=0) be the sample size and /math-2fccdd06e4c2b79e4f65f2f532fdf9ec.png?v=0) be the number of events or successes. Then the sample proportion /math-059dd42e5c1758bf5ac9b735c33d9897.png?v=0) can be expressed: /math-74b78268fb8edf8f3c550eb3a02a9da4.png?v=0)  Let /math-2225a33c170f19586f1ee1de06e36962.png?v=0) be the sample proportion and the /math-98a2a58d47208a196dce8aebf1187a7b.png?v=0) is the hypothetical proportion, this function tests the hypotheses: /math-e6439f7e3ffa3e9be5825528b7bd98ca.png?v=0) vs /math-001ce83ba7f68612061a4f6535289a14.png?v=0) , for a two-tailed test.
 /math-77393df8f4ba31f7392f313ebd9a6a01.png?v=0) vs /math-2efa1b2d6fe683e736fc4a3c72f338d0.png?v=0) , for a lower-tailed test.
 /math-9a14db95eaad70a65f7cde4742e6cfec.png?v=0) vs /math-e676757568c1548bc0a04e938d5970f4.png?v=0) , for an upper-tailed test.
 Normal approximationP ValueWhen /math-949e1609f9a8555500d11bfd80fd252f.png?v=0) and /math-6dad1a4a3be6aa277f8d81cab11744ca.png?v=0) , we can compute a p-value using a normal approximation of a binomial distribution. To perform the test, compute the /math-814b9f64b478b6caf94e723a0e6814c5.png?v=0) and /math-c619dfb3f0ada810733c791d3e461ade.png?v=0) value by: /math-5e43bb1a14561bd36062237b108f17a1.png?v=0) 
 /math-5333752eab96d7d78da0ddc4e3d9da72.png?v=0) ,for two tailed test
 /math-23cc99079273c727425f7f2b249939fc.png?v=0) ,for upper tailed test
 /math-b454c9285e4a909cd7a23c7c233ca221.png?v=0) for lower tailed test
 Confidence Intervalconfidence level is equal to /math-378df00d12056b404d7d02aef9d8650b.png?v=0) , the confidence interval for the sample proportion can be generated by: 
| Null Hypothesis | Confidence Interval |  
| /math-e6439f7e3ffa3e9be5825528b7bd98ca.png?v=0)  | ![\left[\tilde{p}- Z_{\frac{\alpha}{2}}\sqrt{\frac{\tilde{p}(1-\tilde{p})}{n}}, \tilde{p}+ Z_{\frac{\alpha}{2}}\sqrt{\frac{\tilde{p}(1-\tilde{p})}{n}}\right] \left[\tilde{p}- Z_{\frac{\alpha}{2}}\sqrt{\frac{\tilde{p}(1-\tilde{p})}{n}}, \tilde{p}+ Z_{\frac{\alpha}{2}}\sqrt{\frac{\tilde{p}(1-\tilde{p})}{n}}\right]](//d2mvzyuse3lwjc.cloudfront.net/doc/en/UserGuide/images/Algorithms_(One_Sample_Proportion_Test)/math-45e3a879d9177162292d8b92c1e74936.png?v=0)  |  
| /math-77393df8f4ba31f7392f313ebd9a6a01.png?v=0)  | ![\left[\tilde{p}- Z_{\alpha}\sqrt{\frac{\tilde{p}(1-\tilde{p})}{n}}, 1\right] \left[\tilde{p}- Z_{\alpha}\sqrt{\frac{\tilde{p}(1-\tilde{p})}{n}}, 1\right]](//d2mvzyuse3lwjc.cloudfront.net/doc/en/UserGuide/images/Algorithms_(One_Sample_Proportion_Test)/math-b1f8f1563d875c1b9ad0781525e22d66.png?v=0)  |  
| /math-9a14db95eaad70a65f7cde4742e6cfec.png?v=0)  | ![\left[0, \tilde{p}+ Z_{\alpha}\sqrt{\frac{\tilde{p}(1-\tilde{p})}{n}}\right] \left[0, \tilde{p}+ Z_{\alpha}\sqrt{\frac{\tilde{p}(1-\tilde{p})}{n}}\right]](//d2mvzyuse3lwjc.cloudfront.net/doc/en/UserGuide/images/Algorithms_(One_Sample_Proportion_Test)/math-ddaa6748a4f7d5d7ec97a10b6094c9ab.png?v=0)  |  Binomial TestExact P_valueIn Origin, the exact test for one proportion is based on the Binomial Test .
 /math-77393df8f4ba31f7392f313ebd9a6a01.png?v=0)  /math-236283f94349ab58667bb20e23c48c62.png?v=0) 
 /math-9a14db95eaad70a65f7cde4742e6cfec.png?v=0)  /math-1b70aa97ad67ad73ec03a8b86eaa5378.png?v=0) 
 /math-e6439f7e3ffa3e9be5825528b7bd98ca.png?v=0) :
 Let /math-ed8fc8393999c826e034ba7eda3820a5.png?v=0) , when /math-d71e7a494c74e9f4dc1befc9fc3f5985.png?v=0)  /math-3b7c3f8394db8c7ddbd64c20296e4816.png?v=0)  when /math-5dc733247724ff9e5663466f3ba1aa52.png?v=0)  /math-a279ad1020d1230bcaca3b34763a1871.png?v=0) , where y is the count for z such that /math-972f03c6782e959c6296bd6454b4c3c1.png?v=0) and /math-91f2fe6954e96740db5e5363be3214fc.png?v=0)  when /math-33889b4adcda5ccfd42a486618a2e393.png?v=0)  /math-6d9ce680825cccb7345526c42f52d588.png?v=0) , where y is the count  for z such that /math-972f03c6782e959c6296bd6454b4c3c1.png?v=0) and /math-63f49135aa0df4deb4d2af7319868d98.png?v=0)  Exact Confidence IntervalExact Confidence interval:
confidence levels is /math-378df00d12056b404d7d02aef9d8650b.png?v=0)  where /math-bac83f0f16753d22b8473eaef9e3ed0c.png?v=0) denotes the quantile function of Beta distribution. |