SlideShare a Scribd company logo
1 of 93
Download to read offline
Welcome back!
Z-scores, the normal curve, the normal table
T-scores and the t-table
T-tests
T-tests in SPSS
Refresher
Definition of p-value:
The probability of getting evidence as strong as
you did assuming that the null hypothesis is true.
A smaller p-value means that it’s less likely you would get a
sample like this if the null hypothesis were true.
A smaller p-value means stronger evidence against that null
hypothesis.
Definition of alpha, the level of significance:
The highest acceptable p-value that we will use
to reject the null hypothesis.
The default alpha is 0.05.
A smaller alpha means less of a chance of falsely rejecting the
null. (Also called a Type I error)
A smaller alpha means we want to be more certain about
something before rejecting the null.
If the p-value is smaller than the alpha, we reject the null
hypothesis. (Enough evidence to reject)
If the p-value is larger than the null, we fail to reject the null
hypothesis. (Not yet enough evidence to reject)
Remember this curve? This is the normal curve.
μ, pronounced ‘mu’ is the mean for normals
σ, pronounced ‘sigma’ is the standard deviation for normal
μ + 2σ refers to the point two standard devs above the mean
If data follows the normal curve,
about 2/3 (68%) of the data is within 1 standard deviation,
95% of the data is within 2 standard deviations.
2/3 and 95% are proportions, or ratios between a part of a
group and that group as a whole.
Proportions are useful because they also imply probability.
If 2/3 of the data is within 1sd, then if I pick a point at random
from that distribution…
… there is a 2/3 chance that it will be within 1 standard
deviation.
Example: Reading scores
Grade 5s reading scores are normally distributed with mean
120 and standard deviation 25.
Pick a grade 5 student at random…
You have a 95% chance of getting one with a reading score
between 70 and 170.
Example: Reading scores 2
The normal distribution is symmetric, it’s the same on both
sides of the mean/median.
So the chance of picking a grade 5 with reading score 120 or
more: 0.5
Rather than describe things in terms of 'standard deviations
above/below the mean', we shorten this to z-scores.
Standardizing is useful when you have a large collection of
similar things.
There's also the standard error, which describes the
uncertainty about some measure, such as a sample mean.
The standard error is a measure of the typical amount that that
a sample mean will be off from the true mean.
We get the standard error from the standard deviation of the
data…
…divided by the square root of the sample size.
- The more variable the distribution is, the more variable
anything based on it, like the mean.
- Standard error increases with standard deviation.
- The more we sample from a distribution, the more we know
about its mean.
- Standard error decreases as sample size n increases.
Like standard deviation, the calculation of standard error
isn’t as important as getting a sense of how it behaves.
- Bigger when standard deviation is bigger.
- Smaller when sample size is bigger.
Tophat: In order to make a standard error two
times smaller (1/2 as large), what change can
YOU make?
a) Use 1/2 as large a sample.
b) Use 2 times as large a sample.
c) Use 4 times as large a sample.
d) Use 1/2 as large a standard deviation.
Tophat: In order to make a standard error two
times smaller (1/5 as large), how many times
as large does the sample need to be?
The z-score can be used to describe how many standard
ERRORS above or below a population mean that a sample
mean is. (recall sample mean vs. Population mean)
In practice: SPSS and the Milk dataset.
The milk dataset contains a collection of calcium levels of
inspected bottles.
Today we look at a sample of ‘good’ milk where the calcium
level from bottles follows a normal with mean μ = 20, and
standard deviation 5.
From
Analyse  Descriptive Statistics  Frequencies.
…move the variable “Calcium of good sample…” to the right,
and click Statistics.
Select the Mean, Std. Deviation, and S.E. mean, which
stands for Standard Error of mean.
Click continue, then click OK.
The first sample is only of n=4 bottles, so the standard error is
1/ , or ½of the standard deviation.
5.59 / 2 = 2.79
Because samples vary, the sample standard deviation, called
s, won’t be exactly the same as the population standard
deviation, σ = 5.
Because the standard error of the mean, , is 2.79, it’s not
surprizing that the sample mean is off from the true mean
μ = 20, by 20 – 18.39 = 1.61.
Even when μ = 20, we’d expect to see a sample mean of
18.39 or lower…
Z = (18.39 – 20) / (5/ ) = -0.64  TABLE  25.98%
25.98% of the time.
(We use σ = 5 because we were given it in the question)
With a larger sample, we would expect a better estimate.
(This is from the 3rd
sample of 25 bottles)
The standard error is smaller (1/5 as much as the std. dev),
And the sample mean is closer to 20.
…and so on. (from the sample of 100 bottles)
The sample mean has gotten closer to 20, the sample standard
deviation has gotten closer to 5, and the standard error has
shrank to 1/10 of the standard deviation.
(Tophat)
Against a null hypothesis of mu = 20, what is the Z-score?
… z = -1.01.
So there is a 13.38% chance of getting a sample mean of 20.51
or more when the sample size is 100.
When n=4, the sample mean was off by 1.61, and we found a
25.98% chance of getting a sample mean of that or lower.
When n=100, the sample mean off by 0.50 (three times
closer!), and we found a 15.57% of getting mean of that or
higher.
Now, get ready for....
…t-scores.
T-scores are a lot like z-scores, they’re calculated the same way
for sample means.
vs
There is one big difference:
Z-scores, based on the normal distribution, use the
population standard deviation.
T-scores, based on the t-distribution, use the sample
standard deviation, s.
We use s when we don’t know what the population (true)
standard deviation is.
Like the sample mean, which is used when we don’t know the
population mean, the sample standard deviation is used in
place of the population standard deviation when we don’t
know it.
Realistically, μ and σ are parameters, so we never
actually know what they are, so the t-distribution and t-score
are more complicated but more realistic tools than the normal
distribution and z-score.
The t-distribution looks like this…
… it’s wider than the normal distribution
The difference gets smaller as we get a larger sample.
This is because we get less uncertain about everything,
including the standard deviation as we get a larger sample.
If we had no uncertainty about the standard deviation, s would
be the same as sigma, and the t-distribution becomes normal.
In fact, the normal and the t-distribution are exactly the same
for infinitely large samples.
Let’s go back to the milk example.
This is a new sample of milk with population mean 20,
But say we’ve no idea what the true standard deviation is.
We can use the sample standard deviation, s = 5.411, instead.
Now... how likely is it to find a sample with LESS than 18.79
calcium concentration?
First, find the t-score.
(Work on your own / tophat)
T= -1.11 Then, use the t-table:
1-sided p=0.25 p=0.10 p=0.05 p=0.025 p=0.010
df
1 1.000 3.078 6.314 12.706 31.821
2 0.816 1.886 2.920 4.303 6.965
3 0.765 1.638 2.353 3.182 4.541
4 0.741 1.533 2.132 2.776 3.747
5 0.727 1.476 2.015 2.571 3.365
… … … … … …
df stands for ‘Degrees of Freedom’. For the t-distribution, this is
n-1. (Sample size minus one).
*** For other analyses, df is found differently, to be covered
later.
The sample size n=25, so df = 25 – 1 = 24
Go down the table to df=24, and to the right until you get a
value more than the t-score.
1-sided p=0.25 p=0.10 p=0.05 p=0.025 p=0.010
df
… … … ... … …
22 0.816 1.886 2.920 4.303 6.965
23 0.765 1.638 2.353 3.182 4.541
24 0.741 1.533 2.132 2.776 3.747
25 0.727 1.476 2.015 2.571 3.365
… … … … … …
The one sided p values refer to ‘area beyond’ on one side
of the curve.
We can’t get the exact area beyond like we can with a t-score
from this table, but we can get a range.
1-sided p 0.25 0.10
Df
24 0.741 1.533
1-sided p 0.25 0.10
Df
24 0.741 1.533
If 25% of the area of the t24 distribution is higher than 0.741.
And 10% of the area is higher than 1.533.
Then 1.11, which is between 0.741 and 1.533, has an area
beyond somewhere between 10% and 25%.
Without a computer this is the best we can do.
25% of the area is beyond t= -0.741.
There’s a 25% chance of getting a sample mean farther than
0.741 s (sample standard deviations) below the true mean.
There’s only a 10% chance of getting a sample mean further
than 1.533 s below the true mean.
There is between a 10 and 25% chance of getting a sample
mean further than 1.11 s below the mean.
(By computer the chance is 13.90%)
This is starting to sound like a hypothesis test.
With a t-score? Let's call that a....
…t-test.
Say we gathered samples from Lake Ontario.
From a sample of 10, the (sample) mean was 23 and the
(sample) standard deviation was 2.5.
If the lake has too much cadmium, we’ll have to take action, so
we want to be sure enough that it’s over the limit so that
there’s only a 0.05 chance of claiming it’s over when it’s not
(i.e. when the null is true)
“The only lake you can develop your film in” – Ron James
First, get the t-score
How many standard errors above 20 are we?
Get the degrees of freedom, df = n – 1 = 10 – 1= 9.
“ > “, is one sided. (as opposed to “ ”, which is two sided)
For the t-table at df=9 (One sided)
Level of Significance for One-Tailed Test ( )
df .10 .05 .025 .01 .005
… … … … … …
9 1.383 1.833 2.262 2.821 3.250
We want to compare our t-score 3.79 to one of these values,
but which one?
We have the magic phrase:
“only a 0.05 chance of claiming it’s over when it’s not”
Which means a level of significance, = .05
Level of Significance for One-Tailed Test ( )
df .10 .05 .025 .01 .005
… … … … … …
9 1.383 1.833 2.262 2.821 3.250
For 9 degrees of freedom, there is a .05 chance of getting 1.833
or more standard errors above the mean.
There is a less than .05 chance of getting at least 3.75 standard
errors above the mean. (We don’t care how much less)
Since getting a t-score of 3.75 is so unlikely, either…
Situation 1:
…the (true) mean concentration of the lake is 20 and we
happened to get a really high concentration sample by dumb
luck, or by chance.
Situation 2:
… the (true) mean concentration is, in fact, higher than 20.
The chance of situation 1 happening (high samples by dumb
luck) is less than .05. Since we set the level of significance
is .05, we’re willing to take that chance and...
… reject the null hypothesis.
The evidence against the null hypothesis is too strong not to
reject it,
we’re getting samples with concentrations over 20 by a wide
enough margin that it’s not reasonable to say the
concentration is within safe limits.
It’s very unlikely this sample that high by a glitch.
That chance of glitch is called the p-value.
We’ve concluded that the p-value is less than
Level of Significance for One-Tailed Test ( )
df .10 .05 .025 .01 .005
… … … … … …
9 1.383 1.833 2.262 2.821 3.250
t-score = 3.75
In fact, the p-value is less than .005, given that t > 3.250.
That’s very strong evidence against the null hypothesis indeed.
If the sample mean was fewer standard errors above
20…
The p-value could be bigger than = 0.05.
Then there wouldn’t be enough evidence to reject
In that case, we fail to reject .
We can’t say that the true mean is exactly 20, because it’s
probably off one way or another. So we don’t accept the null,
we merely fail to reject it.
Even when rejecting , we don’t accept , because
wasn’t the hypothesis being tested.
We statisticians are very sceptical people, never accept, always
reject or fail to reject.
Try to grasp the big concepts. They will take care of the little
things.
SPSS Example: Milk dataset.
In the milk data set, good milk had a calcium level of 20 mg/L.
Bad milk, for our cases, will have something other than 20.
Step 1: Load the milk dataset.
First we’re going to try goodcalc4, which is a sample of 25
bottles.
Our null hypothesis is that the milk is good (calcium is 20mg/L)
The alternative is that the milk has a different calcium value.
We’re comparing the mean of one sample to a specific value
(20), so we’ll go to Analyze  Compare Means  One-Sample
T Test…
Choose “ good sample, n=25, 3rd
. Move this variable to the
right by dragging or using the move arrow.
Then, change the test value to 20. (The hypothesized mean)
Click OK
You’ll get two tables.
The first is a data summary like what we’ve seen before.
The sample size is 25
The sample mean is 18.79
The sample standard deviation is 5.41115
The standard error of the mean is 1.082
(t-score = -1.12 if we were doing this by hand.)
The second table is the result of the t-test
Sig. (2-tailed) is the p-value for a two sided test.
We’re doing a two-sided test (not equal to 20), so this works.
p-value = .275 > .050 (default level of significance)
So we fail to reject the null.
Let’s try some bad milk, as found in lowclac2, and this time
let’s say we don’t care if the milk has too much calcium.
Another possibility is to include the upper area in the null
hypothesis. The analysis is exactly the same. (Both ways
acceptable)
(SPSS steps are the same, but with “ bad sample, n=25)
SPSS gives us the two-sided significance, but we only want one
side. By symmetry, we use half of two-sided p-value to get the
one-sided value.
p-value = .016 / 2 = .008 < .05.
We reject the null hypothesis. The milk is bad.
Two-tailed means two-sided. The tails are terms for the ends of
a distribution.
Having two tails isn’t normal.
Confidence intervals
Say we took a sample of reading speeds of students, and our
sample has a mean of 142 words per minute.
It would be dishonest to say that the population mean reading
speed that uses seatbelts is µ = 142.
But that’s our best guess from our sample, so it would be even
more dishonest to say it’s any other value either.
Instead of a single value, it would be a lot more honest to give
an interval that captured most of that uncertainty of the value
and say
“We’re 95% confident that the true parameter (mean,
proportion, whatever) is in this interval.”
The interval we gave would be the 95% confidence interval.
(90%, 99% or other values are possible, but 95% is default, just
like 5% significance.)
Subtle note: This doesn’t mean there’s 95% chance that the
true proportion µ is in the interval (.899 to .945). µ is a fixed
value, it’s either in there or it isn’t.
We’ve set an interval that has a 95% chance to contain the
parameter.
Each blue vertical line is a confidence interval. The red dotted
line horizontally across them represents the parameter value.
Most blue lines cross the red line (include the parameter), but
not all of them.
Confidence interval: Milk example. Find the 95% confidence
interval of the calcium level in the good milk.
F
From SPSS, we know the sample mean is 18.79
and that the standard error of the mean is 1.082
The milk example uses a t* critical, because we’re using the t-
distribution.
In t-table: One-tailed, .025 significance, df=24, the critical value
is: 2.064. (.050 sig. in two-tailed gives the same value)
We’re 95% confidence that the true calcium level is between...
18.79 – (2.064)(1.082) = 18.79 – 2.23 = 16.56
18.79 + (2.064)(1.082) = 18.79 + 2.23 = 21.02
…is between 16.56 and 21.02.
Since the hypothesized value of 20 is within the confidence
interval, 20 is a plausible value for the parameter.
Just as before, we fail to reject the null hypothesis.
We can use the confidence intervals to do two-sided
hypothesis tests as well.
By-hand confidence interval rule:
If the confidence interval contains the value
given in the null hypothesis, we fail to reject.
Otherwise, reject.
16.56 to 21.02 contains 20, so we fail to reject
In SPSS, doing a one-sample t-test will automatically give you a
confidence interval as well (defaults to 95%).
The values given in SPSS are in relation to 20.
-3.44 means 20 – 3.44 = 16.56
1.02 means 20 + 1.02 = 21.02
SPSS does this because then the reject/fail to reject rule is
simplified a bit:
If the confidence interval includes zero, we fail
to reject. Otherwise, reject.
(-3.44 to 1.02 contains zero, so we fail to reject)
Final point:
The confidence interval only works for two-sided tests. Why?
The interval cuts off at both ends. It has a lower limit and an
upper limit.
That means if the sample value is too far above or too far
below the null hypothesis value, it will be rejected. By
definition that’s a two-sided test.

More Related Content

Similar to Lecture_Wk08.pdf

- Aow-Aowf--,d--Tto o4prnbAuSDUJ_ pya.docx
- Aow-Aowf--,d--Tto o4prnbAuSDUJ_ pya.docx- Aow-Aowf--,d--Tto o4prnbAuSDUJ_ pya.docx
- Aow-Aowf--,d--Tto o4prnbAuSDUJ_ pya.docxmercysuttle
 
Statistice Chapter 02[1]
Statistice  Chapter 02[1]Statistice  Chapter 02[1]
Statistice Chapter 02[1]plisasm
 
WEEK 6 – HOMEWORK 6 LANE CHAPTERS, 11, 12, AND 13; ILLOWSKY CHAP.docx
WEEK 6 – HOMEWORK 6  LANE CHAPTERS, 11, 12, AND 13; ILLOWSKY CHAP.docxWEEK 6 – HOMEWORK 6  LANE CHAPTERS, 11, 12, AND 13; ILLOWSKY CHAP.docx
WEEK 6 – HOMEWORK 6 LANE CHAPTERS, 11, 12, AND 13; ILLOWSKY CHAP.docxcockekeshia
 
Statistics by DURGESH JHARIYA OF jnv,bn,jbp
Statistics by DURGESH JHARIYA OF jnv,bn,jbpStatistics by DURGESH JHARIYA OF jnv,bn,jbp
Statistics by DURGESH JHARIYA OF jnv,bn,jbpDJJNV
 
M.Ed Tcs 2 seminar ppt npc to submit
M.Ed Tcs 2 seminar ppt npc   to submitM.Ed Tcs 2 seminar ppt npc   to submit
M.Ed Tcs 2 seminar ppt npc to submitBINCYKMATHEW
 
Pengenalan Ekonometrika
Pengenalan EkonometrikaPengenalan Ekonometrika
Pengenalan EkonometrikaXYZ Williams
 
What is a Single Sample Z Test?
What is a Single Sample Z Test?What is a Single Sample Z Test?
What is a Single Sample Z Test?Ken Plummer
 
data handling class 8
data handling class 8data handling class 8
data handling class 8HimakshiKava
 
Math class 8 data handling
Math class 8 data handling Math class 8 data handling
Math class 8 data handling HimakshiKava
 
Z-Test and Standard error
Z-Test and Standard errorZ-Test and Standard error
Z-Test and Standard errordharazalavadiya
 
C2 st lecture 10 basic statistics and the z test handout
C2 st lecture 10   basic statistics and the z test handoutC2 st lecture 10   basic statistics and the z test handout
C2 st lecture 10 basic statistics and the z test handoutfatima d
 
Chi Square
Chi SquareChi Square
Chi SquareJolie Yu
 

Similar to Lecture_Wk08.pdf (20)

Applied statistics part 1
Applied statistics part 1Applied statistics part 1
Applied statistics part 1
 
- Aow-Aowf--,d--Tto o4prnbAuSDUJ_ pya.docx
- Aow-Aowf--,d--Tto o4prnbAuSDUJ_ pya.docx- Aow-Aowf--,d--Tto o4prnbAuSDUJ_ pya.docx
- Aow-Aowf--,d--Tto o4prnbAuSDUJ_ pya.docx
 
Frequency.pptx
Frequency.pptxFrequency.pptx
Frequency.pptx
 
Statistice Chapter 02[1]
Statistice  Chapter 02[1]Statistice  Chapter 02[1]
Statistice Chapter 02[1]
 
WEEK 6 – HOMEWORK 6 LANE CHAPTERS, 11, 12, AND 13; ILLOWSKY CHAP.docx
WEEK 6 – HOMEWORK 6  LANE CHAPTERS, 11, 12, AND 13; ILLOWSKY CHAP.docxWEEK 6 – HOMEWORK 6  LANE CHAPTERS, 11, 12, AND 13; ILLOWSKY CHAP.docx
WEEK 6 – HOMEWORK 6 LANE CHAPTERS, 11, 12, AND 13; ILLOWSKY CHAP.docx
 
Statistics by DURGESH JHARIYA OF jnv,bn,jbp
Statistics by DURGESH JHARIYA OF jnv,bn,jbpStatistics by DURGESH JHARIYA OF jnv,bn,jbp
Statistics by DURGESH JHARIYA OF jnv,bn,jbp
 
Biostatistics ii4june
Biostatistics ii4juneBiostatistics ii4june
Biostatistics ii4june
 
M.Ed Tcs 2 seminar ppt npc to submit
M.Ed Tcs 2 seminar ppt npc   to submitM.Ed Tcs 2 seminar ppt npc   to submit
M.Ed Tcs 2 seminar ppt npc to submit
 
A.2 se and sd
A.2 se  and sdA.2 se  and sd
A.2 se and sd
 
Pengenalan Ekonometrika
Pengenalan EkonometrikaPengenalan Ekonometrika
Pengenalan Ekonometrika
 
What is a Single Sample Z Test?
What is a Single Sample Z Test?What is a Single Sample Z Test?
What is a Single Sample Z Test?
 
More Statistics
More StatisticsMore Statistics
More Statistics
 
data handling class 8
data handling class 8data handling class 8
data handling class 8
 
Math class 8 data handling
Math class 8 data handling Math class 8 data handling
Math class 8 data handling
 
Chi Square
Chi SquareChi Square
Chi Square
 
just to download
just to downloadjust to download
just to download
 
Z-Test and Standard error
Z-Test and Standard errorZ-Test and Standard error
Z-Test and Standard error
 
C2 st lecture 10 basic statistics and the z test handout
C2 st lecture 10   basic statistics and the z test handoutC2 st lecture 10   basic statistics and the z test handout
C2 st lecture 10 basic statistics and the z test handout
 
Stats chapter 12
Stats chapter 12Stats chapter 12
Stats chapter 12
 
Chi Square
Chi SquareChi Square
Chi Square
 

Recently uploaded

PSYCHIATRIC History collection FORMAT.pptx
PSYCHIATRIC   History collection FORMAT.pptxPSYCHIATRIC   History collection FORMAT.pptx
PSYCHIATRIC History collection FORMAT.pptxPoojaSen20
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersChitralekhaTherkar
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfUmakantAnnand
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 

Recently uploaded (20)

PSYCHIATRIC History collection FORMAT.pptx
PSYCHIATRIC   History collection FORMAT.pptxPSYCHIATRIC   History collection FORMAT.pptx
PSYCHIATRIC History collection FORMAT.pptx
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of Powders
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.Compdf
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 

Lecture_Wk08.pdf

  • 1. Welcome back! Z-scores, the normal curve, the normal table T-scores and the t-table T-tests T-tests in SPSS
  • 2. Refresher Definition of p-value: The probability of getting evidence as strong as you did assuming that the null hypothesis is true. A smaller p-value means that it’s less likely you would get a sample like this if the null hypothesis were true.
  • 3. A smaller p-value means stronger evidence against that null hypothesis. Definition of alpha, the level of significance: The highest acceptable p-value that we will use to reject the null hypothesis. The default alpha is 0.05.
  • 4. A smaller alpha means less of a chance of falsely rejecting the null. (Also called a Type I error) A smaller alpha means we want to be more certain about something before rejecting the null. If the p-value is smaller than the alpha, we reject the null hypothesis. (Enough evidence to reject) If the p-value is larger than the null, we fail to reject the null hypothesis. (Not yet enough evidence to reject)
  • 5. Remember this curve? This is the normal curve. μ, pronounced ‘mu’ is the mean for normals σ, pronounced ‘sigma’ is the standard deviation for normal μ + 2σ refers to the point two standard devs above the mean
  • 6. If data follows the normal curve, about 2/3 (68%) of the data is within 1 standard deviation, 95% of the data is within 2 standard deviations.
  • 7. 2/3 and 95% are proportions, or ratios between a part of a group and that group as a whole. Proportions are useful because they also imply probability. If 2/3 of the data is within 1sd, then if I pick a point at random from that distribution… … there is a 2/3 chance that it will be within 1 standard deviation.
  • 8. Example: Reading scores Grade 5s reading scores are normally distributed with mean 120 and standard deviation 25. Pick a grade 5 student at random… You have a 95% chance of getting one with a reading score between 70 and 170.
  • 9. Example: Reading scores 2 The normal distribution is symmetric, it’s the same on both sides of the mean/median. So the chance of picking a grade 5 with reading score 120 or more: 0.5
  • 10. Rather than describe things in terms of 'standard deviations above/below the mean', we shorten this to z-scores.
  • 11.
  • 12. Standardizing is useful when you have a large collection of similar things.
  • 13. There's also the standard error, which describes the uncertainty about some measure, such as a sample mean.
  • 14. The standard error is a measure of the typical amount that that a sample mean will be off from the true mean. We get the standard error from the standard deviation of the data…
  • 15. …divided by the square root of the sample size. - The more variable the distribution is, the more variable anything based on it, like the mean. - Standard error increases with standard deviation.
  • 16. - The more we sample from a distribution, the more we know about its mean. - Standard error decreases as sample size n increases. Like standard deviation, the calculation of standard error isn’t as important as getting a sense of how it behaves. - Bigger when standard deviation is bigger. - Smaller when sample size is bigger.
  • 17.
  • 18. Tophat: In order to make a standard error two times smaller (1/2 as large), what change can YOU make? a) Use 1/2 as large a sample. b) Use 2 times as large a sample. c) Use 4 times as large a sample. d) Use 1/2 as large a standard deviation.
  • 19. Tophat: In order to make a standard error two times smaller (1/5 as large), how many times as large does the sample need to be?
  • 20. The z-score can be used to describe how many standard ERRORS above or below a population mean that a sample mean is. (recall sample mean vs. Population mean)
  • 21.
  • 22. In practice: SPSS and the Milk dataset. The milk dataset contains a collection of calcium levels of inspected bottles. Today we look at a sample of ‘good’ milk where the calcium level from bottles follows a normal with mean μ = 20, and standard deviation 5. From Analyse  Descriptive Statistics  Frequencies.
  • 23. …move the variable “Calcium of good sample…” to the right, and click Statistics. Select the Mean, Std. Deviation, and S.E. mean, which stands for Standard Error of mean.
  • 24. Click continue, then click OK.
  • 25. The first sample is only of n=4 bottles, so the standard error is 1/ , or ½of the standard deviation. 5.59 / 2 = 2.79
  • 26.
  • 27. Because samples vary, the sample standard deviation, called s, won’t be exactly the same as the population standard deviation, σ = 5.
  • 28. Because the standard error of the mean, , is 2.79, it’s not surprizing that the sample mean is off from the true mean μ = 20, by 20 – 18.39 = 1.61.
  • 29. Even when μ = 20, we’d expect to see a sample mean of 18.39 or lower… Z = (18.39 – 20) / (5/ ) = -0.64  TABLE  25.98% 25.98% of the time. (We use σ = 5 because we were given it in the question) With a larger sample, we would expect a better estimate. (This is from the 3rd sample of 25 bottles)
  • 30. The standard error is smaller (1/5 as much as the std. dev), And the sample mean is closer to 20. …and so on. (from the sample of 100 bottles)
  • 31. The sample mean has gotten closer to 20, the sample standard deviation has gotten closer to 5, and the standard error has shrank to 1/10 of the standard deviation.
  • 32. (Tophat) Against a null hypothesis of mu = 20, what is the Z-score?
  • 33. … z = -1.01. So there is a 13.38% chance of getting a sample mean of 20.51 or more when the sample size is 100. When n=4, the sample mean was off by 1.61, and we found a 25.98% chance of getting a sample mean of that or lower. When n=100, the sample mean off by 0.50 (three times closer!), and we found a 15.57% of getting mean of that or higher.
  • 34. Now, get ready for....
  • 35. …t-scores. T-scores are a lot like z-scores, they’re calculated the same way for sample means. vs There is one big difference:
  • 36. Z-scores, based on the normal distribution, use the population standard deviation. T-scores, based on the t-distribution, use the sample standard deviation, s.
  • 37. We use s when we don’t know what the population (true) standard deviation is.
  • 38. Like the sample mean, which is used when we don’t know the population mean, the sample standard deviation is used in place of the population standard deviation when we don’t know it. Realistically, μ and σ are parameters, so we never actually know what they are, so the t-distribution and t-score are more complicated but more realistic tools than the normal distribution and z-score. The t-distribution looks like this…
  • 39. … it’s wider than the normal distribution The difference gets smaller as we get a larger sample.
  • 40. This is because we get less uncertain about everything, including the standard deviation as we get a larger sample.
  • 41. If we had no uncertainty about the standard deviation, s would be the same as sigma, and the t-distribution becomes normal.
  • 42. In fact, the normal and the t-distribution are exactly the same for infinitely large samples.
  • 43. Let’s go back to the milk example.
  • 44. This is a new sample of milk with population mean 20, But say we’ve no idea what the true standard deviation is. We can use the sample standard deviation, s = 5.411, instead. Now... how likely is it to find a sample with LESS than 18.79 calcium concentration? First, find the t-score.
  • 45. (Work on your own / tophat)
  • 46. T= -1.11 Then, use the t-table: 1-sided p=0.25 p=0.10 p=0.05 p=0.025 p=0.010 df 1 1.000 3.078 6.314 12.706 31.821 2 0.816 1.886 2.920 4.303 6.965 3 0.765 1.638 2.353 3.182 4.541 4 0.741 1.533 2.132 2.776 3.747 5 0.727 1.476 2.015 2.571 3.365 … … … … … … df stands for ‘Degrees of Freedom’. For the t-distribution, this is n-1. (Sample size minus one). *** For other analyses, df is found differently, to be covered later.
  • 47. The sample size n=25, so df = 25 – 1 = 24 Go down the table to df=24, and to the right until you get a value more than the t-score. 1-sided p=0.25 p=0.10 p=0.05 p=0.025 p=0.010 df … … … ... … … 22 0.816 1.886 2.920 4.303 6.965 23 0.765 1.638 2.353 3.182 4.541 24 0.741 1.533 2.132 2.776 3.747 25 0.727 1.476 2.015 2.571 3.365 … … … … … …
  • 48. The one sided p values refer to ‘area beyond’ on one side of the curve. We can’t get the exact area beyond like we can with a t-score from this table, but we can get a range. 1-sided p 0.25 0.10 Df 24 0.741 1.533
  • 49. 1-sided p 0.25 0.10 Df 24 0.741 1.533 If 25% of the area of the t24 distribution is higher than 0.741. And 10% of the area is higher than 1.533. Then 1.11, which is between 0.741 and 1.533, has an area beyond somewhere between 10% and 25%. Without a computer this is the best we can do.
  • 50. 25% of the area is beyond t= -0.741. There’s a 25% chance of getting a sample mean farther than 0.741 s (sample standard deviations) below the true mean.
  • 51. There’s only a 10% chance of getting a sample mean further than 1.533 s below the true mean.
  • 52. There is between a 10 and 25% chance of getting a sample mean further than 1.11 s below the mean. (By computer the chance is 13.90%)
  • 53. This is starting to sound like a hypothesis test. With a t-score? Let's call that a.... …t-test.
  • 54. Say we gathered samples from Lake Ontario. From a sample of 10, the (sample) mean was 23 and the (sample) standard deviation was 2.5. If the lake has too much cadmium, we’ll have to take action, so we want to be sure enough that it’s over the limit so that there’s only a 0.05 chance of claiming it’s over when it’s not (i.e. when the null is true) “The only lake you can develop your film in” – Ron James
  • 55. First, get the t-score How many standard errors above 20 are we?
  • 56. Get the degrees of freedom, df = n – 1 = 10 – 1= 9. “ > “, is one sided. (as opposed to “ ”, which is two sided) For the t-table at df=9 (One sided) Level of Significance for One-Tailed Test ( ) df .10 .05 .025 .01 .005 … … … … … … 9 1.383 1.833 2.262 2.821 3.250
  • 57. We want to compare our t-score 3.79 to one of these values, but which one? We have the magic phrase: “only a 0.05 chance of claiming it’s over when it’s not” Which means a level of significance, = .05 Level of Significance for One-Tailed Test ( ) df .10 .05 .025 .01 .005 … … … … … … 9 1.383 1.833 2.262 2.821 3.250
  • 58. For 9 degrees of freedom, there is a .05 chance of getting 1.833 or more standard errors above the mean.
  • 59. There is a less than .05 chance of getting at least 3.75 standard errors above the mean. (We don’t care how much less)
  • 60. Since getting a t-score of 3.75 is so unlikely, either… Situation 1: …the (true) mean concentration of the lake is 20 and we happened to get a really high concentration sample by dumb luck, or by chance. Situation 2: … the (true) mean concentration is, in fact, higher than 20.
  • 61. The chance of situation 1 happening (high samples by dumb luck) is less than .05. Since we set the level of significance is .05, we’re willing to take that chance and... … reject the null hypothesis.
  • 62. The evidence against the null hypothesis is too strong not to reject it, we’re getting samples with concentrations over 20 by a wide enough margin that it’s not reasonable to say the concentration is within safe limits. It’s very unlikely this sample that high by a glitch. That chance of glitch is called the p-value. We’ve concluded that the p-value is less than
  • 63. Level of Significance for One-Tailed Test ( ) df .10 .05 .025 .01 .005 … … … … … … 9 1.383 1.833 2.262 2.821 3.250 t-score = 3.75 In fact, the p-value is less than .005, given that t > 3.250. That’s very strong evidence against the null hypothesis indeed.
  • 64. If the sample mean was fewer standard errors above 20…
  • 65. The p-value could be bigger than = 0.05. Then there wouldn’t be enough evidence to reject
  • 66. In that case, we fail to reject . We can’t say that the true mean is exactly 20, because it’s probably off one way or another. So we don’t accept the null, we merely fail to reject it. Even when rejecting , we don’t accept , because wasn’t the hypothesis being tested. We statisticians are very sceptical people, never accept, always reject or fail to reject.
  • 67. Try to grasp the big concepts. They will take care of the little things.
  • 68.
  • 69. SPSS Example: Milk dataset. In the milk data set, good milk had a calcium level of 20 mg/L. Bad milk, for our cases, will have something other than 20. Step 1: Load the milk dataset. First we’re going to try goodcalc4, which is a sample of 25 bottles.
  • 70. Our null hypothesis is that the milk is good (calcium is 20mg/L) The alternative is that the milk has a different calcium value.
  • 71. We’re comparing the mean of one sample to a specific value (20), so we’ll go to Analyze  Compare Means  One-Sample T Test…
  • 72. Choose “ good sample, n=25, 3rd . Move this variable to the right by dragging or using the move arrow. Then, change the test value to 20. (The hypothesized mean) Click OK
  • 73. You’ll get two tables. The first is a data summary like what we’ve seen before. The sample size is 25 The sample mean is 18.79 The sample standard deviation is 5.41115 The standard error of the mean is 1.082 (t-score = -1.12 if we were doing this by hand.)
  • 74. The second table is the result of the t-test Sig. (2-tailed) is the p-value for a two sided test. We’re doing a two-sided test (not equal to 20), so this works.
  • 75. p-value = .275 > .050 (default level of significance) So we fail to reject the null. Let’s try some bad milk, as found in lowclac2, and this time let’s say we don’t care if the milk has too much calcium.
  • 76. Another possibility is to include the upper area in the null hypothesis. The analysis is exactly the same. (Both ways acceptable)
  • 77. (SPSS steps are the same, but with “ bad sample, n=25)
  • 78. SPSS gives us the two-sided significance, but we only want one side. By symmetry, we use half of two-sided p-value to get the one-sided value. p-value = .016 / 2 = .008 < .05. We reject the null hypothesis. The milk is bad.
  • 79. Two-tailed means two-sided. The tails are terms for the ends of a distribution. Having two tails isn’t normal.
  • 80.
  • 81.
  • 82. Confidence intervals Say we took a sample of reading speeds of students, and our sample has a mean of 142 words per minute. It would be dishonest to say that the population mean reading speed that uses seatbelts is µ = 142. But that’s our best guess from our sample, so it would be even more dishonest to say it’s any other value either.
  • 83. Instead of a single value, it would be a lot more honest to give an interval that captured most of that uncertainty of the value and say “We’re 95% confident that the true parameter (mean, proportion, whatever) is in this interval.” The interval we gave would be the 95% confidence interval. (90%, 99% or other values are possible, but 95% is default, just like 5% significance.)
  • 84. Subtle note: This doesn’t mean there’s 95% chance that the true proportion µ is in the interval (.899 to .945). µ is a fixed value, it’s either in there or it isn’t. We’ve set an interval that has a 95% chance to contain the parameter.
  • 85. Each blue vertical line is a confidence interval. The red dotted line horizontally across them represents the parameter value. Most blue lines cross the red line (include the parameter), but not all of them.
  • 86. Confidence interval: Milk example. Find the 95% confidence interval of the calcium level in the good milk. F From SPSS, we know the sample mean is 18.79 and that the standard error of the mean is 1.082
  • 87. The milk example uses a t* critical, because we’re using the t- distribution.
  • 88. In t-table: One-tailed, .025 significance, df=24, the critical value is: 2.064. (.050 sig. in two-tailed gives the same value) We’re 95% confidence that the true calcium level is between... 18.79 – (2.064)(1.082) = 18.79 – 2.23 = 16.56 18.79 + (2.064)(1.082) = 18.79 + 2.23 = 21.02 …is between 16.56 and 21.02.
  • 89. Since the hypothesized value of 20 is within the confidence interval, 20 is a plausible value for the parameter. Just as before, we fail to reject the null hypothesis. We can use the confidence intervals to do two-sided hypothesis tests as well. By-hand confidence interval rule:
  • 90. If the confidence interval contains the value given in the null hypothesis, we fail to reject. Otherwise, reject. 16.56 to 21.02 contains 20, so we fail to reject In SPSS, doing a one-sample t-test will automatically give you a confidence interval as well (defaults to 95%).
  • 91. The values given in SPSS are in relation to 20. -3.44 means 20 – 3.44 = 16.56 1.02 means 20 + 1.02 = 21.02 SPSS does this because then the reject/fail to reject rule is simplified a bit:
  • 92. If the confidence interval includes zero, we fail to reject. Otherwise, reject. (-3.44 to 1.02 contains zero, so we fail to reject)
  • 93. Final point: The confidence interval only works for two-sided tests. Why? The interval cuts off at both ends. It has a lower limit and an upper limit. That means if the sample value is too far above or too far below the null hypothesis value, it will be rejected. By definition that’s a two-sided test.