Questions tagged [z-test]

The z-test is a statistical test for hypothesis testing that uses the standard normal distribution as the sampling distribution of the test statistic. A common example is the test for the difference of two proportions.

The z-test is a statistical test for hypothesis testing that uses the standard normal distribution as the sampling distribution of the test statistic. A common example is the test for the difference of two proportions, but this is not the only possibility. Let $X = X_1, X_2, ..., X_n$ be iid with mean $\mu$ and standard deviation $\sigma$. A z-test for the null hypothesis $H_0: \mu = \mu_0$ is

$$Z = \frac{\bar{X}-\mu_0}{\sigma / \sqrt{n}}$$

which is distributed as a standard normal. The null is rejected at the 95\% level of significance if $|Z|>1.96$. Or equivalently reject if $|\bar{X} - \mu_0|>1.96\sigma / \sqrt{n}$, i.e. if $\bar{X}$ is more than 1.96 standard errors away from $\mu_0$. Unlike the t-test, the critical values for the z-test are independent of the sample size which makes it convenient to use. However, the z-test depends on the knowledge about the population variance. So the t-test may still be preferred if the sample size is small or when the population variance is unknown (when $\sigma$ must be estimated).

287 questions
60
votes
2 answers

What is the relationship between a chi squared test and test of equal proportions?

Suppose that I have three populations with four, mutually exclusive characteristics. I take random samples from each population and construct a crosstab or frequency table for the characteristics that I am measuring. Am I correct in saying…
hgcrpd
  • 1,307
  • 2
  • 11
  • 13
22
votes
2 answers

Choosing between $z$-test and $t$-test

Background: I'm giving a presentation to colleagues at work on hypothesis testing, and understand most of it fine but there's one aspect that I'm tying myself up in knots trying to understand as well as explain it to others. This is what I think I…
19
votes
1 answer

At What Level is a $\chi^2$ test Mathematically Identical to a $z$-test of Proportions?

BACKGROUND: Skip safely - it's here for reference, and to legitimize the question. The opening of this paper reads: "Karl Pearson’s famous chi-square contingency test is derived from another statistic, called the z statistic, based on the Normal…
Antoni Parellada
  • 23,430
  • 15
  • 100
  • 197
16
votes
3 answers

What follows if we fail to reject the null hypothesis?

What conclusions can we draw if $p>\alpha$? Does not rejecting the $H_0$ mean anything?
Anton Andreev
  • 289
  • 2
  • 8
15
votes
2 answers

Independent samples t-test: Do data really need to be normally distributed for large sample sizes?

Let's say I want to test if two independent samples have different means. I know the underlying distribution is not normal. If I understand correctly, my test statistic is the mean, and for large enough sample sizes, the mean should become normally…
Lisa
  • 537
  • 6
  • 15
12
votes
2 answers

Why use a z test rather than a t test with proportional data?

When testing the difference between 2 proportions why do we use a z-test rather than a t-test? Further, is there a simple way to conduct an omnibus test for significant differences between more than 2 proportions (in the form of percentages). Is…
user41270
  • 215
  • 1
  • 3
  • 8
11
votes
1 answer

Likelihood Ratio Test and Wald test provide different conclusion for glm in R

I'm reproducing an example from Generalized, Linear, and Mixed Models. My MWE is below: Dilution <- c(1/128, 1/64, 1/32, 1/16, 1/8, 1/4, 1/2, 1, 2, 4) NoofPlates <- rep(x=5, times=10) NoPositive <- c(0, 0, 2, 2, 3, 4, 5, 5, 5, 5) Data <-…
MYaseen208
  • 2,379
  • 7
  • 32
  • 46
11
votes
6 answers

How can we ever know the population variance?

In hypothesis testing, a common question is what is the population variance? My question is how can we ever know the population variance? If we knew the entire distribution, we might as well know the mean of the entire population. Then what is the…
BioLogic
  • 121
  • 1
  • 6
11
votes
1 answer

Wald Test and Z Test

The "z" hypothesis test is derived from the fact the mean estimator $\hat\Theta$ is distributed normally. If we don't know the variance, we just estimate it ($\widehat{se}$). The Wald test, derived from the fact that the fisher information of the…
Guy L
  • 285
  • 3
  • 9
9
votes
1 answer

chi squared test or Z test?

I have an outcome from a biological experiment, where I have counted the number of dead cells upon a mutation. For example, in once case - out of 120 cells we saw 16% of the dead cells, but our expectations were around 10%. So to check the…
PoisonAlien
  • 421
  • 4
  • 13
7
votes
2 answers

Simultaneous Z-test for the equality of two proportions (binomial distribution)

Is there a simultaneous test for the equality of two proportions when $k$ binomial properties are being tested? Example: Two groups of large size $n_1$ and $n_2$ are asked if they agree or disagree on 10 different questions. For any one particular…
7
votes
2 answers

What is wrong with one tailed z-tests for a proportion?

After answering How to analyze observed vs expected when expected is just a proportion? by suggesting that the OP uses a one tail Z-test for their proportion data, I got into a debate in the comments with another user to which their point is lost on…
user64106
7
votes
2 answers

two samples z test in Python

Does Scipy have a z test to compare the mean of two samples? I searched this page but couldn't find one.
ADJ
  • 415
  • 1
  • 4
  • 10
6
votes
1 answer

Interpretation of p-value in comparing proportions between two small groups in R

I wish to compare proportions between two small groups. In group 1, 2 of 18 students received honours. In group 2, 9 of 21 received honours. This is a small sample, so if I use the t-test: x1 <- c(rep(1,2),rep(0,16)) x2 <-…
C8H10N4O2
  • 847
  • 8
  • 25
6
votes
1 answer

Can I use a z-test on heteroscedastic data?

Suppose I have two methods that I test over time on the same data. I suspect that the methods degrade over time, and that this degradation is more or less linear. I want to know if one method degrades faster than the other. So, what I do is, I fit a…
1
2 3
19 20