S371: Lab 5

Lab Instructor: Katya Baldina ()

2023-09-20

Announcement

TEST 1 OPENED TODAY AT 12.45 PM AND DUE TOMORROW 11.59 PM!

No office hours during the test. If you find anything weird about the test, feel free to email me or Prof. Schultz.

HW2 Reflection

?quantile 

The generic function quantile produces sample quantiles corresponding to the given probabilities.

Test 1: Multiple Choice

Canvas system does not allow you to go back to the previous question and change the answer

• You can only re-enter all answers in the multiple-choice section from the beginning

• So try to jot down your answer for multiple-choice questions on a piece of paper in case you need to change any answers

Test 1: Wording

If the question asks for proportion, it refers to the area under the curve, which corresponds to the numbers here:

Test 1: Wording

If question asks you about “how many standard deviations the certain number is above the mean”, it means you need to standardize this number (convert to z score). If z score is something like 2.5, your answer will be: “this number is 2.5 standard deviations above the mean.

Concepts

The things or objects described by a set of data

Examples: individual people, families, states, countries, organizations, cars, cats

Concepts

\(\sigma = \sqrt{\frac{\sum\limits_{i=1}^{n} \left(x_{i} - \bar{x}\right)^{2}} {n-1}}\)

Concepts

Concepts

Z score and Standard Normal Distribution

Z score:

\(z = \frac{x-µ}{σ}\)

z - standardized score

x - original variable

µ - mean of x

σ - standard deviation of x

Meaning: how many standard deviation is the x value above the mean (positive z score) or below the mean (negative z score)?

Standard deviation becomes the new unit of measurement here

Why convert to z-score?

Standard Normal Distribution vs. Normal Distribution

Standard Normal Distribution vs. Normal Distribution

Standard Normal Distribution vs. Normal Distribution

Standard Normal Distribution vs. Normal Distribution

Standard Normal Distribution vs. Normal Distribution

Standard Normal Distribution vs. Normal Distribution

Standard Normal Distribution vs. Normal Distribution

Standard Normal Distribution vs. Normal Distribution

Standard Normal Distribution vs. Normal Distribution

Standard Normal Distribution vs. Normal Distribution

Standard Normal Distribution vs. Normal Distribution

Z score: Why we need it?

Z-score and the corresponding area under the curve (from left to right) are the properties of a standard normal curve.

We can convert any other normal-like distributions into z-score and these distributions can be converted to standard normal distribution.

Just take the mean and standard deviation from the normal distribution and calculate z-score for each value using this formula:

\(z = \frac{x-µ}{σ}\)

Standardization

Standardization means that we transform normal distributions to “standard normal distribution”

By converting to z-score, we have a standard/reference for comparison across distributions (across time, populations, or even other variables)

Z table

The total area under the standard normal curve is always 1

The area under the standard normal curve is always between 0 and 1

Interpretation of z-score: how many standard deviation is the x value above the mean (positive z score) or below the mean (negative z score)?

Z 0.00 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09
-0.9 0.1841 0.1814 0.1788 0.1762 0.1736 0.1711 0.1685 0.1660 0.1635 0.1611
-0.8 0.2119 0.2090 0.2061 0.2033 0.2005 0.1977 0.1949 0.1922 0.1894 0.1867
-0.7 0.2420 0.2389 0.2358 0.2327 0.2296 0.2266 0.2236 0.2206 0.2177 0.2148
-0.6 0.2743 0.2709 0.2676 0.2643 0.2611 0.2578 0.2546 0.2514 0.2483 0.2451

Example 1

How much is blue shaded area?

or

What is \(P(z<-0.85)\)?

Read as “what is the probability of z less than -0.85”

Z 0.00 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09
-0.9 0.1840601 0.1814113 0.1787864 0.1761855 0.1736088 0.1710561 0.1685276 0.1660232 0.1635431 0.1610871
-0.8 0.2118554 0.2089701 0.2061081 0.2032694 0.2004542 0.1976625 0.1948945 0.1921502 0.1894297 0.1867329
-0.7 0.2419637 0.2388521 0.2357625 0.2326951 0.2296500 0.2266274 0.2236273 0.2206499 0.2176954 0.2147639
-0.6 0.2742531 0.2709309 0.2676289 0.2643473 0.2610863 0.2578461 0.2546269 0.2514289 0.2482522 0.2450971

Example 2

What is \(P(z<0.34)\)?

Read as “what is the probability of z less than 0.34”

Z 0.00 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09
0.2 0.5792597 0.5831662 0.5870644 0.5909541 0.5948349 0.5987063 0.6025681 0.6064199 0.6102612 0.6140919
0.3 0.6179114 0.6217195 0.6255158 0.6293000 0.6330717 0.6368307 0.6405764 0.6443088 0.6480273 0.6517317
0.4 0.6554217 0.6590970 0.6627573 0.6664022 0.6700314 0.6736448 0.6772419 0.6808225 0.6843863 0.6879331

Example 3

What is \(P(z<2.37)\)?

Z 0.00 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09
2.2 0.9860966 0.9864474 0.9867906 0.9871263 0.9874545 0.9877755 0.9880894 0.9883962 0.9886962 0.9889893
2.3 0.9892759 0.9895559 0.9898296 0.9900969 0.9903581 0.9906133 0.9908625 0.9911060 0.9913437 0.9915758
2.4 0.9918025 0.9920237 0.9922397 0.9924506 0.9926564 0.9928572 0.9930531 0.9932443 0.9934309 0.9936128

Challenging Example #1

What is \(P(z>1.24)\)?

Challenging Example #1

Method 1:

  1. Look at the area to the left (light blue): P(z<1.24)=0.8925

  2. P(z>1.24) = 1-P(z<1.24) = 1-0.8925

Z 0.00 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09
1.1 0.8643339 0.8665005 0.8686431 0.8707619 0.8728568 0.8749281 0.8769756 0.8789995 0.8809999 0.8829768
1.2 0.8849303 0.8868606 0.8887676 0.8906514 0.8925123 0.8943502 0.8961653 0.8979577 0.8997274 0.9014747
1.3 0.9031995 0.9049021 0.9065825 0.9082409 0.9098773 0.9114920 0.9130850 0.9146565 0.9162067 0.9177356

Area under the curve to the right:

Method #2: using the symmetric property

Based on symmetry, the area on the left should be the same as the area on the right.

Therefore, all you need to do is to look up the z table for P(z<-1.24):

Z 0.00 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09
-1.3 0.0968005 0.0950979 0.0934175 0.0917591 0.0901227 0.0885080 0.0869150 0.0853435 0.0837933 0.0822644
-1.2 0.1150697 0.1131394 0.1112324 0.1093486 0.1074877 0.1056498 0.1038347 0.1020423 0.1002726 0.0985253
-1.1 0.1356661 0.1334995 0.1313569 0.1292381 0.1271432 0.1250719 0.1230244 0.1210005 0.1190001 0.1170232