Ds Inferential Statistics
Ds Inferential Statistics
STATISTICS
(IT258M)
The Crimean War
The Crimean War (1853-1856) was a bloody battle between the Russians and the
British Alliance (Great Brittan, France, Ottoman Empire, Kingdom of Sardinia) that saw
great casualties on both sides.
Alfred, Lord Tennyson, “The Charge of the Light Brigade.” Written to memorialize events in the
Balaclava, Oct. 25, 1854.
Florence Nightingale “Lady with the Lamp”
Florence Nightingale observed the horrific
conditions of the wounded and was instrumental
in convincing the British government to make
sweeping changes in the sanitary conditions of the
make-shift “hospitals.” Her work to make
conditions more sanitary caused the mortality rate
to decline from 44 percent to 2 percent within 6
months.
Data
Knowledge Information
New Knowledge/Decisions
The Scientific Method
• Scientific Method
• The way researchers go about using knowledge and evidence to reach
objective conclusions about the real world.
Note: Diamond-shaped
boxes indicate stages
in the research process
in which a choice of
one or more
techniques must be
made. The dotted line
indicates an alternative
path that skips
exploratory research.
Two basic types of research
• Artifact – Any variable that creates a possible but incorrect explanation of results.
Also referred to as a confounding variable.
• The presence of an artifact indicates issues of internal validity; that is, the study
has failed to investigate its hypothesis
What affects Internal validity?
• History – various events that occur during a study may affect the subject’s
attitudes, opinions, and behavior.
• Maturation – Subjects’ biological and psychological characteristics change during
the course of a study (mainly longitudinal).
• Testing – The act of testing may cause artifacts depending on the environment,
giving similar pre-tests/post-tests, and/or timing.
• Instrumentation – A situation where equipment malfunctions, observers become
tired/casual, and/or interviewers may make mistakes.
• Statistical regression – Subjects who achieve either very high or very low scores
on a test tend to regress to (move toward) the sample or population mean.
What affects internal validity, cont.
• Experimental Mortality – All research studies face the possibility that subjects
will drop out for one reason or another.
• Sample Selection – When groups are not selected randomly or when they are not
homogeneous
• Demand Characteristics – Subjects’ reactions to experimental situations. Subjects
who recognize the purpose of a study may produce only “good” data for
researchers (Hawthorne Effect).
• Experimenter Bias – Researcher becomes swayed by a client’s (or personal)
wishes for a project’s results (Blind vs. Double Blind).
• Evaluation Apprehension – Subjects are afraid of being measured or tested.
• Causal Time Order – An experiment’s results are due not to the stimulus
(independent) variable but rather to the effect of the dependent variable.
What affects internal validity, cont.
• How well the results or a study can be generalized across the population.
• Select a sample that is representative of the group to which the results will be
generalized.
Probability versus Nonprobability Sampling
• Probability Sampling
• A sampling technique in which every member of the population has a known,
nonzero probability of selection.
• Nonprobability Sampling
• A sampling technique in which units of the sample are selected on the basis
of personal judgment or convenience.
• The probability of any particular member of the population being chosen is
unknown.
Variables
• Variable Types:
• Independent – those that are systematically varied by the researcher
• Dependent – those that are observed. Their values are resumed to depend on
the effects of the independent variables
• Variable Forms:
• Discrete – only includes a finite set of values (yes/no; republican/democrat;
satisfied….not satisfied, etc.)
• Continuous – takes on any value on a continuous scale (height, weight,
length, time, etc.)
Scales: Concept
• A generalized idea about a class of objects, attributes, occurrences, or
processes
Example: Satisfaction
Scales: Operational Definition
• Specifies what the researcher must do to measure the concept under
investigation
• Indicates a difference
Ordinal Scale
• Indicates a difference
• Indicates the direction of the distance (e.g. more than or less than)
Interval Scale
• Indicates a difference
• Indicates the direction of the distance (e.g. more than or less than)
• Indicates the amount of the difference (in equal intervals)
Ratio Scale
• Indicates a difference
• Indicates the direction of the distance (e.g. more than or less
than)
• Indicates the amount of the difference (in equal intervals)
• Indicates an absolute zero
Two sets of scores…
Group 1 Group 2
100, 100 91, 85
99, 98 81, 79
88, 77 78, 77
72, 68 73, 75
67, 52 72, 70
43, 42 65, 60
12
10
8
Frequency
0
42 43 52 60 65 67 68 70 72 73 75 77 78 79 81 85 88 91 98 99 100
Scores
Creating a Frequency polygon
Frequency Polygon
14
12
10
8
Frequency
0
42 43 52 60 65 67 68 70 72 73 75 77 78 79 81 85 88 91 98 99 100
Scores
Normal Distribution
68%
95%
95%
99% 99%
The Bell Curve
.01 .01
Significant Significant
Mean=70
Central limit theorem
• In probability theory, the central limit theorem says that, under certain
conditions, the sum of many independent identically-distributed random
variables, when scaled appropriately, converges in distribution to a standard
normal distribution.
Central Tendency
a1 a2 a3 a4 ... an
a
n
Arithmetic Mean Example
98
88
81
74
72
72 741\10 = 74.1
70
69
65
52
741
Normal Distribution
68%
95%
95%
99% 99%
Frequency polygon of test score data
Frequency Polygon
14
12
10
8
Frequency
0
42 43 52 60 65 67 68 70 72 73 75 77 78 79 81 85 88 91 98 99 100
Scores
Skewness
10
8
Frequency
0
42 43 52 60 65 67 68 70 72 73 75 77 78 79 81 85 88 91 98 99 100
Scores
Skewness
• Skewness can occur when the frequency of just one
score is clustered away from the mean.
Frequency Polygon
14
12
10
Frequency
8
6
4
2
0
42 43 52 60 65 67 68 70 72 73 75 77 78 79 81 85 88 91 98 99 100
Scores
Normal Distribution
68%
95%
95%
99% 99%
5
Frequency
1 Median = 56K
0
25 27 29 32 35 38 43 45 48 51 54 56 59 60 62 65 68 71 75 78 85 88 91 95 98 99 100150175
Annual Salary in Thousands of Dollars
Measures of Dispersion or Spread
• Range
• Variance
• Standard deviation
The Range as a Measure of Spread
X i X ) 2
S2
N
Sample Variance
X i X ) 2
s
2
n 1
Variance
X X X-X X –X2
98 - 74.1 = 23.90 = 571.21 Population Variance (N)
88 - 74.1 = 13.90 = 193.21
81 - 74.1 = 6.90 = 47.61 1,434.90 \ 10 = 143.49
74 - 74.1 = -0.10 = 0.01
72 - 74.1 = -2.10 = 4.41
72 - 74.1 = -2.10 = 4.41
70 - 74.1 = -4.10 = 16.81 Sample Variance (n-1)
69 - 74.1 = -5.10 = 26.01
65 - 74.1 = -9.10 = 82.81 1,434.90 \ 9 = 159.43
52 - 74.1 = -22.10 = 488.41
Mean = 74.1 1,434.90
Uses of the variance
s
Xi X 2
n 1
Standard Deviation Example
Population STD
X X X-X X –X2
1,434.90 \ 10 = 143.49
98 - 74.1 = 23.90 = 571.21
88 - 74.1 = 13.90 = 193.21 (SQRT) 143.49 = 11.98
81 - 74.1 = 6.90 = 47.61
74 - 74.1 = -0.10 = 0.01
72 - 74.1 = -2.10 = 4.41
72 - 74.1 = -2.10 = 4.41 Sample STD
70 - 74.1 = -4.10 = 16.81 1,434.90 \ 9 = 159.43
69 - 74.1 = -5.10 = 26.01
65 - 74.1 = -9.10 = 82.81
- 74.1 = (SQRT) 159.43 = 12.63
52 -22.10 = 488.41
Mean = 74.1 1,434.90
• A survey was given to UNA students to find out how many hours per week they
would listen to a student-run radio station. The sample responses were separated
by gender. Determine the mean, range, variance, and standard deviation of each
group.
Group A (Female) Group B (Male)
15 30
25 15
12 21
7 12
3 26
32 20
17 5
16 24
9 18
24 10
Group one (females)
Significant Significant
58 62 66 Mean=70 74 78 82
-3 -2 -1 0 1 2 3
How Variability and Standard Deviation Work…
Class A Class B
Mean
Mean = 75.5 Mean = 75.5
STD = 21.93 STD = 8.42
How Do We Use This Stuff?
• The type of data determines what kind of measures you can use
• Higher order data can be used with higher order statistics
When scores don’t compare
• A student takes the ACT test (11-36) and scores a 22…
• The same student takes the SAT (590-1,600) and scores a 750…
• The same student takes the TOFFEL (0-120) and scores a 92…
• How can we tell if the student did better/worse on one score in
relation to the other scores?
• ANSWER: Standardize or Normalize the scores
• HOW: Z-Scores!
Z-Scores
• In statistics, the standard score is the (signed) number of standard deviations an
observation or datum is above or below the mean.
• A positive standard score represents a datum above the mean, while a negative
standard score represents a datum below the mean.
• It is a dimensionless quantity obtained by subtracting the population mean from
an individual raw score and then dividing the difference by the population
standard deviation. This conversion process is called standardizing or normalizing.
• Standard scores are also called z-values, z-scores, normal scores, and
standardized variables.
Z-score formula
𝑋−𝑋
𝑧=
𝑆
Z-Scores with positive numbers are above the mean while Z-Scores with
negative numbers are below the mean.
Z-scores, cont.
• It is a little awkward in discussing a score or observation to have to say that it is “2
standard deviations above the mean” or “1.5 standard deviations below the
mean.”
• To make it a little easier to pinpoint the location of a score in any distribution, the
z-score was developed.
• The z-score is simply a way of telling how far a score is from the mean in standard
deviation units.
Calculating the z-score
• If the observed value (individual score) = 9; the mean = 6;
and the standard deviation = 2.68:
Z-Scores, cont.
• A z-score may also be used to find the location of a score
that is a normally distributed variable.
• Using an example of a population of IQ test scores where
the individual score = 80; population mean = 100; and the
population standard deviation = 16…
𝑋 −𝜇 80 −100 − 20
𝑧= = = =− 1.25
𝜕 16 16
Comparing z-scores
• Z-scores allow the researcher to make comparisons
between different distributions.
Mathematics Natural Science English
µ = 75 µ = 103 µ = 52
σ=6 σ = 14 σ=4
X = 78 X = 115 X = 57
𝑋 −𝜇 78 −75 3
Mathematics 𝑧= = = =0.5
𝜎 6 6
115 −103 12
Natural Science 𝑧= = =0.86
14 14
57 −52 5
English 𝑧= = =1.25
4 4
Interpretation
• Interpretation
• The process of drawing inferences from the analysis results.
• Inferences drawn from interpretations lead to managerial implications and
decisions.
• From a management perspective, the qualitative meaning of the data and
their managerial implications are an important aspect of the interpretation.
Inferential Statistics Provide Two
Environments:
• Test for Difference – To test whether a significant difference
exists between groups
• Tests for relationship – To test whether a significant
relationship exist between a dependent (Y) and independent
(X) variable/s
• Relationship may also be predictive
Hypothesis Testing Using Basic Statistics
• Significance Level
• A critical probability associated with a statistical hypothesis test that indicates
how likely an inference supporting a difference between an observed value
and some statistical expectation is true.
• The acceptable level of Type I error.
• p-value
• Probability value, or the observed or computed significance level.
• p-values are compared to significance levels to test hypotheses.
Experimental Research: What happens?
An hypothesis (educated guess) and then tested. Possible outcomes:
Something Will
Something Not
Not Happen
Will Happen
It Does Not
It Happens
Happen
Something Will
Something Will
Happen
Happen
It Does Not
It Happens
Happen
Type I and Type II Errors
• Type I Error
• An error caused by rejecting the null hypothesis when it should be accepted
(false positive).
• Has a probability of alpha (α).
• Practically, a Type I error occurs when the researcher concludes that a
relationship or difference exists in the population when in reality it does not
exist.
Type I and Type II Errors (cont’d)
• Type II Error
• An error caused by failing to reject the null hypothesis when the hypothesis
should be rejected (false negative).
• Has a probability of beta (β).
• Practically, a Type II error occurs when a researcher concludes that no
relationship or difference exists when in fact one does exist.
Type I and II Errors and Fire Alarms?
FIRE NO FIRE
H0 is H0 is True
False
1 4
3 6
5 10
5 12
1 13
2 3
4 3
6 8
Pearson R Correlation Coefficient
A measure of how well a linear equation describes the relation between two
variables X and Y measured on the same object
X Y y xy
1 4 -3 -5 15 9 25
3 6 -1 -3 3 1 9
5 10 1 1 1 1 1
5 12 1 3 3 1 9
1 13 2 4 8 4 16
Total 20 45 0 0 30 16 60
Mean 4 9 0 0 6
Calculation of Pearson R
𝑟=
∑ 𝑥𝑦
√∑ 𝑥 ∑ 𝑦
2 2
Alternative Formula
∑ 𝑥∑ 𝑦
∑ 𝑥𝑦 −
𝑁
𝑟=
√ (∑ 𝑥 )
√ (∑ 𝑌 )
2 2
∑𝑥
2
−
𝑁
∑𝑌 2
−
𝑁
How Can R’s Be Used?
Y Y Y
X X X
Y
R’s of 1.00 or -1.00 are perfect correlations
The closer R comes to 1, the more related the X and Y scores are
to each other
Variable 1
Variable 2 Data Type 1 Data Type 2 Totals
Category 1 a b a+b
Category 2 c d c+d
Total a+c b+d a+b+c+d
2
( 𝑎𝑑 −𝑏𝑐 ) ( 𝑎+ 𝑏+𝑐 + 𝑑 )
𝑥 2=
( 𝑎+ 𝑏 ) ( 𝑐+ 𝑑 )( 𝑏 +𝑑 ) ( 𝑎+ 𝑐 )
Chi square Steps
Actual Data
Male Female Total
Like 36 14 50 Row
Column
Total
Total Dislike 30 25 55
Total 66 39 105
Grand
To find the expected frequencies, assume independence of the Total
rows and columns. Multiply the row total to the column total and
divide by grand total
rt * ct 50 * 66
ef OR 31.43
gt 105
Chi square
Expected Frequencies
Male Female Total
Like 31.43 18.58 50.01
Dislike 34.58 20.43 55.01
Total 66.01 39.01 105.02
O E O-E (O-E)2/E
36 31.43 4.57 .67
14 18.58 -4.58 1.13
30 34.58 -4.58 .61
25 20.43 4.57 1.03
rt * ct 21* 30
ef OR 8. 4
gt 75
Chi Square
Expected Frequencies
O E O-E (O-E)2/E
11 8.4 2.6 .805
6 5.6 .4 .029
4 7 3 1.286
12 10.4 1.6 .246
7 6.9 .1 .001
7 8.7 1.7 .332
7 11.2 4.2 1.575
7 7.5 .5 .033
14 9.3 4.7 2.375
Null Hypothesis
x1 x2
H 0 : 1 2 t
S x1 x2
Step 1: Pooled Estimate of the Standard Error
(n1 1) S (n2 1) S
2
1 1 2
S x1 x2 ( 1
)( ) 2
n1 n2 2 n1 n2
(20)(2.1) (13)(2.6)
2 2
1 1
S x1 x2 ( )( )
33 21 14
=0.797
Step 2: Calculate the t-statistic
x1 x2
t
S x1 x2
16.5 12.2 4 .3
t 5.395
0.797 0.797
Step 3: Calculate Degrees of Freedom
• In a test of two means, the degrees of freedom are
calculated: d.f. =n-k
• n = total for both groups 1 and 2 (35)
• k = number of groups
• Therefore, d.f. = 33 (21+14-2)
• Go to the tabled values of the t-distribution on website.
See if the observed statistic of 5.395 surpasses the
table value on the chart given 33 d.f. and a .05
significance level
Step 3: Compare Critical Value to Observed
Value
Observed statistic= 5.39
• Between group variability and within group variability are both components of
the total variability in the combined distributions
• When we compute between and within group variability we partition the total
variability into the two components.
• Therefore: Between variability + Within variability = Total variability
Visual of Between and Within Group Variability
Between Group
𝐻 0 : 𝜇 1=𝜇 2=𝜇 3
ANOVA Assumptions
SS df MF F
𝑆𝑆 𝑇 =∑ 𝑥 T −
2
( ∑ 𝑥𝑇
𝑁𝑇 ) 2
( 33 ) 2
𝑆𝑆 𝑇 =107 −
15
1089
𝑆𝑆 𝑇 =107 − =107 − 72.6=𝟑𝟒 . 𝟒
15
Calculating Sum of Squares Within
++
(
𝑆𝑆 𝑤 = 74 −
324
5 )(
+ 26 −
100
5
+ 7− )(
25
5 )
𝑆𝑆 𝑤 =( 74 − 64.8 ) + ( 26 − 20 ) + (7 − 5 )
𝑆𝑆 𝑊 =9.2+6+ 2=𝟏𝟕 . 𝟐
Calculating Sum of Squares Between
(∑ 𝑥 1 ) 2 ( ∑ 𝑥 2 ) 2 (∑ 𝑥 3 ) 2 (∑ 𝑋 𝑇 ) 2
𝑆𝑆 𝐵 = + + −
𝑛1 𝑛2 𝑛3 𝑁𝑇
( 18 ) 2 ( 10 ) 2 ( 5 ) 2 ( 33 ) 2
𝑆𝑆 𝐵 = + + −
5 5 5 15
If the F statistic is higher than the F probability table, reject the null
hypothesis
You Are Not Done Yet!!!
G1 compared to G2
G1 compared to G3
G2 compared to G3
Running the Tukey Test
√ 𝑀𝑆𝐸
𝑛h
( 𝑦 )=𝑎 +𝑏𝑥
𝑺𝒍𝒐𝒑𝒆 ( 𝒃 )=(𝑁 Σ 𝑋𝑌 − ( Σ 𝑋 ) ( Σ 𝑌 ) )¿/( 𝑁 Σ 𝑋 2− ( Σ 𝑋 ) 2)
Where:
r Y Yˆ
Slope (b) i i i
Actual Values
Intercept (a) x
Simple vs. Multiple Regression
Simple: Y = a + bx
X1
X2