📱

Get Our Mobile App

Take your business learning on the go!

Download on the App StoreGet it on Google Play

MAT-240 Module 7 Project Two (CC)

SNHU A11y Remediated Videos25:49

Transcription

AHMAD QADRI: Hi, class. In module 7, the scenario that's given to you in project 2 is that you have been hired by a regional real estate company to determine if your region's housing prices and housing square footage are significantly different from those of the national market. And the regional director has three questions that they want to see addressed. So here are the three questions.

The first question is, are housing prices in your regional market lower than that of the national market average? OK, so here, essentially what you are testing is if the region that you pick is the average housing prices in your region lower than the National market average. So this is going to be a hypothesis test. And this is a one-tailed hypothesis test. And to be more specific, this is a left-tailed hypothesis test.

In the second question, is the square footage for homes in your region different than the average square footage for homes in the national market? OK, so again, the question involves comparison. So we are going to do another hypothesis test. But because this time we're testing if one average is different than the national average, so we are going to be doing a two-tailed hypothesis test.

OK, and then the last question is, for your region, what is the range of values for the 95% confidence interval of square footage for homes in your market? So here, you have to create a confidence interval. OK, and so if you scroll down, please be sure to go over the directions, specifically this first direction here.

Here, essentially, you have to pick one region for this project from the following list of regions. So in the data set that's provided to you, you're going to pick one of these regions to work with. And this-- again, in this project, you will be selecting a random sample for yourself. So you will take a random sample of 500 observations for your region. So whatever region you pick, you have to select a random sample of 500 observations in that region. OK, and then there are directions about the one-tailed hypothesis test here, the two-tailed hypothesis test, and the confidence interval.

And if you scroll down, the data set is provided to you here. So if you click this, this will open up the spreadsheet here. And for this project, I will work with West South Central region. But again, you can pick from one of those regions that are mentioned in the directions. So let's start by picking a random sample of size 500 from this region.

Now, what I like to do here is create a copy of the data set that I'm working with. So that can be done very easily by just simply hovering over the tab here that you're going to pick and right-click. And go to Move or Copy, click Move or Copy. And then you can pick the region that you're making a copy of. So because I'm working with West South Central, so I'm going to pick West South Central here. And then checkmark Create a Copy. So this will create a copy of this tab. This is the original tab. And this is the tab that I will be working with. So if I double-click on this, I can just name this, say, Student. So then I know this is the copy that I'm working with. OK, so that's the first step.

Now, let's just get rid of these four rows here. So I'm just going to click row 4 and then drag it up. And then right-click and delete. Because I don't need those rows. And so if you scroll down, for this region, for the West South Central region, we have 1,000 records. So remember, we have to pick a random sample of 500. So we can again do that by using the Rand function. So the first thing I will do here is I will name this column Random. And then I will use equal rand function, parentheses, enter. So this will create a random number in the cell. And then if I just hover over the lower right corner and then double-click on it, this will just copy over the same function in all of the cells. So all of these cells now have random numbers in it. And we will use these random numbers to randomly sort our data set. So first of all, let me just show you that all the way, if you scroll all the way down. So there are random numbers in all of these cells. So that's good now.

Let's sort this data by random. And we can do that several ways. But let's just highlight all of these columns here. Go to Data, Sort, and then just make sure you have my data has headers checked. And then if you click on Sort By this cell here, this dropdown here, we will pick Random. And then we can just sort smallest to largest. If you say, OK, so this will sort the data set randomly. And while it's doing that, it will update the random column. But that's OK. It uses the previously generated numbers to sort. OK, so now the data set is sorted randomly.

And how can we pick 500? Well, we're starting with row 2, because the first row is the header. So we need to go to row 501. So let's go to row 501. So we need to pick until this row. OK, so I'm going to just delete. Click on this row, select row 502 by clicking here, there, and then just drag it down all the way. You can do it that way, or you can just simply-- let me show you, if you right-click and delete, so it will delete those rows. You can do it another way, which is probably easier, is to just highlight all of these cells that you want to delete. There you go, hit Delete and this will delete the rest of the rows. So here's our random sample of size 500 from the region that I picked, which was West South Central.

The first question involves a one-tailed hypothesis test about the house listing price in your region. So if you go back to the question, the question was, are housing prices in your regional market lower than the national average? Now, the first step is to figure out what the national average price is. And to do that, if you scroll down to the supporting materials, there's a document called National Statistics and Graphs. If you click on that, this will open this PDF that has statistics of the National data. And the mean, the national average listing price is 288,407. So we need to note this down in our spreadsheet. So I'll just call this the National Average Listing Price is 288,407.

Now, to be able to do this test, we need a few statistics. And we will start with calculating the sample mean. This is our sample average. So for this, we can use the Average function. So we're going to type equal, average, parenthesis, click on column D, and that's 228,808. So that is our-- that's our sample mean. Next, we need to calculate the sample standard deviation. The sample standard deviation, we can use equal stdev.s function. The dot s is for the sample standard deviation. Parentheses, again, I will click on column D. And that's 73,528. Next, we would need to calculate the standard error. And that's because standard error is needed to calculate, to eventually calculate, the test statistic. So let's calculate the standard error here. And that would be equal to the sample standard deviation divided by the square root of the sample size. And the sample size for us is 500. Remember, we took a random sample of 500. So I'm going to type 500 here. So that's our standard error.

Now we have everything to start the hypothesis test. And the first step is to clearly define the null and the alternative hypotheses. And so let's start with the null hypothesis. So the null hypothesis is that the mean listing price in West South Central region, which is the region I picked, is equal to the national average, which is 288,407. And be sure to also explain this in words. So the null hypothesis is that the mean listing price in West South Central region is equal to the national average. All right, the alternative hypothesis, remember, we're testing whether the regional mean is lower than the national average. So the alternative hypothesis is that the mean is less than 288,407. Again, please explain this in words as well.

All right, the next step is to-- let's define a level of significance that we're using for this test. So maybe we can say the level of significance, if it's not provided to you, then be sure to specify what level of significance you're using. And we would use 5% or 0.05 here. All right, OK, now, the next step is to calculate the test statistic. So that would be equal, parenthesis, and then the sample mean, which is here, minus the national average, which is here, divided by the standard error, which is here. All right, so right away, you can see we get a we get a negative number. That's because you can clearly see that the sample mean is less than the national average. The idea behind carrying out this test is we're trying to find whether the sample mean being lower than the national average in this scenario is statistically significantly lower or not. That's the idea behind carrying out the hypothesis test.

So let's now calculate the p value. The p value will tell us whether it is statistically significant. And the p value, we can use t.dist function. The first argument is the test statistic, which is here. The second argument is the degrees of freedom, which, for us, would be-- well, the formula for that is n minus 1, sample size minus 1. And our sample size was 500. So 500 minus 1 is 499. And then for cumulative, we will enter-- we can either enter true, or we can enter 1. There you go. So our p value is 0.0. And actually, you'll see if you print out more decimal points, it's essentially just 0. And that's because the test statistic is very low. It's negative 18. So the p value is 0.

Now we can get to the conclusion of the test. Whoops, sorry. All right, so the conclusion is that since the p value is less than the level of significance, we will reject the null hypothesis. So remember that the rule, the general rule, is if the p value for your test is less than the level of significance, you reject the null hypothesis. If it's greater than or equal to the level of significance, then you do not reject the null hypothesis. So we know we need to reject the null hypothesis. But what does that mean? What is the interpretation of that? So the interpretation is because we're rejecting the null hypothesis, there is evidence that the average listing price in this region that I picked, which is West South Central, is lower than the national average listing price. So this is very important to carry out in these steps. You have to clearly define your hypotheses, define the level of significance. Or if it's given in the problem, in the question, then use that. Calculate the test statistic. Calculate your p value. Reach the conclusion, and then interpret the findings. What is the evidence telling you?

The second question here involves testing whether the average square footage for homes in the region that you picked is different than the average square footage for homes in the national market. So if we go back to the workbook, what we're testing here is whether the region that you picked, that the average square footage in that region is different than the national average. So the first thing we need to do is we need to figure out what is the national average square footage. So for that, if we go back to the PDF document, we can see that the average square footage here is 1944, or 1,944. All right, so let's enter that here.

OK, next up is the sample mean. So we can carry out the same steps that we just did to do this two-tailed test. So the sample mean, we can use the average function again, parentheses, and this time, square footage data is given in column F. So I'm going to click on column F here. So that's our sample mean is 2,054. Now, let's calculate the sample standard deviation. Again, we will use stdev.s, parentheses, and then click the same column again. And that's our sample standard deviation. Let's now calculate the standard error, which is the sample standard deviation divided by the square root of the sample size. So that's our standard error.

So now we have almost everything that we need to start the test. And so we need to start off by first defining what is our null hypothesis. Now for that, remember that we're testing it against the national average. So we're going to say if we let mu be the average square footage in West South Central, then the null hypothesis is that mu equals the national average, which is 1,944. And then the alternative hypothesis, so we have to be careful here, this is a two-tailed test, remember? Because we're testing whether the regional average is different, so less than or greater than, that's what we define by different. So for that, because it's a two-tailed test, we're going to use not equal. So I could just say not equal to 1,944.

Now suppose I use a-- allow a significance of 5% or 0.05. Now, I can calculate my test statistic. Now, that is going to be parenthesis, the sample mean, which is this, minus the population, the national mean, which is this. And then that divided by the standard error, which is 13.82. So I'll click here. And so that's my test statistic. It's 7.95.

Now that I have my test statistic, I can get my p value. And for the p value, I'm going to use t.dist-- whoops, 2t. 2t is used for p value when the alternative hypothesis is not equal, or it's a two-tailed hypothesis test. Now one thing you have to be careful about here is that your test statistic that you enter, the first argument is entering the test statistic. Now, in my case, it's positive, so I can just click on this, and it would work. But you should always enter the positive value of the test statistic. So even if you get a negative test statistic, just enter the positive of that. In other words, enter the absolute value of the test statistic that you get. So in my case, it's just 7.95. So I will just type 7.95. And then the degrees of freedom. So that's, again, it's n minus 1, sample size minus 1 is 499. So I get my p value of 0.0 again. So the p value is 0.

Now, I need to reach a conclusion. And the conclusion is since the p value is less than the level of significance, we will reject the null hypothesis. So again, we reject the null hypothesis, because the p value is less than the level of significance we're using. And then the interpretation of this is that there is evidence that the average square footage in West South Central region is not equal to the national average square footage.

Now, the third question is asking you to calculate a 95% confidence interval of square footage for homes in your regional market. So if we go back to the workbook here, the confidence interval that we're building, first of all, it's for the square footage. And we need a 95% confidence interval. So the alpha for 95% confidence interval, or in other words 0.95, the alpha is 0.05. So it's always 1 minus-- if it's 95%, it's 0.95 here. So the alpha is 0.05.

Now, the confidence interval, the general formula of a confidence interval is the sample mean plus or minus the margin of error. And that margin of error is based on the confidence interval that you're building. So for a 95% confidence interval, that margin of error will be based on that. So first, and we can clearly see we have the sample mean, which we calculated here. So we need to calculate the margin of error. And for that, we can use Excel formula confidence.t. And the first argument is alpha. And we calculated that here. It's 0.05. Second argument is the standard-- the sample standard deviation, and we calculated that here. And then the last one is the sample size. And that's 500 for us. So our margin of error is 27.17.

Now remember that a confidence interval has a lower bound and an upper bound. That's why we have the plus and the minus here. The lower bound is the sample mean minus the margin of error. So it's the sample mean minus the margin of error. And the upper bound is the sample mean plus the margin of error. So I think I need to fix this here, there you go. OK, so we calculated the lower bound as the sample mean minus the margin of error and the upper bound as sample mean plus the margin of error. So our 95% confidence interval is 2,026.78 and 2,081.12. This is a 95% confidence interval.

Now when you're-- once you have calculated this, you have to interpret what it means. You have to explain it in words. We can say that we are 95% confident that the average square footage in and the region we picked, which is West South Central region, is between the lower and the upper bound-- is between 2,026.78 and 2,081.12.