Two Proportion Z Test

Description

We can use the prop.test command to test for the difference in two proportions for the following data, where $x$ is the number of successes from a sample size $n$:

(1)
\begin{align} x_1 = 143 &\ x_2 = 127 \\ n_1 = 162 &\ n_2 = 149 \end{align}

With the hypotheses

(2)
\begin{align} H_0: p_1 = p_2 \\ H_1: p_1 \neq p_2 \end{align}

The proportion test can accept more than one argument for parameters x and n. We combine arguments using the c command — for example, to combine the arguments for x, we use c(143, 127). We will set the alternative parameter to "two.sided" to indicate we are performing a two sided z test, and the correct parameter to FALSE to remove the Yates continuity correction.

Sage Cell

Code

plot(sin(x),-10,10)

Options

Code

plot(sin(x),-10,10)

Tags

Primary Tags:

Secondary Tags:

A list of possible tags can be found at The WeBWorK Open Problem Library. For linear algebra tags see the Curated Courses Project.

Related Cells

Any related cells go here. Provide a link to the page containing the information about the cell.