Introduction to Hypothesis Testing MARE 250 Dr. Jason Turner.

24
Introduction to Hypothesis Testing MARE 250 Dr. Jason Turner

Transcript of Introduction to Hypothesis Testing MARE 250 Dr. Jason Turner.

Page 1: Introduction to Hypothesis Testing MARE 250 Dr. Jason Turner.

Introduction to Hypothesis Testing

MARE 250Dr. Jason Turner

Page 2: Introduction to Hypothesis Testing MARE 250 Dr. Jason Turner.

We use inferential statistics to make decisions or judgments about data values

Hypothesis testing is the most commonly used method

Hypothesis testing is all about taking scientific questions and translating them into statistical hypotheses with “yes/no” answers

Hypothesis Testing

Page 3: Introduction to Hypothesis Testing MARE 250 Dr. Jason Turner.

Hypothesis Testing

Start with a research question

Translate that question into a hypothesis - statement with a “yes/no” answer

Hypothesis crafted into two parts:

Null hypothesis and Alternative Hypothesis – mirror images of each other

Page 4: Introduction to Hypothesis Testing MARE 250 Dr. Jason Turner.

Hypothesis Testing

Hypothesis testing – used for making decisions or judgments

Hypothesis – a statement that something is true

Hypothesis test typically involves two hypothesis:

Null and Alternative Hypotheses

Page 5: Introduction to Hypothesis Testing MARE 250 Dr. Jason Turner.

Testing…Testing…One…TwoNull hypothesis – a hypothesis to be tested

Symbol (H0) represents Null hypothesis

Symbol (μ) represents Mean

H0: μ1 = μ2 (Null hypothesis = Mean 1 = Mean 2)

Page 6: Introduction to Hypothesis Testing MARE 250 Dr. Jason Turner.

Testing…Testing…One…TwoResearch Question – Is there a difference in urchin densities across habitat types?

Null hypothesis – The mean number of urchins in the Deep region are equal to the mean number of urchins in the Shallow region H0: μurchins deep = μurchins shallow

In means tests – the null is always that means at equal

Page 7: Introduction to Hypothesis Testing MARE 250 Dr. Jason Turner.

Three choices for Alternative hypotheses:

1. Mean is Different From a specified value – two-tailed test Ha: μ ≠ μ0

2. Mean is Less Than a specified value – left-tailed test Ha: μ < μ0

3. Mean is Greater Than a specified value – right-tailed test Ha: μ > μ0

Testing…Testing…One…Two

Page 8: Introduction to Hypothesis Testing MARE 250 Dr. Jason Turner.

Testing…Testing…One…Two

Page 9: Introduction to Hypothesis Testing MARE 250 Dr. Jason Turner.

Testing…Testing…One…Two

Page 10: Introduction to Hypothesis Testing MARE 250 Dr. Jason Turner.

Critical Region-DefinedWe need to determine the critical value (s) for a hypothesis test at the 5% significance level (α=0.05) if the test is (a) two-tailed, (b) left tailed, (c) right tailed

{0.025 0.025{ { {0.05 0.05

Page 11: Introduction to Hypothesis Testing MARE 250 Dr. Jason Turner.

Testing…Testing…One…TwoAlternative hypothesis (research hypothesis) – a hypothesis to be considered as an alternative to the null hypothesis (Ha)

(Ha: μ1 ≠ μ2 )(Alt. hypothesis = Mean 1 ≠ Mean 2)

Page 12: Introduction to Hypothesis Testing MARE 250 Dr. Jason Turner.

Testing…Testing…One…TwoResearch Question – Is there a difference in urchin densities across habitat types?

Null hypothesis – The mean number of urchins in the Deep region are equal to the mean number of urchins in the Shallow region

H0: μurchins deep = μurchins shallow

Alternative hypothesis - The mean number of urchins in the Deep region are not equal to the mean number of urchins in the Shallow region

Ha: μurchins deep ≠ μurchins shallow

Page 13: Introduction to Hypothesis Testing MARE 250 Dr. Jason Turner.

Testing…Testing…One…TwoImportant terms:

Test statistic – answer unique to each statistical test; (t-test – t, ANOVA – F, correlation – r, regression – R2)

Alpha (α) – critical value; represents the line between “yes” and “no”; is 0.05

P-value – universal translator between test statistic and alpha

Page 14: Introduction to Hypothesis Testing MARE 250 Dr. Jason Turner.

Hold on, I have to pP-value approach – indicates how likely (or unlikely) the observation of the value obtained for the test statistic would be if the null hypothesis is true

A small p-value (close to 0) the stronger the evidence against the null hypothesis

It basically gives you odds that you sample test is a correct representation of your population

Page 15: Introduction to Hypothesis Testing MARE 250 Dr. Jason Turner.

Didn’t you go before we leftP-value – equals the smallest significance level at which the null hypothesis can be rejected

Page 16: Introduction to Hypothesis Testing MARE 250 Dr. Jason Turner.

Didn’t you go before we leftP-value – equals the smallest significance level at which the null hypothesis can be rejected - the smallest significance level for which the observed sample data results in rejection of H0

If the p-value is less than or equal to the specified significance level (0.05), reject the null hypothesis, otherwise, do not (fail to) reject the null hypothesis

Page 17: Introduction to Hypothesis Testing MARE 250 Dr. Jason Turner.

How to we use p?

Compare p-value from test to specified significance level (alpha, α=0.05)

If the p-value is less than or equal to α=0.05, reject the null hypothesis,

Otherwise, do not reject (fail to) the null hypothesis

No, I didn’t have to go then

Page 18: Introduction to Hypothesis Testing MARE 250 Dr. Jason Turner.

p< 0.05 – Reject Null Hypothesis

p> 0.05 – Fail to Reject (Accept) Null

No, I didn’t have to go then

0.05 – value for Alpha (α)with fewest Type I and Type II Errors

Page 19: Introduction to Hypothesis Testing MARE 250 Dr. Jason Turner.

Testing…Testing…One…TwoImportant terms:

Test statistic – answer unique to each statistical test; (t-test – t, ANOVA – F, correlation – r, regression – R2)

Alpha (α) – critical value; represents the line between “yes” and “no”; is 0.05

P-value – universal translator between test statistic and alpha

Page 20: Introduction to Hypothesis Testing MARE 250 Dr. Jason Turner.

Testing…Testing…One…TwoThree steps:

1) You run a test (based upon your hypothesis) and calculate a Test statistic – T = 2.05

2) You then calculate a p value based upon your test statistic and sample size – p = 0.0001

3) Compare p value with alpha (α) (0.05)

Page 21: Introduction to Hypothesis Testing MARE 250 Dr. Jason Turner.

Testing…Testing…One…TwoResearch Question – Is there a difference in urchin densities across habitat types?

Null hypothesis – The mean number of urchins in the Deep region are equal to the mean number of urchins in the Shallow region

H0: μurchins deep = μurchins shallow

Alternative hypothesis - The mean number of urchins in the Deep region are not equal to the mean number of urchins in the Shallow region

Ha: μurchins deep ≠ μurchins shallow

Page 22: Introduction to Hypothesis Testing MARE 250 Dr. Jason Turner.

Testing…Testing…One…TwoMeans test is run

Output: T = 2.15 df = 59 p = 0.0001

Do we accept or reject the null hypothesis?

Page 23: Introduction to Hypothesis Testing MARE 250 Dr. Jason Turner.

Testing…Testing…One…Twop< 0.05 – Reject Null Hypothesis

Output: T = 2.15 df = 59 p = 0.0001

Since P<0.05 – we reject the null thatH0: μurchins deep = μurchins shallow

and accept the alternative that Ha: μurchins deep ≠ μurchins shallow

Page 24: Introduction to Hypothesis Testing MARE 250 Dr. Jason Turner.

Testing…Testing…One…TwoTherefore we reject the Null hypothesis and accept the Alternative hypothesis that:

The mean number of urchins in the Deep region are Significantly Different than the mean number of urchins in the Shallow region