Z-test - Wikipedia

Statistical test "Z test" redirects here. For the "Z-test" procedure in the graphics pipeline, see Z-buffering.
This article includes a list of references, related reading, or external links, but its sources remain unclear because it lacks inline citations. Please help improve this article by introducing more precise citations. (May 2020) (Learn how and when to remove this message)

A Z-test is any statistical test for which the distribution of the test statistic under the null hypothesis can be approximated by a normal distribution. Z-test tests the mean of a distribution. For each significance level in the confidence interval, the Z-test has a single critical value (for example, 1.96 for 5% two-tailed), which makes it more convenient than the Student's t-test whose critical values are defined by the sample size (through the corresponding degrees of freedom). Both the Z-test and Student's t-test have similarities in that they both help determine the significance of a set of data. However, the Z-test is rarely used in practice because the population deviation is difficult to determine.[citation needed]

Applicability

[edit]

Because of the central limit theorem, many test statistics are approximately normally distributed for large samples. Therefore, many statistical tests can be conveniently performed as approximate Z-tests if the sample size is large or the population variance is known. If the population variance is unknown (and therefore has to be estimated from the sample itself) and the sample size is not large (n < 30), the Student's t-test may be more appropriate (in some cases, n < 50, as described below).

Procedure

[edit]

The procedure to perform a Z-test on a statistic T {\displaystyle T} that is approximately normally distributed under the null hypothesis is as follows:

  1. Estimate the expected value μ of T {\displaystyle T} under the null hypothesis and obtain an estimate s of the standard deviation of T {\displaystyle T} .
  2. Determine the properties of T {\displaystyle T} : one-tailed or two-tailed.
    • For null hypothesis H0: μμ0 vs alternative hypothesis H1: μ < μ0, it is lower/left-tailed (one-tailed).
    • For null hypothesis H0: μμ0 vs alternative hypothesis H1: μ > μ0, it is upper/right-tailed (one-tailed).
    • For null hypothesis H0: μ = μ0 vs alternative hypothesis H1: μμ0, it is two-tailed.
  3. Calculate the standard score: Z = T ¯ − μ 0 s {\displaystyle Z={\frac {{\bar {T}}-\mu _{0}}{s}}}

One-tailed and two-tailed p-values can be calculated as Φ ( Z ) {\displaystyle \Phi (Z)} (for lower/left-tailed tests), Φ ( − Z ) {\displaystyle \Phi (-Z)} (for upper/right-tailed tests) and 2 Φ ( − | Z | ) {\displaystyle 2\Phi (-|Z|)} (for two-tailed tests), where Φ {\displaystyle \Phi } is the standard normal cumulative distribution function.

Use in location testing

[edit]
  1. The term "Z-test" is often used to refer specifically to the one-sample location test comparing the mean of a set of measurements to a given constant when the sample variance is known. For example, if the observed data X1, ..., Xn are (i) independent, (ii) have a common mean μ, and (iii) have a common variance σ2, then the sample average X has mean μ and variance σ 2 n {\displaystyle {\frac {\sigma ^{2}}{n}}} .
  2. The null hypothesis is that the mean value of X is a given number μ0. We can use X  as a test-statistic, rejecting the null hypothesis if X − μ0 is large.
  3. To calculate the standardized statistic Z = ( X ¯ − μ 0 ) s {\displaystyle Z={\frac {({\bar {X}}-\mu _{0})}{s}}} , we need to either know or have an approximate value for σ2, from which we can calculate s 2 = σ 2 n {\displaystyle s^{2}={\frac {\sigma ^{2}}{n}}} . In some applications, σ2 is known, but this is uncommon.
  4. If the sample size is moderate or large, we can substitute the sample variance for σ2, giving a plug-in test. The resulting test will not be an exact Z-test since the uncertainty in the sample variance is not accounted for—however, it will be a good approximation unless the sample size is small.
  5. A t-test can be used to account for the uncertainty in the sample variance when the data are exactly normal.
  6. Difference between Z-test and t-test: Z-test is used when sample size is large (n > 50), or the population variance is known. t-test is used when sample size is small (n < 50) and population variance is unknown.
  7. There is no universal constant at which the sample size is generally considered large enough to justify use of the plug-in test. Typical rules of thumb: the sample size should be 50 observations or more.
  8. For large sample sizes, the t-test procedure gives almost identical p-values as the Z-test procedure.
  9. Other location tests that can be performed as Z-tests are the two-sample location test and the paired difference test.

Conditions

[edit]

For the Z-test to be applicable, certain conditions must be met.

  • Nuisance parameters should be known, or estimated with high accuracy (an example of a nuisance parameter would be the standard deviation in a one-sample location test). Z-tests focus on a single parameter, and treat all other unknown parameters as being fixed at their true values. In practice, due to Slutsky's theorem, "plugging in" consistent estimates of nuisance parameters can be justified. However, if the sample size is not large enough for these estimates to be reasonably accurate, the Z-test may not perform well.
  • The test statistic should follow a normal distribution. Generally, one appeals to the central limit theorem to justify assuming that a test statistic varies normally. There is a great deal of statistical research on the question of when a test statistic varies approximately normally. If the variation of the test statistic is strongly non-normal, a Z-test should not be used.

If estimates of nuisance parameters are plugged in as discussed above, it is important to use estimates appropriate for the way the data were sampled. In the special case of Z-tests for the one or two sample location problem, the usual sample standard deviation is only appropriate if the data were collected as an independent sample.

In some situations, it is possible to devise a test that properly accounts for the variation in plug-in estimates of nuisance parameters. In the case of one and two sample location problems, a t-test does this.

Example

[edit]

Suppose that in a particular geographic region, the mean and standard deviation of scores on a reading test are 100 points, and 12 points, respectively. Our interest is in the scores of 55 students in a particular school who received a mean score of 96. We can ask whether this mean score is significantly lower than the regional mean—that is, are the students in this school comparable to a simple random sample of 55 students from the region as a whole, or are their scores surprisingly low?

First calculate the standard error of the mean:

S E = σ n = 12 55 = 12 7.42 = 1.62 {\displaystyle \mathrm {SE} ={\frac {\sigma }{\sqrt {n}}}={\frac {12}{\sqrt {55}}}={\frac {12}{7.42}}=1.62}

where σ {\displaystyle {\sigma }} is the population standard deviation.

Next calculate the z-score, which is the distance from the sample mean to the population mean in units of the standard error:

z = M − μ S E = 96 − 100 1.62 = − 2.47 {\displaystyle z={\frac {M-\mu }{\mathrm {SE} }}={\frac {96-100}{1.62}}=-2.47}

In this example, we treat the population mean and variance as known, which would be appropriate if all students in the region were tested. When population parameters are unknown, a Student's t-test should be conducted instead.

The classroom mean score is 96, which is −2.47 standard error units from the population mean of 100. Looking up the z-score in a table of the standard normal distribution cumulative probability, we find that the probability of observing a standard normal value below −2.47 is approximately 0.5 − 0.4932 = 0.0068. This is the one-sided p-value for the null hypothesis that the 55 students are comparable to a simple random sample from the population of all test-takers. The two-sided p-value is approximately 0.014 (twice the one-sided p-value).

Another way of stating things is that with probability 1 − 0.014 = 0.986, a simple random sample of 55 students would have a mean test score within 4 units of the population mean. We could also say that with 98.6% confidence we reject the null hypothesis that the 55 test takers are comparable to a simple random sample from the population of test-takers.

The Z-test tells us that the 55 students of interest have an unusually low mean test score compared to most simple random samples of similar size from the population of test-takers. A deficiency of this analysis is that it does not consider whether the effect size of 4 points is meaningful. If instead of a classroom, we considered a subregion containing 900 students whose mean score was 99, nearly the same z-score and p-value would be observed. This shows that if the sample size is large enough, very small differences from the null value can be highly statistically significant. See statistical hypothesis testing for further discussion of this issue.

Occurrence and applications

[edit]

For maximum likelihood estimation of a parameter

[edit]

Location tests are the most familiar Z-tests. Another class of Z-tests arises in maximum likelihood estimation of the parameters in a parametric statistical model. Maximum likelihood estimates are approximately normal under certain conditions, and their asymptotic variance can be calculated in terms of the Fisher information. The maximum likelihood estimate divided by its standard error can be used as a test statistic for the null hypothesis that the population value of the parameter equals zero. More generally, if θ ^ {\displaystyle {\hat {\theta }}} is the maximum likelihood estimate of a parameter θ, and θ0 is the value of θ under the null hypothesis,

θ ^ − θ 0 S E ( θ ^ ) {\displaystyle {\frac {{\hat {\theta }}-\theta _{0}}{{\rm {SE}}({\hat {\theta }})}}}

can be used as a Z-test statistic.

When using a Z-test for maximum likelihood estimates, it is important to be aware that the normal approximation may be poor if the sample size is not sufficiently large. Although there is no simple, universal rule stating how large the sample size must be to use a Z-test, simulation can give a good idea as to whether a Z-test is appropriate in a given situation.

Z-tests are employed whenever it can be argued that a test statistic follows a normal distribution under the null hypothesis of interest. Many non-parametric test statistics, such as U statistics, are approximately normal for large enough sample sizes, and hence are often performed as Z-tests.

Comparing the proportions of two binomials

[edit] Main article: Two-proportion Z-test

The Z-test for comparing two proportions is a statistical method used to evaluate whether the proportion of a certain characteristic differs significantly between two independent samples. This test leverages the property that the sample proportions (which is the average of observations coming from a Bernoulli distribution) are asymptotically normal under the Central Limit Theorem, enabling the construction of a Z-test.

The z-statistic for comparing two proportions is computed using:

z = p ^ 1 − p ^ 2 p ^ ( 1 − p ^ ) ( 1 n 1 + 1 n 2 ) {\displaystyle z={\frac {{\hat {p}}_{1}-{\hat {p}}_{2}}{\sqrt {{\hat {p}}(1-{\hat {p}})\left({\frac {1}{n_{1}}}+{\frac {1}{n_{2}}}\right)}}}}

Where:

  • p ^ 1 {\displaystyle {\hat {p}}_{1}} = sample proportion in the first sample
  • p ^ 2 {\displaystyle {\hat {p}}_{2}} = sample proportion in the second sample
  • n 1 {\displaystyle n_{1}} = size of the first sample
  • n 2 {\displaystyle n_{2}} = size of the second sample
  • p ^ {\displaystyle {\hat {p}}} = pooled proportion, calculated as p ^ = x 1 + x 2 n 1 + n 2 {\displaystyle {\hat {p}}={\frac {x_{1}+x_{2}}{n_{1}+n_{2}}}} , where x 1 {\displaystyle x_{1}} and x 2 {\displaystyle x_{2}} are the counts of successes in the two samples.

The confidence interval for the difference between two proportions, based on the definitions above, is:

( p ^ 1 − p ^ 2 ) ± z α / 2 p ^ 1 ( 1 − p ^ 1 ) n 1 + p ^ 2 ( 1 − p ^ 2 ) n 2 {\displaystyle ({\hat {p}}_{1}-{\hat {p}}_{2})\pm z_{\alpha /2}{\sqrt {{\frac {{\hat {p}}_{1}(1-{\hat {p}}_{1})}{n_{1}}}+{\frac {{\hat {p}}_{2}(1-{\hat {p}}_{2})}{n_{2}}}}}}

Where:

  • z α / 2 {\displaystyle z_{\alpha /2}} is the critical value of the standard normal distribution (e.g., 1.96 for a 95% confidence level).

Where:

  • z 1 − α / 2 {\displaystyle z_{1-\alpha /2}} : Critical value for the significance level.
  • z 1 − β {\displaystyle z_{1-\beta }} : Quantile for the desired power.
  • p 0 = p 1 = p 2 {\displaystyle p_{0}=p_{1}=p_{2}} : When assuming the null is correct.

See also

[edit]
  • Normal distribution
  • Standard normal table
  • Standard score
  • Student's t-test
  • Two-proportion Z-test

References

[edit]

Further reading

[edit]
  • Sprinthall, R. C. (2011). Basic Statistical Analysis (9th ed.). Pearson Education. ISBN 978-0-205-05217-2.
  • Casella, G., Berger, R. L. (2002). Statistical Inference. Duxbury Press. ISBN 0-534-24312-6.
  • Douglas C.Montgomery, George C.Runger.(2014). Applied Statistics And Probability For Engineers.(6th ed.). John Wiley & Sons, inc. ISBN 9781118539712, 9781118645062.
  • v
  • t
  • e
Statistics
  • Outline
  • Index
Descriptive statistics
Continuous data
Center
  • Mean
    • Arithmetic
    • Arithmetic-Geometric
    • Contraharmonic
    • Cubic
    • Generalized/power
    • Geometric
    • Harmonic
    • Heronian
    • Heinz
    • Lehmer
  • Median
  • Mode
Dispersion
  • Average absolute deviation
  • Coefficient of variation
  • Interquartile range
  • Percentile
  • Range
  • Standard deviation
  • Variance
Shape
  • Central limit theorem
  • Moments
    • Kurtosis
    • L-moments
    • Skewness
Count data
  • Index of dispersion
Summary tables
  • Contingency table
  • Frequency distribution
  • Grouped data
Dependence
  • Partial correlation
  • Pearson product-moment correlation
  • Rank correlation
    • Kendall's τ
    • Spearman's ρ
  • Scatter plot
Graphics
  • Bar chart
  • Biplot
  • Box plot
  • Control chart
  • Correlogram
  • Fan chart
  • Forest plot
  • Histogram
  • Pie chart
  • Q–Q plot
  • Radar chart
  • Run chart
  • Scatter plot
  • Stem-and-leaf display
  • Violin plot
Data collection
Study design
  • Effect size
  • Missing data
  • Optimal design
  • Population
  • Replication
  • Sample size determination
  • Statistic
  • Statistical power
Survey methodology
  • Sampling
    • Cluster
    • Stratified
  • Opinion poll
  • Questionnaire
  • Standard error
Controlled experiments
  • Blocking
  • Factorial experiment
  • Interaction
  • Random assignment
  • Randomized controlled trial
  • Randomized experiment
  • Scientific control
Adaptive designs
  • Adaptive clinical trial
  • Stochastic approximation
  • Up-and-down designs
Observational studies
  • Cohort study
  • Cross-sectional study
  • Natural experiment
  • Quasi-experiment
Statistical inference
Statistical theory
  • Population
  • Statistic
  • Probability distribution
  • Sampling distribution
    • Order statistic
  • Empirical distribution
    • Density estimation
  • Statistical model
    • Model specification
    • Lp space
  • Parameter
    • location
    • scale
    • shape
  • Parametric family
    • Likelihood (monotone)
    • Location–scale family
    • Exponential family
  • Completeness
  • Sufficiency
  • Statistical functional
    • Bootstrap
    • U
    • V
  • Optimal decision
    • loss function
  • Efficiency
  • Statistical distance
    • divergence
  • Asymptotics
  • Robustness
Frequentist inference
Point estimation
  • Estimating equations
    • Maximum likelihood
    • Method of moments
    • M-estimator
    • Minimum distance
  • Unbiased estimators
    • Mean-unbiased minimum-variance
      • Rao–Blackwellization
      • Lehmann–Scheffé theorem
    • Median unbiased
  • Plug-in
Interval estimation
  • Confidence interval
  • Pivot
  • Likelihood interval
  • Prediction interval
  • Tolerance interval
  • Resampling
    • Bootstrap
    • Jackknife
Testing hypotheses
  • 1- & 2-tails
  • Power
    • Uniformly most powerful test
  • Permutation test
    • Randomization test
  • Multiple comparisons
Parametric tests
  • Likelihood-ratio
  • Score/Lagrange multiplier
  • Wald
Specific tests
  • Z-test (normal)
  • Student's t-test
  • F-test
Goodness of fit
  • Chi-squared
  • G-test
  • Kolmogorov–Smirnov
  • Anderson–Darling
  • Lilliefors
  • Jarque–Bera
  • Normality (Shapiro–Wilk)
  • Likelihood-ratio test
  • Model selection
    • Cross validation
    • AIC
    • BIC
Rank statistics
  • Sign
    • Sample median
  • Signed rank (Wilcoxon)
    • Hodges–Lehmann estimator
  • Rank sum (Mann–Whitney)
  • Nonparametric anova
    • 1-way (Kruskal–Wallis)
    • 2-way (Friedman)
    • Ordered alternative (Jonckheere–Terpstra)
  • Van der Waerden test
Bayesian inference
  • Bayesian probability
    • prior
    • posterior
  • Credible interval
  • Bayes factor
  • Bayesian estimator
    • Maximum posterior estimator
  • Correlation
  • Regression analysis
Correlation
  • Pearson product-moment
  • Partial correlation
  • Confounding variable
  • Coefficient of determination
Regression analysis
  • Errors and residuals
  • Regression validation
  • Mixed effects models
  • Simultaneous equations models
  • Multivariate adaptive regression splines (MARS)
  • Template:Least squares and regression analysis
Linear regression
  • Simple linear regression
  • Ordinary least squares
  • General linear model
  • Bayesian regression
Non-standard predictors
  • Nonlinear regression
  • Nonparametric
  • Semiparametric
  • Isotonic
  • Robust
  • Homoscedasticity and Heteroscedasticity
Generalized linear model
  • Exponential families
  • Logistic (Bernoulli) / Binomial / Poisson regressions
Partition of variance
  • Analysis of variance (ANOVA, anova)
  • Analysis of covariance
  • Multivariate ANOVA
  • Degrees of freedom
Categorical / multivariate / time-series / survival analysis
Categorical
  • Cohen's kappa
  • Contingency table
  • Graphical model
  • Log-linear model
  • McNemar's test
  • Cochran–Mantel–Haenszel statistics
Multivariate
  • Regression
  • Manova
  • Principal components
  • Canonical correlation
  • Discriminant analysis
  • Cluster analysis
  • Classification
  • Structural equation model
    • Factor analysis
  • Multivariate distributions
    • Elliptical distributions
      • Normal
Time-series
General
  • Decomposition
  • Trend
  • Stationarity
  • Seasonal adjustment
  • Exponential smoothing
  • Cointegration
  • Structural break
  • Granger causality
Specific tests
  • Dickey–Fuller
  • Johansen
  • Q-statistic (Ljung–Box)
  • Durbin–Watson
  • Breusch–Godfrey
Time domain
  • Autocorrelation (ACF)
    • partial (PACF)
  • Cross-correlation (XCF)
  • ARMA model
  • ARIMA model (Box–Jenkins)
  • Autoregressive conditional heteroskedasticity (ARCH)
  • Vector autoregression (VAR) (Autoregressive model (AR))
Frequency domain
  • Spectral density estimation
  • Fourier analysis
  • Least-squares spectral analysis
  • Wavelet
  • Whittle likelihood
Survival
Survival function
  • Kaplan–Meier estimator (product limit)
  • Proportional hazards models
  • Accelerated failure time (AFT) model
  • First hitting time
Hazard function
  • Nelson–Aalen estimator
Test
  • Log-rank test
Applications
Biostatistics
  • Bioinformatics
  • Clinical trials / studies
  • Epidemiology
  • Medical statistics
Engineering statistics
  • Chemometrics
  • Methods engineering
  • Probabilistic design
  • Process / quality control
  • Reliability
  • System identification
Social statistics
  • Actuarial science
  • Census
  • Crime statistics
  • Demography
  • Econometrics
  • Jurimetrics
  • National accounts
  • Official statistics
  • Population statistics
  • Psychometrics
Spatial statistics
  • Cartography
  • Environmental statistics
  • Geographic information system
  • Geostatistics
  • Kriging
  • Category
  • icon Mathematics portal
  • Commons
  • WikiProject
  • v
  • t
  • e
Public health
General
  • Auxology
  • Biological hazard
  • Chief medical officer
  • Climate change
  • Cultural competence
  • Deviance
  • Environmental health
  • Eugenics
    • History of
    • Liberal
  • Euthenics
  • Genomics
  • Globalization and disease
  • Harm reduction
  • Health economics
  • Health literacy
  • Health policy
    • Health system
    • Health care reform
  • Housing First
  • Human right to water and sanitation
  • Management of depression
    • Public health law
    • National public health institute
  • Health politics
  • Labor rights
  • Maternal health
  • Medical anthropology
  • Medical sociology
  • Mental health (Ministers)
  • Occupational safety and health
  • Pharmaceutical policy
  • Pollution
    • Air
    • Water
    • Soil
    • Radiation
    • Light
  • Prisoners' rights
  • Public health intervention
  • Public health laboratory
  • Right to food
  • Right to health
  • Right to a healthy environment
  • Right to housing
  • Right to rest and leisure
  • Right to sit
  • Security of person
  • Sexual and reproductive health
  • Social psychology
  • Sociology of health and illness
  • Unisex changing rooms
  • Unisex public toilets
  • Workers' right to access the toilet
Preventive healthcare
  • Behavior change
    • Theories
  • Drug checking
  • Family planning
  • Harm reduction
  • Health promotion
  • Human nutrition
    • Healthy diet
    • Preventive nutrition
  • Hygiene
    • Food safety
    • Hand washing
    • Infection control
    • Oral hygiene
  • Needle and syringe programmes
  • Occupational safety and health
    • Human factors and ergonomics
    • Hygiene
    • Controlled Drugs
    • Injury prevention
    • Medicine
    • Nursing
  • Patient safety
    • Organization
  • Pharmacovigilance
  • Reagent testing
  • Safe sex
  • Sanitation
    • Emergency
    • Fecal–oral transmission
    • Open defecation
    • Sanitary sewer
    • Waterborne diseases
    • Worker
  • School hygiene
  • Smoking cessation
  • Supervised injection site
  • Vaccination
  • Vector control
Population health
  • Adult mortality
  • Biostatistics
  • Child mortality
  • Community health
  • Epidemiology
  • Global health
  • Health impact assessment
  • Health system
  • Infant mortality
  • Open-source healthcare software
  • Multimorbidity
  • Public health informatics
  • Social determinants of health
    • Commercial determinants of health
    • Health equity
    • Race and health
  • Social medicine
Biological andepidemiological statistics
  • Case–control study
  • Randomized controlled trial
  • Relative risk
  • Statistical hypothesis testing
    • Analysis of variance (ANOVA)
    • Regression analysis
    • ROC curve
    • Student's t-test
    • Z-test
  • Statistical software
Infectious and epidemicdisease prevention
  • Asymptomatic carrier
  • Epidemics
    • List
  • Notifiable diseases
    • List
  • Public health surveillance
    • Disease surveillance
  • Quarantine
  • Sexually transmitted infection
  • Social distancing
  • Tropical disease
  • Vaccine trial
  • WASH
Food hygiene andsafety management
  • Food
    • Additive
    • Chemistry
    • Engineering
    • Microbiology
    • Processing
    • Safety
    • Safety scandals
  • Good agricultural practice
  • Good manufacturing practice
    • HACCP
    • ISO 22000
Health behavioralsciences
  • Diffusion of innovations
  • Health belief model
  • Health communication
  • Health psychology
  • Positive deviance
  • PRECEDE–PROCEED model
  • Social cognitive theory
  • Social norms approach
  • Theory of planned behavior
  • Transtheoretical model
Organizations,educationand history
Organizations
  • Caribbean
    • Caribbean Public Health Agency
  • China
    • Center for Disease Control and Prevention
  • Europe
    • Centre for Disease Prevention and Control
    • Committee on the Environment, Public Health and Food Safety
  • Russia
    • Rospotrebnadzor
  • India
    • Ministry of Health and Family Welfare
  • Canada
    • Health Canada
    • Public Health Agency
  • U.S.
    • Centers for Disease Control and Prevention
    • Health departments in the United States
    • Council on Education for Public Health
    • Public Health Service
  • World Health Organization
  • World Toilet Organization
  • (Full list)
Education
  • Health education
  • Higher education
    • Bachelor of Science in Public Health
    • Doctor of Public Health
    • Professional degrees of public health
    • Schools of public health
History
  • History of public health in the United Kingdom
  • History of public health in the United States
  • History of public health in Australia
  • Sara Josephine Baker
  • Samuel Jay Crumbine
  • Carl Rogers Darnall
  • Joseph Lister
  • Margaret Sanger
  • John Snow
  • Typhoid Mary
  • Radium Girls
  • Germ theory of disease
  • Social hygiene movement
  • Category
  • Commons
  • WikiProject

Từ khóa » Thu Zu