How to calculate the Z score

Author: Alice Brown
Date Of Creation: 23 May 2021
Update Date: 1 July 2024
Anonim
Statistics - Find the z score
Video: Statistics - Find the z score

Content

A z-score (Z-test) looks at a specific sample of a given dataset and measures the number of standard deviations from the mean. To find the Z-score of a sample, you need to calculate the mean, variance, and standard deviation of the sample. To calculate the Z-score, you subtract the mean from the sample numbers, and then divide the result by the standard deviation. Although there are a lot of calculations, they are not very difficult.

Steps

Part 1 of 4: Calculating the Average

  1. 1 Pay attention to the dataset. To calculate the mean of a sample, you need to know the values ​​of some quantities.
    • Find out how many numbers are in the sample. For example, consider the example of a palm grove and your sample will be five numbers.
    • Find out what value these numbers characterize. In our example, each number describes the height of one palm tree.
    • Pay attention to the spread of numbers (variance). That is, find out if the numbers differ over a wide range or if they are fairly close.
  2. 2 Collect data. All numbers in the sample will be needed to perform the calculations.
    • The mean is the arithmetic mean of all the numbers in the sample.
    • To calculate the average, add all the numbers in the sample, and then divide the result by the number of numbers.
    • Let's say n is the number of sample numbers. In our example, n = 5 because the sample consists of five numbers.
  3. 3 Add up all the numbers in the sample. This is the first step in the process of calculating the average.
    • Let's say that in our example the sample includes the following numbers: 7; eight; eight; 7.5; nine.
    • 7 + 8 + 8 + 7.5 + 9 = 39.5. This is the sum of all the numbers in the sample.
    • Check your answer to make sure the summation is correct.
  4. 4 Divide the found sum by the number of sample numbers (n). This will calculate the average.
    • In our example, the sample includes five numbers that characterize the height of the trees: 7; eight; eight; 7.5; 9. Thus, n = 5.
    • In our example, the sum of all the numbers in the sample is 39.5. Divide this number by 5 to calculate the average.
    • 39,5/5 = 7,9.
    • The average palm height is 7.9 m. As a rule, the sample mean is denoted as μ, so μ = 7.9.

Part 2 of 4: Calculating Variance

  1. 1 Find the variance. Variance is a quantity that characterizes the measure of the dispersion of the sample numbers relative to the mean.
    • Variance can be used to find out how widely the sample numbers are scattered.
    • The low variance sample includes numbers that are scattered close to the mean.
    • The high variance sample includes numbers that are scattered far from the mean.
    • Often, variance is used to compare the spread of numbers of two different datasets or samples.
  2. 2 Subtract the mean from each sample number. This will determine how much each number in the sample differs from the mean.
    • In our example with palm heights (7, 8, 8, 7.5, 9 m), the average is 7.9.
    • 7 - 7,9 = -0,9, 8 - 7,9 = 0,1, 8 - 7,9 = 0,1, 7,5 - 7,9 = -0,4, 9 - 7,9 = 1,1.
    • Perform these calculations again to make sure they are correct. At this stage, it is important not to make a mistake in the calculations.
  3. 3 Square each result. This is necessary in order to calculate the sample variance.
    • Recall that in our example, the mean (7.9) was subtracted from each sample number (7, 8, 8, 7.5, 9) and the following results were obtained: -0.9, 0.1, 0.1 , -0.4, 1.1.
    • Square these numbers: (-0.9) ^ 2 = 0.81, (0.1) ^ 2 = 0.01, (0.1) ^ 2 = 0.01, (-0.4) ^ 2 = 0.16, (1.1) ^ 2 = 1.21.
    • Squares found: 0.81, 0.01, 0.01, 0.16, 1.21.
    • Check the calculations before moving on to the next step.
  4. 4 Add up the squares you find. That is, calculate the sum of squares.
    • In our example with the heights of the palms, the following squares were obtained: 0.81, 0.01, 0.01, 0.16, 1.21.
    • 0,01 + 0,81 + 0,01 + 0,16 + 1,21 = 2,2
    • In our example, the sum of squares is 2.2.
    • Add the squares again to check that the calculations are correct.
  5. 5 Divide the sum of squares by (n-1). Recall that n is the number of sample numbers. This will calculate the variance.
    • In our example with the heights of the palms (7, 8, 8, 7.5, 9 m), the sum of the squares is 2.2.
    • The sample includes 5 numbers, so n = 5.
    • n - 1 = 4
    • Recall that the sum of squares is 2.2. To find the variance, calculate: 2.2 / 4.
    • 2,2/4 = 0,55
    • The variance of our sample with palm heights is 0.55.

Part 3 of 4: Calculating the Standard Deviation

  1. 1 Determine the variance of the sample. It is needed to calculate the sample standard deviation.
    • Variance characterizes the measure of the spread of the sample numbers relative to the mean.
    • The standard deviation is a quantity that determines the spread of the sample numbers.
    • In our example with palm heights, the variance is 0.55.
  2. 2 Extract the square root of the variance. This will give you the standard deviation.
    • In our sample with palm heights, the variance is 0.55.
    • √0.55 = 0.741619848709566. At this point, you will get a decimal with more decimal places.In most cases, the standard deviation can be rounded to the nearest hundredths or thousandths. In our example, let's round the result to the nearest hundredth: 0.74.
    • Thus, the standard deviation of our sample is approximately 0.74.
  3. 3 Check again that the mean, variance, and standard deviation are calculated correctly. This will make sure you get the exact standard deviation.
    • Write down the steps you followed to calculate the quantities mentioned.
    • This will help you find the step where you made the mistake (if any).
    • If you get different mean, variance, and standard deviation during validation, repeat the calculation.

Part 4 of 4: Calculating the Z-score

  1. 1 The Z-score is calculated using the following formula: z = X - μ / σ. Using this formula, you can find the Z-score for any number of the sample.
    • Recall that the Z-score allows you to determine the number of standard deviations from the mean for the number of samples under consideration.
    • In the above formula, X is a specific number of samples. For example, to find out how many standard deviations the number 7.5 is from the mean, substitute 7.5 for X in the formula.
    • In the formula, μ is the average. In our sample of palm heights, the average is 7.9.
    • In the formula, σ is the standard deviation. In our sample of palm heights, the standard deviation is 0.74.
  2. 2 Subtract the mean from the sample number in question. This is the first step in the Z-score calculation process.
    • For example, let's find out how many standard deviations the number 7.5 (our sample with the heights of the palms) is away from the mean.
    • Subtract first: 7.5 - 7.9.
    • 7,5 - 7,9 = -0,4.
    • Double check that you have calculated the mean and the difference correctly.
  3. 3 Divide the result (difference) by the standard deviation. This will give you the Z-score.
    • In our sample of palm heights, we calculate the Z-score of 7.5.
    • Subtracting the average from 7.5, you get -0.4.
    • Recall that the standard deviation of our sample with palm heights is 0.74.
    • -0,4 / 0,74 = -0,54
    • So, in this case, the Z-score is -0.54.
    • This Z-score means that 7.5 is -0.54 standard deviations away from the mean of the palm heights sample.
    • The z-score can be either positive or negative.
    • A negative Z-score indicates that the selected sample number is less than the mean, and a positive Z-score indicates that the number is greater than the mean.