SUI 252 - Week 8 (2022)
SUI 252 - Week 8 (2022)
STATISTICS
income in females, we can summarize our expectation for gender wage gap
in this example as follows:
H : μ > μ , in other words: μ − μ > 0
1 M F M F
And, this overlaps with the gender wage gap hypothesis. BUT IT TAKES
MORE THAN THAT TO TEST A HYPOTHESIS!
In the sample statistics, we clearly see that 32800 > 32000, i.e., x̄ > x̄
M F.
And, this overlaps with the gender wage gap hypothesis. BUT IT TAKES
MORE THAN THAT TO TEST A HYPOTHESIS!
Is μM > μF ? This, is what I want to know, indeed.
HYPOTHESIS- Do you remember what we did when we were assessing whether
city X will be qualified for the subsidized loan program, in the last
TESTING lecture of Week 6?
REQUIRES US TO We assessed whether the opposite of what we observe and expect
(city X having a mean business income lower than 100,000 liras)
SHOW THAT can still be true. We call that null hypothesis.
THAT Here in this example our hypothesis dictates:
DIFFERENCE IN H: μ > μ
1 M F
CHANCE”) H: μ = μ
0 M F
or H : μ
0 M ≤ μF
IS THE MEAN
DIFFERENCE THAT WE
SEE IN THE SAMPLE
DATA” FAR AWAY”
FROM THE
HYPOTHETICAL
SCENARIO WHERE
WOMEN HAVE AT
LEAST THE SAME
AVERAGE INCOME
WITH THE MEN IN THE
POPULATION?…
TWO FORMULA WHICH WE ARE GOING TO USE HERE…
STANDARD ERROR OF THE MEAN DIFFERENCES AND Z-SCORE FORMULA FOR SAMPLE MEAN DIFFERENCES LET’S COMPUTE
THEM ON THE BOARD FOR OUR EXAMPLE
WE HAVE TO FIND
SOME CRITICAL VALUE
ACCORING TO WHICH
WE ARE GOING TO
MAKE AN ASSESSMENT
TO REJECT (OR NOT
REJECT) THE NULL
HYPOTHESIS. LET’S
FIND IT AND DECIDE
WHAT WE ARE GOING
TO DO…
REMEMBER, WE TAKE 95% CONFIDENCE LEVEL AS THE
DEFAULT LEVEL OF CONFIDENCE (SO WE ARE GOING TO
CALCULATE ALPHA FOR IT)
FOR H0: μM = μF
IS IT, ONE-TAILED OR TWO-TAILED?
OUR NULL HYPOTHESIS WAS “WOMEN HAVE AT LEAST THE
SAME AVERAGE INCOME WITH MEN”
H0: μM ≤ μF
SO, THIS TIME THIS IS A ONE-TAILED TEST.
HOWEVER, IN BOTH SCENARIOS WE CAN REJECT THE NULL
HYPOTHESIS, GIVEN Z-SCORE FOR SAMPLE MEANS
DIFFERENCE (3.02) IS GREATER THAN ALL CRITICAL VALUES!
SO, THIS IS A STATISTICALLY SIGNIFICANT DIFFERENCE. I
AM NOT ONLY 95% BUT ALSO 99% CONFIDENT THAT THERE
IS A GENDER WAGE GAP!
Eğer bulduğum Z score, T-test sonucundan büyükse (%) olarak, bu durumda
Hipotez 0’ın gerçekleşme olasılığı yok yani gender gap olmaması ya da tersi
durum yok.
Aynı durum City X örneğindende bulunuyor. Orada da bir şehrin 102.000
ortalama ve 20.000 sapma ile ödenek alması için 100.000 den az geliri
olması gerekiyor. Hipotez 1 diyor ki şehrin ortalaması 100.000 den az olmalı
ama biz hipotez 0 daki duruma bakıyoruz eğer fazla olursa da alabilir mi,
%95 oranında alamıyor. 2 zaten SE of mean değeri 2 birim aralıktayken
population’a uyumlanır olması için %90 aralık veriliyor daha fazla
confidence sunamıyoruz her şekilde alması imkansız.
EXERCISE
For several decades, the ANES group has conducted extensive surveys of the voting age population for
each biannual election cycle. One of the survey items asks respondents to place a candidate, other
political figure, organization, or group on a scale ranging from 0 to 100. On this “feeling
thermometer,” a “0” represents the least positive, or cold placement; 100 represents the most positive,
or hot placement; and 50 represents neutrality.
Using this information, address the following statement:
“In 2000, men were more supportive of George Bush than were women.”
Feeling Thermometer Ratings
Men Women
X̄ = 58.15 X̄ = 55.74
s = 24.55 s = 25.12
N = 781 N =980
“Men were more supportive of George Bush than
were women.”…
MY Z-SCORE VALUE IS 2.02.
THEREFORE, I AM 95% CONFIDENT THAT
MEN ARE MORE LIKELY TO BE MORE
SUPPORTIVE OF BUSH.
WHAT ABOUT 99%?
dichotomous variable is a variable for which only two categories exist. (male – female,
war – peace, Trump – Biden, yes –no, leave - remain…etc.)
For voting behavior scholars, dealing with dichotomous dependent variables in
inferential statistics is almost inevitable.
Party preference in two-party systems, referenda... etc.
Suppose, we have some survey data, so we know percent of the respondents will vote for
the incumbent president in the upcoming elections. How are we going to interpret that
sample statistic for the population?
Exercise 1
Suppose that the Gallup Organization’s latest poll sampled 1,000 people from the United
States, and the results show that 52% will vote for the incumbent president, compared to
48% who will not.
How are we going to interpret that survey data? (In other words, what can we expect to
see in the entire population?)
In statistics, p stands for the sample proportion, whereas Π stands for the population
proportion
We have p and we will infer Π (as we inferred μ based on x̄ for the averages in interval
variables )
We will calculate the margin of error!
I HAVE TO
CALCULATE
THE MARGIN
OF ERROR
(MOE) FOR
PROPORTIONS
HERE IS THE
FORMULA
Exercise 2
“KONDA, 15-16 Haziran 2019 tarihlerinde İstanbul Büyükşehir Belediyesi sınırları
içindeki 157 mahallede 3498 kişiyle hanelerinde yüz yüze görüşülme ile gerçekleştirilen
24 Haziran İstanbul seçimi anketinin sonuçlarını açıkladı. KONDA anketinde Ekrem
İmamoğlu yüzde 49 gösterilirken Binali Yıldırım ise 40.9 olarak araştırmaya yansıdı.
Kararsız seçmenler orantılı bir şekilde dağıtıldığında ise Ekrem İmamoğlu’nun yüzde
54, Binali Yıldırım’ın yüzde 45 oy oranına ulaşacakları hesaplandı.”
Based on these findings reported in that news story, what would be the estimated
population statistics for Imamoglu’s vote share?
a) Compute the 95% confidence interval,
b) Compute the 99% confidence interval
c) Neden margin error ?
INTRODUCTION TO HYPOTHESIS TESTING FOR
CATEGORICAL VARIABLES…
Suppose that we are interested in testing some claims of political underrepresentation.
Such as “Religious groups are not represented proportionally in the Congress.”
To assess such claims statistically, we use chi-square distribution.
It tests the possibility that the proportions we observe in a sample –such as the U.S.
Congress- could have been randomly drawn from a population (U.S. as a whole) with
different expected proportions. So, thanks to that, we can compute underrepresentation
or overrepresentation!
Warning: We assessed the diversity in the Congress by computing the IQV (i.e.,
categorical variability) in Week 4.. This time we are going to make some judgment about
whether the Congress is representative of the population with regards to religious
diversity!
WAS 107TH CONGRESS REPRESENTATIVE OF THE U.S.
POPULATION WITH REGARDS TO RELIGIOUS DIVERSITY?
What else do we need to assess,
whether this distribution is
representative of the population?
Relative frequency of these
religious denominations in the
population!
Here are some figures that I took
from a PEW Research study:
58% Protestant, 26% Catholic,
2% Jewish,14% Other.
HERE IS THE CHI SQUARE FORMULA…
IT IS EASIER TO COMPUTE THAT WITH A TABLE (AS WE DID FOR
THE STANDARD DEVIATION COMPUTATION). SO WATCH ME
CAREFULLY AS I PREPARE IT ON THE TABLE AND TAKE NOTES.
WHAT ARE WE GOING fe
TO DO WITH THAT?? share in the (=what (fo- (fo-
Categories fo population if...) fe) (fo-fe)² fe)²/fe
Protestant 258 0.58 247 11 121 0.49
Catholic 128 0.26 111 17 289 2.60
Jewish 27 0.02 8 19 361 45.13
Other 13 0.14 60 -47 2209 36.82
Chi-
Total 426 square 85.04
We will assess it with the chi-square distribution!!!
This is a univariate chi-square test for measuring representativeness of a sample
and df = k – 1 (number of categories – 1)
(In t-table df = number of observations – 1, do not get confused)
For a 95% confidence level I take 7.8147 as my benchmark. 85.04>7.8147. SO, I
AM 95% CONFIDENT THAT THE US CONGRESS IS REPRESENTATIVE OF
THE POPULATION WITH REGARDS TO THE RELIGIOUS DIVERSITY!
Because our the null hypothesis says that there is a relationship between different
than religion. Our Chi-Square value is bigger than the table value so Null is
Rejected.
HYPOTHESIS-TESTING WITH CATEGORICAL
VARIABLES
If we have categorical (nominal or ordinal) variables in our hypotheses…
Such as
“Democracies are less likely to go to war with each other.”
“Kurds are more likely to vote for HDP.”
“Support for the welfare state is higher among Democrats than among
Republicans.”
The most basic tool testing such hypothesis is crosstabulation (i.e.
contingency table) which is a frequency table that represents the distribution
of data simultaneously on two or more variables.
A GENERIC CONTINGENCY TABLE…
A TENTATIVE CONTINGENCY TABLE…
Let’s say we are interested to see whether voters’ sex plays a role in
support for President Erdogan…
Remember, first step of a hypothesis test in data analysis is about deciding whether what we observe
in the sample data matches up with our expectation.
Is there a relevant percentage difference in the way we expected?
relevant percentage difference is the difference in the percentages of cases between dependent
variable categories for one or more independent variable categories.
Relevant percentage difference is a descriptive measurement. BUT a complete
hypothesis test requires us to demonstrate that there is a statistically significant
relationship (i.e., a statistically significant association) between these variables, in
addition to the mere existence of some relevant percentage difference.
CHI-SQUARE TEST, AGAIN!…
A BIVARIATE CHI-SQUARE TEST is an inferential measure of association that compares
the observed frequencies within a contingency table against a certain frequency
expectation, usually one that matches statistical independence (= hypothetical scenario
where there is no relationship between these variables.).
HERE IS THE CHI SQUARE FORMULA…
IT IS EASIER TO COMPUTE THAT WITH A TABLE (AS WE DID FOR THE STANDARD DEVIATION
COMPUTATION). SO WATCH ME CAREFULLY AS I PREPARE IT ON THE TABLE AND TAKE NOTES.
To compute fe I need…
# observation fe (=what
Outcomes based on “Sex in the IV Partisan divide if sex had (fo-fe)
& Party” fo categories in "Total" no effect?) (fo-fe)² (fo-fe)²/fe
Male & Democratic 232 533 0.47 250.51 -18.51 342.6201 1.3676903
Male & Republican 301 533 0.53 282.49 18.51 342.6201 1.2128574
Female & Democratic 331 662 0.47 311.14 19.86 394.4196 1.2676596
Female & Republican 331 662 0.53 350.86 -19.86 394.4196 1.1241509
chi-square 4.9723583