<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://learn.cemetech.net/index.php?action=history&amp;feed=atom&amp;title=TI-BASIC%3A2_Propzint</id>
	<title>TI-BASIC:2 Propzint - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://learn.cemetech.net/index.php?action=history&amp;feed=atom&amp;title=TI-BASIC%3A2_Propzint"/>
	<link rel="alternate" type="text/html" href="http://learn.cemetech.net/index.php?title=TI-BASIC:2_Propzint&amp;action=history"/>
	<updated>2026-06-01T08:07:46Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.3</generator>
	<entry>
		<id>http://learn.cemetech.net/index.php?title=TI-BASIC:2_Propzint&amp;diff=779&amp;oldid=prev</id>
		<title>Maintenance script: Initial automated import</title>
		<link rel="alternate" type="text/html" href="http://learn.cemetech.net/index.php?title=TI-BASIC:2_Propzint&amp;diff=779&amp;oldid=prev"/>
		<updated>2016-02-24T18:18:13Z</updated>

		<summary type="html">&lt;p&gt;Initial automated import&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Template:TI-BASIC:Command&lt;br /&gt;
|picture=2-PROPZINT.GIF&lt;br /&gt;
|summary=Computes a Z confidence interval of the difference between two proportions.&lt;br /&gt;
|syntax=2-PropZInt(&amp;#039;&amp;#039;x,,1,,&amp;#039;&amp;#039;, &amp;#039;&amp;#039;n,,1,,&amp;#039;&amp;#039;, &amp;#039;&amp;#039;x,,2,,&amp;#039;&amp;#039;, &amp;#039;&amp;#039;n,,2,,&amp;#039;&amp;#039;, [&amp;#039;&amp;#039;confidence level&amp;#039;&amp;#039;]&lt;br /&gt;
|location=When editing a program, press:&lt;br /&gt;
# STAT to access the statistics menu&lt;br /&gt;
# LEFT to access the TESTS submenu&lt;br /&gt;
# ALPHA B to select 2-PropZInt(, or use arrows&lt;br /&gt;
&lt;br /&gt;
(this key sequence will give you the 2-PropZInt... screen outside a program)&lt;br /&gt;
|compatibility=TI-83/84/+/SE&lt;br /&gt;
|size=2 bytes&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The 2-PropZInt( command calculates a confidence interval for the difference between two proportions, at a specific confidence level: for example, if the confidence level is 95%, you are 95% certain that the difference lies within the interval you get. The command assumes that the sample is large enough that the normal approximation to binomial distributions is valid: this is true if, in both samples involved, the positive and negative counts are both &amp;gt;5.&lt;br /&gt;
&lt;br /&gt;
The 1-PropZInt( command takes 5 arguments. The first two, &amp;#039;&amp;#039;x,,1,,&amp;#039;&amp;#039; and &amp;#039;&amp;#039;n,,1,,&amp;#039;&amp;#039; are the positive count and total count in the first sample (so the estimated value of the first proportion is &amp;#039;&amp;#039;x,,1,,&amp;#039;&amp;#039; out of &amp;#039;&amp;#039;n,,1,,&amp;#039;&amp;#039;. The next two arguments, &amp;#039;&amp;#039;x,,2,,&amp;#039;&amp;#039; and &amp;#039;&amp;#039;n,,2,,&amp;#039;&amp;#039;, are the positive count and total count in the second sample.&lt;br /&gt;
&lt;br /&gt;
The output gives you a confidence interval of the form (a,b), which is the range of values for the difference π,,1,,-π,,2,, (where π,,1,, and π,,2,, are the first and second proportions respectively). If you were looking for the difference π,,2,,-π,,1,, all you have to do is switch two sides and negate the numbers in the interval.&lt;br /&gt;
&lt;br /&gt;
= Sample Problem =&lt;br /&gt;
&lt;br /&gt;
You want to compare the proportion of students at your school and at a friend&amp;#039;s school. that support a particular political candidate. You take a random sample of 50 students, and find that 22 of them support that candidate. Your friend took a random sample of 75 students at his school, and found that 28 supported the candidate.&lt;br /&gt;
&lt;br /&gt;
The first proportion is the proportion of supporters at your school. 22 out of 50 students support the candidate, so &amp;#039;&amp;#039;x,,1,,&amp;#039;&amp;#039;=22 and &amp;#039;&amp;#039;n,,1,,&amp;#039;&amp;#039;=50. &lt;br /&gt;
The second proportion is the proportion of supporters at your friend&amp;#039;s school. 28 out of 75 students support the candidate, so &amp;#039;&amp;#039;x,,2,,&amp;#039;&amp;#039;=28 and &amp;#039;&amp;#039;n,,2,,&amp;#039;&amp;#039;=75.&lt;br /&gt;
If you decided to do a 95% confidence interval, you would add the argument 95 after all these, so the syntax would be as follows: &lt;br /&gt;
&lt;br /&gt;
 :2-PropZInt(22,50,28,75,95&lt;br /&gt;
 which can also be&lt;br /&gt;
 :2-PropZInt(22,50,28,75,.95&lt;br /&gt;
&lt;br /&gt;
The output if you run the above code will look approximately like this:&lt;br /&gt;
&lt;br /&gt;
 1-PropZInt&lt;br /&gt;
  (-.1092,.24249)&lt;br /&gt;
  p1=.44&lt;br /&gt;
  p2=.3733333333&lt;br /&gt;
  n1=50&lt;br /&gt;
  n2=75&lt;br /&gt;
&lt;br /&gt;
This tells you that between about the difference betwen the proportions is between about -0.11 (your school&amp;#039;s proportion being about 0.11 less than your friend&amp;#039;s school&amp;#039;s proportion) to about 0.24 (your school&amp;#039;s proportion being about 0.24 greater than your friend&amp;#039;s school&amp;#039;s proportion).&lt;br /&gt;
&lt;br /&gt;
= Optimization =&lt;br /&gt;
&lt;br /&gt;
If the confidence level is 95%, you can omit the final 95, since that is the default value:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 :2-PropZInt(22,50,28,75,95&lt;br /&gt;
 can be&lt;br /&gt;
 :2-PropZInt(22,50,28,75&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Error Conditions =&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;[[TI-BASIC:Errors#domain|ERR:DOMAIN]]&amp;#039;&amp;#039;&amp;#039; is thrown if either proportion is not between 0 and 1, or &amp;#039;&amp;#039;x,,i,,&amp;#039;&amp;#039; is negative or greater than &amp;#039;&amp;#039;n,,i,,&amp;#039;&amp;#039;, or the confidence level is negative or at least 100.&lt;br /&gt;
&lt;br /&gt;
= Related Commands =&lt;br /&gt;
&lt;br /&gt;
* [[TI-BASIC:1_Propzint|1_PropZInt(]]&lt;br /&gt;
* [[TI-BASIC:Zinterval|ZInterval]]&lt;br /&gt;
* [[TI-BASIC:2_Sampzint|2_SampZInt(]][[Category:TI-BASIC]]&lt;br /&gt;
[[Category:TIBD]]&lt;/div&gt;</summary>
		<author><name>Maintenance script</name></author>
	</entry>
</feed>