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.

Filter by
Sorted by
Tagged with
59
votes
2answers
64k views

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 ...
22
votes
2answers
17k views

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 ...
18
votes
1answer
3k views

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 ...
16
votes
3answers
6k views

What follows if we fail to reject the null hypothesis? [duplicate]

What conclusions can we draw if $p>\alpha$? Does not rejecting the $H_0$ mean anything?
15
votes
2answers
7k views

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 ...
12
votes
2answers
11k views

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 ...
11
votes
6answers
6k views

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 ...
11
votes
1answer
26k views

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: ...
10
votes
1answer
5k views

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 ...
9
votes
1answer
3k views

chi squared test or Z test? [duplicate]

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 ...
7
votes
2answers
842 views

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 ...
6
votes
2answers
35k views

two samples z test in Python [closed]

Does Scipy have a z test to compare the mean of two samples? I searched this page but couldn't find one.
6
votes
2answers
894 views

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 ...
6
votes
1answer
2k views

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: ...
6
votes
1answer
3k views

Why would one ever use z-score over a t-score?

Forgive me if this seems like an elementary question, but no amount of googling has turned up a satisfying answer for me. From what I understand, a t-score should be used instead of a z-score when the ...
6
votes
1answer
1k views

Why is independence required for two- sample proportions z test?

I read in several books as well as in different posts (e.g. here) that independence is required for two-sample proportions z tests. But so far I could not find an explanation why this is the case and ...
6
votes
1answer
111 views

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 ...
6
votes
2answers
467 views

Understanding formulation of hypotheses in difference between two sample means (z test)

Introduction When testing a sample against a population, one has one of the following sets of hypotheses: Two-tailed test: $H_0: \mu=\ldots$, i.e. "no difference", and $H_1: \mu\neq\ldots$ Right-...
6
votes
2answers
675 views

How do I test difference in Percentages?

I have some survey data and know the number and percentage of "yes" responses. How do I determine if any of the percentage yes regional responses are statistically different from the national yes ...
5
votes
2answers
345 views

Is there any hypothesis test for two binomial distribution without normal approximation?

Let's say we are running an A/B testing and each data point has a binary response. We would like to test whether the ratio of true are different between A and B. (e.g. ask a yes/no question to both ...
5
votes
3answers
996 views

Difference in hypothesis testing using p-value and confidence interval

I have a simple problem The sample population is 384 people and $12$% of it have a disease. The hypothesis is that $5$% of the real population have a disease. So, $H_0: \mu = 0.05$ and $H_a: \mu \...
5
votes
1answer
273 views

Why is the power for this test so low?

What follows is a theoretical power calculation for a practice exam, but this seems very low. Did I do something wrong? The problem and solution is as follows: In a drinks factory the mean fill of ...
5
votes
1answer
954 views

z-test for one population proportion hypothesis with a small sample size

I have asked a "yes/no" question to a small group of people (n = 22). From the 22, 14 answered "yes" and 8 answered "no". I'd like to find out, with 90% confidence, if the majority of my population (> ...
5
votes
2answers
2k views

What happens if I use Z-test instead of T test?

I know that when sample size goes large, they basically give the same result. My question is that what happens if I use z-test instead of t-test when sample size is not large. I guess the type I ...
5
votes
1answer
1k views

is the z-test for difference of proportions valid for massive samples with tiny proportions?

Let's say I want to run a difference of proportions test where each side has n=23,000 but their proportions are 0.21% and 0.34%. ...
5
votes
2answers
932 views

z-test vs t-test under assumptions

A traditional t-test to compare two means assumes independent random variables, $X_1,...,X_n \sim n(\mu_1,\sigma_1 ^2)$ and $Y_1, ...,Y_m \sim n(\mu_2,\sigma_2 ^2)$. One usually assumes normal ...
5
votes
1answer
44 views

AB testing with underlying segments in population

I run ab tests with the variants applied to multiple segments, say, countries. In each country, my baseline target is very different from each other. I wonder if I should ideally model these countries ...
5
votes
1answer
4k views

Hypothesis testing for 2 proportions - for A/B testing

I was trying to understand the statistical tests to use during A/B testing and stumbled upon this documentation of the Amazon A/B testing SDK: https://developer.amazon.com/public/apis/manage/ab-...
5
votes
1answer
557 views

Is the power for a Kappa test the same as underlying z-test?

The Kappa ($\kappa$) test is a Z-test kind of test. If I am not very wrong, to compute the $\kappa$ test, we can just estimate the appropriate variance $\hat {var}(\hat\kappa)$ for the kappa statistic ...
4
votes
2answers
7k views

Population is normal with known variance and mean. Sample size is small. Which case?

Given a population (normal distribution) mean and variance and a sample set with n<30 values, how should I perform hypothesis testing. My professor told me that I should be using the t-test for ...
4
votes
1answer
3k views

Why no degrees of freedom for Z test

I am reading about hypothesis testing and have encountered Z test and T test. I have understood both the tests and their usage. One part that is not still clear is why does Z test does not depend on ...
4
votes
1answer
820 views

Test of proportions or chi-squared? [duplicate]

These data are from an A/B test of free trials to conversion. Someone can sign up for a 30 day free trial of the product. If they like it they stay on and become paying customers. By default (A), when ...
4
votes
1answer
201 views

Replace t-test with modified z-test - anyone ever seen this?

I just read about a procedure I'd never heard of, and was wondering if anyone has had any experience with it. In Donald Berry's "Statistics" book, he presents an alternative to doing a t-test by ...
4
votes
2answers
3k views

Likelihood-ratio test or z-test?

Consider the following two logistic regression models: $$ \begin{aligned} &\text{Model A: }&P(Y=1)&=\frac{\text{exp}\left(b_1+b_2X_2\right)}{1+\text{exp}\left(b_1+b_2X_2\right)} \\ &\...
4
votes
1answer
42 views

Confidence interval and p value from prop.test() in R contradict each other

I am running the following simple Z test for proportions in R: prop.test(x = c(10, 20), n = c(100, 500)) The results are as follows: ...
4
votes
1answer
2k views

Comparing sample proportion to population proportion

I have a data set consisting of a number of different hospitals. I am trying to compare the proportion for hospital X to the overall proportion in the data set (which includes hospital X). Should ...
4
votes
3answers
95 views

Having a problem getting the Intuition behind t-tests and z-tests

Say we have a population of $n$ rodents and that the mean of the population is $\mu$ with standard deviation $\sigma$, the standard error of means in this population would be $\frac{\sigma}{\sqrt n}$ ....
4
votes
1answer
1k views

Proportion Test: Z-test vs bootstrap / simulation - different results

I'm learning hypothesis testing, and going through the following example: The CEO of a large electric utility claims that 80 percent of his 1,000,000 customers are very satisfied with the service ...
4
votes
1answer
191 views

Probability of significant result in a second sample given first was significant

It's an example mentioned in Amos Tversky and Daniel Kahneman's Belief in the Law of Small Numbers: Suppose you have run an experiment on 20 subjects, and have obtained a significant result which ...
4
votes
1answer
89 views

Testing the Validity of a Test Statistic (incorrectly)

In this post @Wolfgang shares a few lines of code to test in a simulation the ability of a particular test statistic to perform as expected, measured by the percentage of type I errors. He shows by ...
4
votes
2answers
2k views

Power calculation of study using 2 sample z-test

This is not homework! I have two very different answers for a power calculation I have done on the below data - ...
4
votes
1answer
224 views

Statistical significance of a difference between poll percentages with a small sample?

Analyzing my company’s internal survey results, I was stuck with calculating statistical difference between percentages. I usually used a Z-test as described below, but I am not sure whether it is ...
4
votes
1answer
763 views

T-test or Z-test of two proportions?

We did an intervention to reduce the frequency of use of a certain type of treatment and now I want to compare the data pre vs post intervention. For each month I have the number of treatments per ...
4
votes
0answers
84 views

Can I statistically describe a single case/outlier vs. a distribution?

I have a dataset consisting of body weight and corresponding age for a bunch of healthy subjects (grey triangles below). I fit a nonlinear function to this data and graphed a 95% prediction interval. ...
4
votes
0answers
2k views

Z-Test Versus Chi-Square Test

I need to test whether response rate for Test B is larger than response Rate for Test A (i.e. AB Test). Null Hypothesis: is Response Rate (Test B) <> Response Rate (Test A). Alternative ...
3
votes
2answers
4k views

Outlier detection for heavy-tailed data

Applying modified z-score for outlier elimination on some data (Iglewicz and Hoaglin, 1993), I discovered that a big proportion of the data (~10%) was outside the range ...
3
votes
1answer
401 views

Are pupils in a school independent and identically distributed when compared to a national population?

I am interested in the way in which data are analysed in education. In England, pupils' reported test results are compared to national test results using z-tests. These results are then used to judge ...
3
votes
2answers
134 views

What is the intuitive explanation of the Z-statistic formula?

I am wondering if somebody could explain to me why the Z-statistic formula (for hypothesis testing) is derived as it is. Correct me if I'm wrong about my deductions: the numerator portion of the Z-...
3
votes
2answers
64 views

Need help deciding between a T-test and a Z-test

This is the question I am working on "Professor Liberman believes that Donald Trump repeats phrases in his speeches more than previous presidents of the United States. He counted the number of ...
3
votes
1answer
192 views

Is there a t-test equivalent to Stouffer's z-test?

I have $k$ pairs of samples from different distributions. For each pair of samples I want to check if the samples are taken from a normal distribution with the same mean and variance. I assume the ...

1
2 3 4 5 6