-: Hello and welcome to the video lecture on statistics,
which is the next phase in how to do
the analysis of quantitative data.
And specifically, we're gonna look at how can you infer
to either larger populations
or how can you test if a relationship that you see
is a real one or a fluke, for lack of a better word.
So we're gonna look again at univariate, bivariate
and regression and how we can apply statistical analysis
and look for what we call statistical significance,
which is a high degree of confidence
that a relationship that we see is real.
So again, as we learned last time,
univariate analysis describes a single variable.
It could be frequencies,
it can be central tendency, like mean, et cetera,
Bivariate and multivariate,
it is often in the form of cross tabulations.
And looking at the relationship of how
the way your respondents answered one question,
if there's like a pattern in how they answered another.
And again, in many cases this is a,
with the independent variable being
a demographic like age or gender or race
or income or something like that,
and the dependent being some sort of attitude or behavior.
So one of the ways that we test for
whether the relationship is a real one,
would it sort of hold up if we did it over and over again
or was it just a fluke?
And we look at the idea of statistical significance.
And this is a way of hypothesis testing
in multivariate and bivariate analysis.
So we always start with a null hypothesis,
that variable A has no effect on variable B,
that Jazz, we look before age,
has no effect on support for gay marriage,
education has no effect on income.
And we express this as a null hypothesis
and then we test whether that null is true or not.
So in the above example,
if the null is true, then education has no effect on income.
Knowing someone's education gives you no information,
doesn't help you sort of forecast
what their income might be.
And then regression analysis,
it's that one or more of your independents
has no effect on your dependents,
and X has no effect on Y,
that the beta or B for that variable equals zero.
That basically, the regression line is horizontal,
that a change in X has no effect on Y.
The key measure that we do here is the P value,
and P is the probability of a Type I error,
which a Type I error is a false positive test
where you think there's something there but there isn't.
You reject the null when the null is true.
It's again, it's the value of thinking
that there's a true relationship when really there is none.
Usually in social science,
we have three levels of significant 0.01, 0.05
or 0.10, 0.05 and 0.01.
And just to hone in,
if the P value is 0.05,
we're 95% sure of that the relationship is real
and there's 5% of a Type I error.
And when you run the statistics
in a package like SPSS, it gives you the P value.
So here is an example of what's a Type I error
and a Type II error.
So another way of thinking about it is,
if you take a COVID test,
the null hypothesis is that you don't have it
and you get those two lines and it says you have it,
but you actually don't, that's a Type I error.
That means that it told you that
you do have COVID when you don't
like the case on the left here
where the doctor is telling this man you're pregnant.
So we use these do what's called inferential statistics,
which allows you to sort of infer or predict
or sort of extend your findings to the larger population.
In univariate analysis,
it's in the form of those confidence levels
and intervals that we learned about that,
like the Vermonter Poll, we're 95% sure
that the value we got from our survey is within
plus or minus five percentage points of the real value.
And in bivariate or multivariate analysis,
it tells you how likely is the null hypothesis true?
How likely is that this relation,
that there's no relationship versus
there is a relationship between variables.
Recall that the sampling error is the error of,
that you get by not talking to everyone.
It's the difference between the parameter and the statistic.
And we wanna make a claim that what we learn is,
can be generalized.
So we first need a confidence level, we're 95% sure,
and a confidence interval that they are within
plus or minus five percentage point.
This is a measure of the precision of the data.
So a Vermonter Poll question from 2009 said
66.8% of Vermont households had broadband.
So 66% 0.8% of the sample.
So think about out since this was a 95.5 poll,
what can we say about the true value
of the number of Vermont households
that had broadband at that time?
When we look at bivariate analysis,
we think about do groups vary
in how they respond to certain questions.
And usually again or maybe very often,
our independent variable is some sort of demographic
and the dependent is some sort of
attitude, belief, behavior.
So here are three examples.
So in the first one, the independent is major
and the dependent is being a fan of country music
in the second one, again where you're born,
and then the third one, your class rank
and various behaviors.
Note that we always test against a null hypothesis.
The null hypothesis is these two groups behave the same.
There's no measurable way that we can say that
in any meaningful way these two groups are different.
That they basically,
there's no difference in their awareness,
in their preference, in their behavior, et cetera.
And we always again, test against this null hypothesis.
So when we do this sort of bivariate analysis,
statistical significance is can we reject that null?
How certain can we be?
How sure are we that we can reject the null?
So the null means there's no relationship.
If we reject our null,
it means that we do see that these two groups
act or believe or behave differently.
So we look at how likely is it that we can reject our null,
how likely is it given our data
that we can say with a some degree of certainty
that there's a real difference between these groups?
And we use our P value.
So there's nothing magical or written in stone about 0.05.
That's one that we use very often.
And if P is less than 0.05,
it means that we can reject our null
with 95% confidence.
We're 95% sure that our null is false
and only 0.05 sure that our null,
we're saying our null is true when it's actually not true.
So one way of thinking about it again,
are CDAE majors that were born in Vermont taller than?
And note that we can see one of the ways
that we can state our null is there's no,
the difference in their height,
there's no statistical meaningful difference
in the height of these two groups.
So there are four tests that we use
and it depends on what is our dependent variable.
So that's why I've been spending a lot of time
to help you to think about what kind of variable
nominal, ordinal, interval ratio is our dependent.
And that's going to tell you
what kind of test that we use.
So all of these tests, and I think,
I don't know of any statistical test
that doesn't work like this.
There may be some, but none that I use,
probably none that you will commonly use in your work,
certainly none that we use in this class.
So again, we begin with this null hypothesis.
There's no relationship between the two variables.
And each of these tests gives us a test stat.
And this test stat looks at
how would the data look if the null were true
versus how do they actually look.
and note that we can almost always write our null
as something equals zero.
So think thinking back to the heights
of these two groups that one way that
you could express a null hypothesis is
the mean height of these two groups are the same.
And another way of saying that is,
the mean height of group A
minus the mean height of group B equals zero.
And that is the null hypothesis that we test.
And the this test stat looks at
how far away from zero is this,
that if you have a large test stat in absolute value,
not close to zero, a large positive or negative number,
that means that much more likely that our null is not true
and we can with greater confidence
reject our null hypothesis.
A very small test stat means that
there is not a lot of difference
between these two groups that in the sense,
A minus B is very close to the zero,
our test stat is very close to zero.
And in this case we failed to reject our null
and conclude that there's no difference
between these groups.
So one way of thinking about this
is looking at two sets of collegiate athletes.
One is football players, varsity football players,
and two is varsity gymnasts.
Do they have the same body weight?
How could you express this as a null hypothesis?
Think about that.
This is something that you should be able to do.
And then we would test this
and my guess is that we would have a big test stat
a very small P value
and we could say with a lot of confidence that
these two groups are not the same.
We reject our null and we say that
there's a statistically significant difference
in body weight between football players and gymnasts.
So to conclude on this question,
our null hypothesis is that college football players
and college gymnasts have the same average body
weight or mean weight.
We can express this null as the mean weight of footballers
minus the mean weight of gymnast equals zero.
And I think that that if we got the data
and ran the analysis, we would get a great big test stat
and we would with great confidence reject this null
and say that the mean weight
of these two groups are not the same.
This is a good way of thinking about the P value.
So the P value is the probability that you will
reject the null when you shouldn't.
And think about this graph is,
the probability of getting a test stat
of that size if the null is true.
So you can see, so with this bell curve,
if you get a test stat very near zero,
it's fairly likely that the null is true.
But if you get a test stat far away from zero
way out on the tails of this graph
such as the area shaded in blue here,
it is very unlikely that you would get
that test stat if the null were true.
And the P value there,
that where you see t and minus t on this graph,
the area under this curve to the right of t
and to the left of minus t is 0.05 of the entire area.
So to the right of t is 2 1/2 %
and to the left of minus t is 2 1/2.
So the area under the curve,
the left and right of those points,
these blue shaded area makes 5%
of the total area of the graph.
So if you get a test stat that's to the right of t
or to the left of minus t,
we would reject our null
and conclude that the groups
that we are studying don't respond to the question,
don't have the same value of the dependent variable.
And again, all test stats basically work like this.
So what kind of tests do you use
based on what kind of variable do you have?
And this, that it's always the dependent variable,
the attitude, the behavior, sort of the outcome.
So if your dependent is nominal,
you use a Chi-Square test.
So our Vermont born students
are more likely to have blue eyes than non Vermont.
Are they are more likely to be Boston Red Sox fans?
So if think about a nominal variable.
And if your dependent is nominal,
you use a Chi-Square test.
And think about,
come up with another example of this on your own.
That's something that you'll have to be able
to do for class is, both look at a question like this
and say this is the right test or if I say,
give an example of a question
where you would use a Chi-Square test,
both of those are absolutely fair game,
something that you should know how to do
for this class on an exam, on an assignment, et cetera.
If you have ordinal, you use a Kruskal-Wallis test.
So if the dependent are,
how likely are you on a five point scale
to buy a car in the next year?
And our independent is marital status,
but it could also be what state you were born in,
your major, your class rank, any of those things.
If your dependent variable is ordinal,
you use a Kruskal-Wallis test.
T-tests, so the next few tests are all
if you have interval or ratio.
And now it matters what is the nature of your independent,
like what is the nature of the demographic groups?
So in this example, a T-test
is when you have two groups only group A, group B.
So here it's CENT majors versus PComm majors,
folks born in Vermont versus not born in Vermont,
Red Sox vans versus non Red Sox fans.
I don't know.
Think about two groups that you are comparing.
And if your dependent is interval or ratio,
how much do you spend, how much do you earn,
how many miles do you go on your bike or drive?
Anything with a ratio or interval variable,
you use a T-test when you're comparing two groups.
And just to do a little bit more
of a deep dive into a T-test,
a T stat is the difference in the means
between the two groups divided by the standard error.
So you can think about it as the numerator is,
what is the difference between these two group's means,
and the denominator is how spread out,
how precise or imprecise are the data?
So you see in case one and case two here,
these two groups have,
the green group and the blue group have the same mean.
But in case one, the top set of graphs,
the standard error is much smaller,
it's a much more precise measurement.
So the T stat in case one
would be greater than the case stat in case two.
We would get a bigger T stat
and we would be much more likely to reject the null
in case one than in case two.
We are staying with ratio and interval variables here
and now we look at a test called ANOVA which stands
for analysis of the variance.
This is still for ratio and interval,
but now there are more than two groups.
So if you look at CDAEs majors that PComm, CENT, CID
and then measuring their income,
that would be,
since there are three groups, that would be an ANOVA.
And one way ANOVA means that
there is one independent variable.
A two way ANOVA can have two independent,
your major and your year of admission
and the dependent is still income.
And note that a T-test is just sort
of a special case of ANOVA where there are only two groups,
but one way ANOVA has one independent,
two way in Nova has two independent,
but in both case your dependent is a ratio
or interval variable like income, expenditure,
mileage and so on.
Now let's look at regression.
How certain are we that one of our betas,
that one of our independent variables like X1
has a significant effect on our Y.
How can we know that?
Is there a measurable,
a significant change in Y when we change X?
So if Y is income and X is income X1 is income,
does an increase in income on average
result in an increase of expenditure on some good
or a decrease or no effect?
So again, in a regression Y is a function of X,
Y is our dependent,
X is a series of independence.
It might be things like age, income,
experience, education and so on.
And we look at holding all else equal,
what is the effect of a unit change of one of the Xs on Y?
And then our error term is that part of the model
that's not explained by the Xs.
And the regression software calculates this Beta0
and Beta1 such that
the distance between the real observation and the model,
the real observation and the estimated value
is as small as it can,
it makes the error as small as it can.
And if there are,
you can run a model with a large number of regressors like K
and that there will Beta0, Beta1,
where each Beta is, Beta1 is what is the effect
of a one unit change in X1 holding all else equal?
When we look at statistical significance,
our null hypothesis is that beta equals zero for some beta.
And we look at them basically,
one at a time.
And that would be like, the regression line is horizontal.
A change in X result in no change at all.
And y, and again, for a P value less than 0.05,
we reject our null.
We say that there's a 95% chance that X has a real effect.
For P-values greater than that we failed to reject our null
and we cannot say when we failed to reject our null,
we're saying that we are very uncertain
that X has any effect on Y.
The most common kind of regression is
called Ordinary Least Squares or OLS.
And this is a linear regression
where the effect of Y is modeled as the sum of
the effect of all of these Xs.
That Y is sort of what each individual says
for the dependent value on their survey.
X is what each individual says for each independent.
These betas are the estimated slope coefficient.
And again, our error term is that part
of Y that is not explained by X.
So here's an example,
money spent on food where X1 is income, X2 is age
and X3 is being female.
And note that,
so Beta1 is what is the effect of Y
when we increase their income by $1.
If Beta1 is significant and greater than zero,
it means give them more money,
they'll spend more on food.
If it's significant and less than zero,
it's give 'em more money and they'll spend less on food.
And the benefit, if we cannot reject our null,
we say that give them more money and it will have no effect,
and the same for the age and for being female
as opposed to being non female.
There are many kinds of regression.
And note that, so first of all,
the most common one is ordinary least squares
and that is when Y is a ratio or an interval variable.
It's not binary, it's not ordinal and it's not nominal.
So think about what are some dependent variables
that we could measure.
I gave a bunch of examples, expenditure,
mileage, things like that.
A person's carbon footprint and CO2 equivalent,
many examples.
If you have a dependent variable that is binary,
do you own a refillable water bottle?
Do you earn a degree? Do you have a bike?
Do you smoke or vape?
I hope that you don't and don't because it's very bad.
But that you can model this,
is where 1 is a yes, when y equals 1 or well,
if they say yes, they own a bottle, Y equals 1,
if they say no, I don't add a bottle, Y equals 0.
And a positive sign on X such as class rank say,
means that those with a larger class rank,
seniors as opposed to the first years,
are more likely to own a bottle.
And if your dependent is ordinal, how likely are you?
How much do you agree with?
You use what's called
either ordered probit or ordered logit.
And here again, a positive and significant beta on X
means that a larger response in X
makes it more like sort of,
more agreement or more likely to basically,
it corresponds to a higher number on the scale.
So how do you interpret regression results?
And we will look at this in class.
First you look at which of the variables,
the Xs are significant?
And in many times,
is a very common thing that you'll see.
If P is less than 0.01,
it will have one asterisk or one star,
if P is less than 0.05 it would have two,
and if P is less than 0.01, we it'll have three.
So we look at which ones are significant.
If they're not, if there's no asterisk,
if their P is greater than 0.10
the convention is that we don't reject our null
and we say thus, this X has no significant effect on Y.
But if they are, then look at the sign.
So if we look at our example,
Y equals local food expenditure,
X1 equals income X2 equals age and X3 equals female,
how would you interpret this?
What is a Beta1 of 0.01 mean?
What does a Beta3 of 5.25 mean?
How would you interpret that?
And we will learn how to do that in class.
All right. So this is what we did.
We talked about the various tests that we do
and we talked about statistical significance.
And this is what you should know, the descriptive stat.
What does inference mean with confidence levels?
What tests go with what type of variable?
How do you interpret regression?
Which types of regression go
with which types of dependent variables?
And what does statistical significance mean?
So this is all things that you should know
based on this topic.
Thank you.