A review of key statistical concepts

Preview:

DESCRIPTION

A review of key statistical concepts. An overview of the review. Populations and parameters Samples and statistics Confidence intervals Hypothesis testing. Populations and Parameters. … and Samples and Statistics. Populations and Parameters. - PowerPoint PPT Presentation

Citation preview

A review of key statistical concepts

An overview of the review

• Populations and parameters

• Samples and statistics

• Confidence intervals

• Hypothesis testing

Populations and Parameters

… and Samples and Statistics

Populations and Parameters

• A population is any large collection of objects or individuals, such as Americans, students, or trees about which information is desired.

• A parameter is any summary number, like an average or percentage, that describes the entire population.

Parameters

• Examples:– population mean µ = average temperature– population proportion p = proportion approving

of president’s job performance

• 99.999999999999….% of the time, we don’t (...or can’t) know the real value of a population parameter.

• Best we can do is estimate the parameter!

Samples and Statistics

• A sample is a representative group drawn from the population.

• A statistic is any summary number, like an average or percentage, that describes the sample.

Statistics

• Examples– sample mean (“x-bar”)– sample proportion (“p-hat”)

• Because samples are manageable in size, we can determine the value of statistics.

• We use the known statistic to learn about the unknown parameter.

Example: Smoking at PSU?

Population of 42,000 PSU students

What proportion smoke regularly?

Sample of 987 PSU students

43% reported smoking regularly

Example: Grade inflation?

Population of 5 million college

studentsIs the average GPA 2.7?

Sample of 100 college students

How likely is it that 100 students would have an average GPA as large as 2.9 if the population average was 2.7?

Example: A linear relationship?

424140393837363534

3500

3000

2500

Gestation (weeks)

Birt

h w

eig

ht (

gra

ms)

S = 167.327 R-Sq = 77.5 % R-Sq(adj) = 76.8 %

Weight = -2037.00 + 130.817 Gestation

Regression Plot

Y-hat = a + b X

E(Y) = A + B X

Two ways to learn about a population parameter

• Confidence intervals estimate parameters.– We can be 95% confident that the proportion of

Penn State students who have a tattoo is between 5.1% and 15.3%.

• Hypothesis tests test the value of parameters.– There is enough statistical evidence to conclude

that the mean normal body temperature of adults is lower than 98.6 degrees F.

Confidence intervals

A review of concepts

The situation

• Want to estimate the actual population mean .

• But can only get “x-bar,” the sample mean.• Use “x-bar” to find a range of values,

L<<U, that we can be really confident contains .

• The range of values is called a “confidence interval.”

Confidence intervals for proportions in newspapers

• “Sample estimate”: 69% of 1,027 U.S. adults think using a hand-held cell phone while driving a car should be illegal.

• The “margin of error” is 3%.• The “confidence interval” is 69% ± 3%.• We can be really confident that between 66% and

72% of all U.S. adults think using a hand-held cell phone while driving a car should be illegal.

Source: ABC News Poll, May 16-20, 2001

General form of most confidence intervals

• Sample estimate ± margin of error

• Lower limit L = estimate - margin of error

• Upper limit U = estimate + margin of error

• Then, we’re confident that the value of the population parameter is somewhere between L and U.

(1-α)100% t-interval for population mean

nsx 1,

21 nt

Formula in notation:

Formula in words:

Sample mean ± (t-multiplier × standard error)

Determining the t-multiplier

43210-1-2-3-4

0.4

0.3

0.2

0.1

0.0

t(14)

de

nsity

1

2

2

Typical t-multipliers

Conf. coefficient Conf. level

0.90 90% 0.95

0.95 95% 0.975

0.99 99% 0.995

21

%1001 1

t-interval for mean in Minitab

One-Sample T: FVC

Variable N Mean StDev SE Mean 95.0% CI FVC 8 3.5875 0.1458 0.0515 (3.4655,3.7095)

We can be 95% confident that the mean forced vital capacity of all female college students is between 3.5 and 3.7 liters.

Length of confidence interval

• Want confidence interval to be as narrow as possible.

• Length = Upper Limit - Lower Limit

How length of CI is affected?

• As sample mean increases…

• As the standard deviation decreases…

• As we decrease the confidence level…

• As we increase sample size …

nsx t

Hypothesis testing

A review of concepts

General idea of hypothesis testing

• Make an initial assumption.

• Collect evidence (data).

• Based on the available evidence (data), decide whether to reject or not reject the initial assumption.

Example: Normal body temperature

Population of many, many adults

Is average adult body temperature 98.6 degrees? Or is it lower?

Sample of 130 adults

Average body temperature of 130 sampled adults is 98.25 degrees.

Making the decision

• It is either likely or unlikely that we would collect the evidence we did given the initial assumption.

• If it is likely, then we “do not reject” our initial assumption. There is not enough evidence to do otherwise.

Making the decision (cont’d)

• If it is unlikely, then:– either our initial assumption is correct and we

experienced a very unusual event– or our initial assumption is incorrect

• In statistics, if it is unlikely, we “reject” our initial assumption.

Again, idea of hypothesis testing: criminal trial analogy

• First, state 2 hypotheses, the null hypothesis (“H0”) and the alternative hypothesis (“HA”)

– H0: Defendant is not guilty (innocent).

– HA: Defendant is guilty.

Criminal trial analogy (continued)

• Then, collect evidence, such as finger prints, blood spots, hair samples, carpet fibers, shoe prints, ransom notes, handwriting samples, etc.

• In statistics, the data are the evidence.

Criminal trial analogy(continued)

• Then, make initial assumption.– Our criminal justice system is based on

“defendant is innocent until proven guilty.”– So, assume defendant is innocent.

• In statistics, we always assume the null hypothesis is true.

Criminal trial analogy(continued)

• Then, make a decision based on the available evidence.– If there is sufficient evidence (“beyond a

reasonable doubt”), reject the null hypothesis. (Behave as if defendant is guilty.)

– If there is insufficient evidence, do not reject the null hypothesis. (Behave as if defendant is innocent.)

Very important point

• If we reject the null hypothesis, we do not prove the alternative hypothesis is true.

• If we do not reject the null hypothesis, we do not prove the null hypothesis is true.

• We merely state there is enough evidence to behave one way or the other.

• Always true in statistics! Whatever the decision, there is always a chance we made an error.

Errors in criminal trials

Truth

JuryDecision

Not guilty Guilty

Not guilty OK ERROR

Guilty ERROR OK

Errors in hypothesis testing

Truth

DecisionNull

hypothesisAlternativehypothesis

Do notreject null

OKTYPE IIERROR

Reject nullTYPE IERROR

OK

Definitions: Types of errors

• Type I error: The null hypothesis is rejected when it is true.

• Type II error: The null hypothesis is not rejected when it is false.

• There is always a chance of making one of these errors. But, a good scientific study will minimize the chance of doing so!

Making the decision

• “It is either likely or unlikely that we would collect the evidence we did given the initial assumption.”

• Two ways to determine likely or unlikely:– Critical value approach (many textbooks)– P-value approach (science, journals, software)

Possible hypotheses about mean µ

Type Null Alternative

Right-tailed

Left-tailed

Two-tailed

3:0 H

3:0 H

3:0 H

3:0 H

3:0 H

3:0 H

Critical value approach

• Using sample data and assuming null hypothesis is true, calculate the value of the test statistic.

• Set the significance level, α, the probability of making a Type I error to be small (0.05 or 0.01).

• Compare the value of the test statistic to the known distribution of the test statistic.

• If the test statistic is more extreme than expected, allowing for an α chance of error, reject the null hypothesis. Otherwise, don’t reject the null.

Right-tailed critical value

43210-1-2-3-4

0.4

0.3

0.2

0.1

0.0

t(14)

de

nsity

1.7613

0.95

0.05

Reject null hypothesis if test statistic is greater than 1.7613.

Left-tailed critical value

43210-1-2-3-4

0.4

0.3

0.2

0.1

0.0

t(14)

de

nsity

-1.7613

0.05

0.95

Reject null hypothesis if test statistic is less than -1.7613.

Two-tailed critical value

43210-1-2-3-4

0.4

0.3

0.2

0.1

0.0

t(14)

de

nsity 0.95

0.025 0.025

-2.1448 2.1448

Reject null hypothesis if test statistic is less than -2.1448 or greater than 2.1448.

P-value approach

• Using sample data and assuming null hypothesis is true, calculate the value of the test statistic.

• Using known distribution of the test statistic, calculate the P-value = “If the null hypothesis is true, what is the probability that we’d observe a more extreme test statistic than we did?”

• Set the significance level, α, the probability of making a Type I error to be small (0.05 or 0.01).

• If the probability is small, i.e., smaller than α, reject the null hypothesis. Otherwise, don’t reject the null.

Right-tailed P-value

43210-1-2-3-4

0.4

0.3

0.2

0.1

0.0

t(14)

de

nsity

t* = 2.5

0.9873

0.0127

If it’s unlikely to observe such a large test statistic, i.e., if the P-value (0.0127) is smaller than α, reject the null hypothesis.

Left-tailed P-value

43210-1-2-3-4

0.4

0.3

0.2

0.1

0.0

t(14)

de

nsity

t* = -2.5

0.0127

0.9873

If it’s unlikely to observe such a small test statistic, i.e., if the P-value (0.0127) is smaller than α, reject the null hypothesis.

Two-tailed P-value

43210-1-2-3-4

0.4

0.3

0.2

0.1

0.0

t(14)

de

nsity

t* = 2.5t* = -2.5

0.0127 0.0127

0.9746

If it’s unlikely to observe such an extreme test statistic, i.e., if the P-value (0.0254) is smaller than α, reject the null hypothesis.

Example: Right-tailed test

Brinell hardness measurement of ductile iron subcritically annealed:170 167 174 179 179156 163 156 187 156183 179 174 179 170156 187 179 183 174187 167 159 170 179

170:

170:0

AH

H

One-Sample T: BrinellTest of mu = 170 vs mu > 170

Variable N Mean StDev SE Mean T PBrinell 25 172.52 10.31 2.06 1.22 0.117

Example: Right-tailed critical value

43210-1-2-3-4

0.4

0.3

0.2

0.1

0.0

t(24)

de

nsity 0.95

0.05

1.7109

Example: Right-tailed P-value

43210-1-2-3-4

0.4

0.3

0.2

0.1

0.0

t(24)

de

nsity

t* = 1.22

0.883

0.117

Example: Left-tailed testHeight of sunflower seedlings.11.5 11.8 15.7 16.1 14.1 10.515.2 19.0 12.8 12.4 19.2 13.516.5 13.5 14.4 16.7 10.9 13.015.1 17.1 13.3 12.4 8.5 14.312.9 11.1 15.0 13.3 15.8 13.5 9.3 12.2 10.3

7.15:

7.15:0

AH

H

Test of mu = 15.7 vs mu < 15.7

Variable N Mean StDev SE Mean T PSunflower 33 13.664 2.544 0.443 -4.60 0.000

Example: Left-tailed critical value

43210-1-2-3-4

0.4

0.3

0.2

0.1

0.0

t(32)

de

nsity

0.95

0.05

-1.6939

Example: Left-tailed P-value

50-5

0.4

0.3

0.2

0.1

0.0

t(32)

de

nsity

-4.60

<0.0001

>0.9999

Example: Two-tailed test

Thickness of spearmint gum.7.65 7.60 7.65 7.70 7.557.55 7.40 7.40 7.50 7.50 5.7:

5.7:0

AH

H

Test of mu = 7.5 vs mu not = 7.5

Variable N Mean StDev SE Mean T PGum 10 7.5500 0.1027 0.0325 1.54 0.158

Example: Two-tailed critical value

43210-1-2-3-4

0.4

0.3

0.2

0.1

0.0

t(9)

de

nsity

0.95

0.025 0.025

2.2622-2.2622

Example: Two-tailed P-value

43210-1-2-3-4

0.4

0.3

0.2

0.1

0.0

t(9)

de

nsity

1.54-1.54

0.0790.079

0.842

Recommended