Z Score, Z Statistics and P value
What is a Z score or Z statistics?
Firstly Z score and Z statistics is the same. It is a measure of the number of standard deviations a data point is away from the sample mean. Mathematically this is written as:
z=x-ˉxσ
z = Z score or Z statistics
x = data point
ˉx = sample mean
σ = sample standard deviation
The mathematical equation of standard deviation is:
σ=√x-ˉxN
What is P value?
The P value is the probability that a particular value assuming the null hypothesis is true.
Conventionally a P value of less than 0.05 is grounds for rejecting the null hypothesis.
For the lower-tailed test or left-tailed test, the P value is expressed as:
P=Pr(TS≤ts∣H0)=cdf(ts)
And for the upper-tailed test or right-tailed test, the P value is expressed as:
P=Pr(TS≥ts∣H0)=1-cdf(ts)
And the P value for a two-tailed test is
P=2×min{Pr(TS≤ts∣H0),Pr(TS≥ts∣H0}
P = P value of an observation
TS = test statistics
ts = observed value of test statistics from your sample
cdf() = Cumulative distribution function for the test statistic
Pr(condition∣H0) = probability of the observation if the null hypothesis H0 is true.
min function to select the minimum value
How to get P value from Z score?
Calculating Z score depends on the problem analysis.
Fortunately calculating P value from Z score is easy in Excel. Assuming the Z score has been calculated z then
p_value = NORM.S.DIST(z, TRUE)
What about T score / T statistics?
Likewise calculating T score or T statistics depends on the problem analysis. But it is related the t distribution.
Then in Excel the
p_value = T.DIST(t_score, degrees_of_freedom, TRUE)
I thought I write about this before launching into writing hypothesis testing formulae with LAMBDA where you will see z scores and t scores popping up. In the meantime, you might be interested in brushing up on your statistics in your DC-DEN!
Comments
Post a Comment