Irene Palacios: I want to show you on Marchel 27,
Irene Palacios: which is the Chi-square test for independence. This is pronounced Chi, the CHI.
Irene Palacios: And I guess this is quiz number 3.
Irene Palacios: There is a table.
Irene Palacios: and it might be your question 3, or
Irene Palacios: you might get another question for you. But
Irene Palacios: this would be similar.
Irene Palacios: Okay? So we have a table here. The data gives us
Irene Palacios: go ahead.
Irene Palacios: A table with 2
Irene Palacios: categorical variables. One of the variables
Irene Palacios: is whether or not a fireman participated in the 9 11 rescue.
Irene Palacios: and then the other. Variable was their risk
Irene Palacios: problems. So no risk moderate to severe risk for alcohol problems. So you can actually put this on step, Prince, the directions are here.
Irene Palacios: And so if you click on the directions, this is just an example. The data, of course, is different.
Irene Palacios: But you are able to change the
Irene Palacios: title on staff front. So what I'm going to do is I'm just going to use these instructions right here.
Irene Palacios: mainly down here, is what we see at all.
Irene Palacios: and I'm going to enter this table into stack crunch again. The directions I did get them from here
Irene Palacios: there's a link.
Irene Palacios: So if you open your stack crunch.
Irene Palacios: I went ahead and
Irene Palacios: Buddy
Irene Palacios: stay home.
Irene Palacios: They try to work on this so I wouldn't make this video too long.
Irene Palacios: But notice that for the first
Irene Palacios: column I can just change these these variables here.
Irene Palacios: you can just click on it.
Irene Palacios: and you can change it
Irene Palacios: right. And you can also make them a little bit wider. So you can actually fit anything you want here.
Irene Palacios: So you can type anything you want here.
Irene Palacios: Can you click on it again?
Irene Palacios: We can type.
Irene Palacios: and you can make that a little bit wider by just moving
Irene Palacios: moving these right here, these dividers, and you've changed the name of your home.
Irene Palacios: You can type anything you need to in here.
Irene Palacios: So what I did is for this one.
Irene Palacios: It looks like it is a whether or not they participated in the 9 11 rescue.
Irene Palacios: And so that's what I did.
Irene Palacios: Participant 9, 11. Rescue, yes or no.
Irene Palacios: and they participate, or there, or they didn't, to put yes or no. And then for
Irene Palacios: the other variable, it's the type of risk
Irene Palacios: for alcohol problems they had so none or moderate to severe.
Irene Palacios: So I just changed it up here. No risk.
Irene Palacios: and then moderate to severe. And I just typed in the numbers
Irene Palacios: 7, 93,
Irene Palacios: 4, 41,
Irene Palacios: 309, 1, 10. Notice that I just typed in the numbers here. I didn't do the row columns or the row totals.
Irene Palacios: So I didn't do the row totals. I didn't do the row totals
Irene Palacios: I just typed in the actual data.
Irene Palacios: These 4 numbers right here.
Irene Palacios: Stack French does all of the other stuff for you, and
Irene Palacios: so if
Irene Palacios: once you're done, once you've done with your table.
Irene Palacios: you can just go to that.
Irene Palacios: and then you're going to go to tables
Irene Palacios: and then contingency. That's what we have here. And with summary
Irene Palacios: alright. So then, what I did here is. I just followed the instructions that I have
Irene Palacios: in my link within the actual problem. Remember.
Irene Palacios: this link right here has directions. I just went ahead. I clicked it, and it says what to do. I I went to Stat tables contingency with Summary.
Irene Palacios: So that's where I'm at right now.
Irene Palacios: That gives me this table.
Irene Palacios: Now it says, under the select columns.
Irene Palacios: we want to click on each group associated with the response variable.
Irene Palacios: So the response variable here
Irene Palacios: and in this.
Irene Palacios: whether they're drinking alcohol
Irene Palacios: are the problems.
Irene Palacios: their alcohol plans?
Irene Palacios: That's their
Irene Palacios: response mode.
Irene Palacios: And then the explanatory variable.
Irene Palacios: That's gonna be your role label.
Irene Palacios: So the explanatory, variable. That's
Irene Palacios: whether or not they participated in the 9 11
Irene Palacios: rescue.
Irene Palacios: And that's your row label. So does that explain
Irene Palacios: what's happening with response variable whether they're having drinking. Certainly.
Irene Palacios: Okay. So the row variant row labels is the explanatory variable, which is whether or not they participated in the menu skew
Irene Palacios: and under columns. We're gonna click on
Irene Palacios: down session
Irene Palacios: usage. Okay? So let's go back
Irene Palacios: alright. So here, you're gonna have to click and then control click, so that you can select both of them. So click and then control click.
Irene Palacios: And then that's what selects both. So this is about the problems they're having with alcohol, either no risk or moderate severe.
Irene Palacios: This is, that's your response. And this is your explanatory. That's whether or not they participated in
Irene Palacios: alright. And I just go back here and continue
Irene Palacios: reading.
Irene Palacios: It says, under the display
Irene Palacios: expected count, okay? So under display
Irene Palacios: expected count. So that's what we did here. And then it's the Chi-square test for independence. And then I compute, and there I get my table
Irene Palacios: had done it earlier.
Irene Palacios: checking that I do have the same data.
Irene Palacios: Okay? So if you were to calculate the expected values by hand, this is what you would get what you see here in parentheses.
Irene Palacios: stack friendship already does that for us so for assuming that the 2 variables are independent.
Irene Palacios: then what we see in parentheses is what we should have seen.
Irene Palacios: so we should see 822 or 823 individuals who participated in the 9 11 rescue have no respir.
Irene Palacios: while
Irene Palacios: 279 of them who did participate in the 9 11 rescue would have moderate severe risk for alcohol.
Irene Palacios: So what's in parentheses is what we would expect to see if the 2 variables were not related were independent of each other.
Irene Palacios: Now you can notice a difference between what's in parentheses, which is our expected value, and what we actually saw. So 823 and 793, those are different. Right? 279 and 309. Those are different to the question is, are the differences significant? And are they statistically significant?
Irene Palacios: Because if they are statistically significant, then we would reject the null, and we would reject independence.
Irene Palacios: because the null is a statement of independence
Irene Palacios: that the 2 are not related.
Irene Palacios: Right? So, as I'm saying all that, I want you to remember that the null
Irene Palacios: is the statement of independence. The 2 variables
Irene Palacios: have no relationship. These are the notes from Module 27. So this is not the problem itself. It's just the setup. So the null is no relationship. The 2 variables are independent.
Irene Palacios: See the null, the 2 variables are independent and the alternate. The 2 variables are dependent.
Irene Palacios: So that's how we set it up
Irene Palacios: again. This was just from my notes, as far as the setup is concerned.
Irene Palacios: but it's not the exact problem
Irene Palacios: alright.
Irene Palacios: So
Irene Palacios: what we find is that our Pw is really it's pretty small, less than
Irene Palacios: point 0 5. What's last 1.0 1.
Irene Palacios: So it is smaller than Alpha.
Irene Palacios: So then we reject them all. So we're rejecting independence.
Irene Palacios: and we're rejecting independence.
Irene Palacios: We are saying that the 2 are related. They are dependent. So it's the alternate.
Irene Palacios: That's what our data
Irene Palacios: alright. So you can go back over here and enter all your information for the Chi squared p-value related to. I'm just going to submit the quiz. I did do the whole thing.
Irene Palacios: I just did this part of it. So I'm not gonna get a Ted
Irene Palacios: because I didn't do the top one.
Irene Palacios: But hopefully it got water part. And yes, I did have 3 out of 3.
Irene Palacios: Alright. So you first have to decide how you're gonna type in the data
Irene Palacios: type in the table. And remember, you only need
Irene Palacios: the actual data that was collected. You don't need the row or the column tools.
Irene Palacios: And so when you are looking at stack French
Irene Palacios: remember that you can change the
Irene Palacios: names that the call on so you can just go and type
Irene Palacios: click and type directly the names of the columns.
Irene Palacios: and you can size them, make them different sizes.
Irene Palacios: And then what we did is we move on to Stan.
Irene Palacios: and then tables contingency with summary.
Irene Palacios: and we had the response variable and the explanatory variable. The response was the alcohol drinking. But in order to select, you have to
Irene Palacios: press control and then click on the next one.
Irene Palacios: The role label was the work, the explanatory, variable
Irene Palacios: overall labels extend for you.
Irene Palacios: and then we're looking at expect accounts. And then this is the Cha spread
Irene Palacios: test for independence.
Irene Palacios: Press on compute. And that's how we ended up getting that taken
Irene Palacios: alright. I hope this video was helpful
Irene Palacios: to help you out with these contingency tables.