Satistic Assignment 2

32
Exercise – 01 - _________________________________________________________________ ____________________ a) Development of a 99 percent confidence interval for the selling prices of the homes. Answer to the Question no – 01(a) Here, The statistical problem is solved by using SPSS software; the output of the solution is given bellow: Table# 01-A One-Sample Statistics 60 224.0567 45.3440 5.8539 Selling pric of the homes N Mean td. Deviation Std. Error Mean From above table we found that Sample Size, N = 60 Sample Mean, = 224.0567 Sample Standard Deviation, S = 5.8539 Standard Error Mean, = 5.8539 Table# 01-B

Transcript of Satistic Assignment 2

Page 1: Satistic Assignment 2

Exercise – 01 _____________________________________________________________________________________

a) Development of a 99 percent confidence interval for the selling prices of the homes.

Answer to the Question no – 01(a)

Here,

The statistical problem is solved by using SPSS software; the output of the solution is given bellow:

Table# 01-A

One-Sample Statistics

60 224.0567 45.3440 5.8539Selling priceof the homes

N Mean Std. DeviationStd. Error

Mean

From above table we found that

Sample Size, N = 60

Sample Mean, = 224.0567

Sample Standard Deviation, S = 5.8539

Standard Error Mean, = 5.8539

Table# 01-B

One-Sample Test

38.275 59 .000 224.0567 208.4750 239.6383Selling priceof the homes

t df Sig. (2-tailed)Mean

Difference Lower Upper

99% ConfidenceInterval of the

Difference

Test Value = 0

Page 2: Satistic Assignment 2

From above table we have got the upper limit and lower limit of the population mean (µ) of “selling price of the homes”.

According to the equation of “Confidence interval for the population mean (when is σunknown)” here,

Interpretation:

Probability of the “selling price of the homes” range ($208.4750 ≤µ≤ $239.6383) is 0.99.

The mean “selling price of the homes” of ranges from $208.4750 to $239.6383 and we are 99% confident about it.

The interval ($208.4750 $239.6383) contains the population mean with probability 0.99. If we take a sample of “selling price of the homes” as 100 times, this interval will contain the population 99 times.

b) Develop a 95 percent confidence interval for the mean distance of the homes from the center of the city.

Here,

The statistical problem is solved by using SPSS software; the output of the solution is given bellow:

Table# 01-C

One-Sample Statistics

60 15.0833 5.3687 .6931Distance from thecentre of the city

N Mean Std. DeviationStd. Error

Mean

From above table we found that

Sample Size, N = 60

Page 3: Satistic Assignment 2

Sample Mean, = 15.0833

Sample Standard Deviation, S = 5.3678

Standard Error Mean, = 0.6931

Table# 01-D

One-Sample Test

21.762 59 .000 15.0833 13.6964 16.4702Distance from thecentre of the city

t df Sig. (2-tailed)Mean

Difference Lower Upper

95% ConfidenceInterval of the

Difference

Test Value = 0

From above table we have got the upper limit and lower limit of the population mean (µ) of the distance of the homes from the center of the city.

According to the equation of “Confidence interval for the population mean (when is σunknown)” here,

Interpretation:

Probability of the “distance of the homes from the center of the city” range (13.6964≤µ≤16.4702) is 0.95.

The mean “distance of the homes from the center of the city” ranges from 13.6964 to 16.4702 and we are 95% confident about it.

The interval (13.6964 16.4702) contains the population mean with probability 0.95. If we take a sample of “distance of the homes from the center of the city” as 100 times, this interval will contain the population 95 times.

Exercise – 02 _____________________________________________________________________________________

a) A recent article in The Daily Star indicated that mean selling price of the homes in the city of Dhaka is more than Tk. 220. Can we conclude that mean selling price of the homes is more than Dhaka city is more than 220? Use 0.01significance level. What is the P-value?

Page 4: Satistic Assignment 2

Answer to the Question no – 02(a)

Step-1:

Ho: µ ≤ 220

H1: µ > 220

Step-2:

Level of significance is = 0.01α

Step-3:

t-Test statistic should be used

Step-4:

Formulate the decision rule;

If, P-value < value, then Ho will be rejected. αIf, P-value > value, then Ho will be accepted.α

Step-5:

Making calculation and taking decision,

Here,

The statistical problem is solved by using SPSS software; the output of the solution is given bellow:

Table# 02-A

Page 5: Satistic Assignment 2

One-Sample Statistics

60 224.0567 45.3440 5.8539Selling priceof the homes

N Mean Std. DeviationStd. Error

Mean

From above table we found that

Sample Size, N = 60

Sample Mean, = $224.0567

Sample Standard Deviation, S = $5.8539

Standard Error Mean, = 5.8539

Table# 02-B

One-Sample Test

.693 59 .491 4.0567 -11.5250 19.6383Selling priceof the homes

t df Sig. (2-tailed)Mean

Difference Lower Upper

99% ConfidenceInterval of the

Difference

Test Value = 220

Decision:

P-value is 0.491

Since P-value (0.491) > -value (0.01) then Hα o is accepted.

i.e. µ ≤ 220

Interpretation:

No, at 0.01 significance level we cannot conclude that the mean sealing price of homes in Dhaka city is more than $220.

b) The same article reported that the mean size was less than 210 square feet. Can we conclude that the mean size of homes sold in the city is less than 210 square feet? Use the 0.05 significance level. What is P-value?

Page 6: Satistic Assignment 2

Step-1:

Ho: µ ≥ 210

H1: µ < 210

Step-2:

Level of significance is = 0.05α

Step-3:

t-Test statistic should be used

Step-4:

Formulate the decision rule;

If, P-value < value, then Ho will be rejected. αIf, P-value > value, then Ho will be accepted.α

Step-5:

Making calculation and taking decision;

Here,

The statistical problem is solved by using SPSS software; the output of the solution is given bellow:

Table# 02-C

One-Sample Statistics

60 2215.0000 257.6458 33.2619Area of the home in sq.ftN Mean Std. Deviation

Std. ErrorMean

From above table we found that

Sample Size, N = 60

Sample Mean, = 2215 sq-fe

Page 7: Satistic Assignment 2

Sample Standard Deviation, S = 257.6458 sq-fe

Standard Error Mean, = 33.2619

Table# 02-D

One-Sample Test

60.279 59 .000 2005.0000 1938.4430 2071.5570Area of the home in sq.ftt df Sig. (2-tailed)

MeanDifference Lower Upper

95% ConfidenceInterval of the

Difference

Test Value = 210

Decision:

P-value is 0.000

Since P-value (0.000) < -value (0.05) then Hα o is rejected. So H1 is accepted.

i.e. µ < 210

Interpretation:

Yes, at 0.05 significance level we can conclude that the mean size of homes sold in the city is less than 210 square feet.

Exercise – 03 _____________________________________________________________________________________

Page 8: Satistic Assignment 2

a) At the 0.05 significance level, can we conclude that there is a difference in the mean selling price of homes with pool and homes without pool?

Step-1:

H0: µ1 = µ2 µ1 = Selling Price of homes with pool

H1: µ1 ≠ µ2 µ2 = Selling Price of homes without pool

Step-2:

Level of significance, = 0.05α

Step-3:

t-Test statistic should be used.

Step-4:Formulate the Decision Rule,

If P-value < - value, Ho will be rejected.α If P-value > - value, Ho will be accepted.α

Step-5:

Making calculation and taking decision;

Here,

The statistical problem is solved by using SPSS software; the output of the solution is given bellow:

Table# 03-A

Group Statistics

21 205.1381 27.7889 6.0640

39 234.2436 49.8157 7.9769

PoolNo

Yes

Selling priceof the homes

N Mean Std. DeviationStd. Error

Mean

From above table we found that,

Page 9: Satistic Assignment 2

For homes with pools: For homes without pools:

Number of pools, N = 39 Number of pools, N = 21

Sample Mean, = 234.2436 Sample Mean, = 205.1381

Sample Standard Deviation, S = 49.8157 Sample Standard Deviation, S = 27.7889

Standard Error Mean, = 7.9769 Standard Error Mean, = 6.0640

Table# 03-B

There are two p-values (0.16 and 0.005) in the table. To choose the correct one we need to do the “comparing two population variances” hypothesis test.

Step-1:

Ho: σ1 = σ2 σ1 = with poolH1: σ1 ≠ σ2 σ2 = without pool

Step-2:

Significance level, α = 0.05

Step-3:

Page 10: Satistic Assignment 2

F- Test statistic should be used

Step-4:Formulate the Decision Rule,

If P-value < - value, Ho will be rejected.α If P-value > - value, Ho will be accepted.α

Step-5:

Making calculation and taking decision;

From above Table# 03-B we can see that the significance value of Levene’s Test for Equality of Variances is 0.12 and the significance values of t-test Equity of Means are 0.19 and 0.007.

The probability of P cannot be more than the significance value of Levene’s Test for Equality of Variances, or P ≤ 0.12.

Decision (Comparing Variances):

Since, P-value (0.007) < -value (0.05) then Hα 0 is rejected, and H1 is accepted.

i.e. σ1≠σ2

So, equal variance cannot be assumed. Decision (Comparing Means):

Since, P-value (0.007) < -value (0.05) then Hα 0 is rejected, and H1 is accepted.

i.e. µ1 ≠ µ2

Interpretation:

Yes, at the 0.05 significance level, we can conclude that there is a difference in the mean selling price of homes with pool and homes without pool.

b) At the 0.01 significance level, can we conclude that there is a difference in the mean selling price of homes with an attached garage and homes without an attached garage?

Page 11: Satistic Assignment 2

Step-1:

H0: µ1 = µ2 µ1 = Selling Price of homes with an attached garage.

H1: µ1 ≠ µ2 µ2 = Selling Price of homes without an attached garage.

Step-2:

Level of significance, = 0.01α

Step-3:

t-Test statistic should be used.

Step-4:Formulate the Decision Rule,

If P-value < - value, Ho will be rejected.α If P-value > - value, Ho will be accepted.α

Step-5:

Making calculation and taking decision;

Here,

The statistical problem is solved by using SPSS software; the output of the solution is given bellow:

Table# 03-C

From above table we found that,

For homes with an attached garage: For homes without an attached garage:

Number of garages, N = 40 Number of garages, N = 21

Page 12: Satistic Assignment 2

Sample Mean, = 240.8675 Sample Mean, = 190.4350

Sample Standard Deviation, S = 43.4748 Sample Standard Deviation, S = 26.8365

Standard Error Mean, = 6.8740 Standard Error Mean, = 6.0008

Table# 03-D

There are two p-values (0.000 and 0.000) in the table. To choose the correct one we need to do the “comparing two population variances” hypothesis test.

Step-1:

Ho: σ1 = σ2 σ1 = with garageH1: σ1 ≠ σ2 σ2 = without garage

Step-2:

Significance level, α = 0.01

Step-3:

F- Test statistic should be used

Step-4:Formulate the Decision Rule,

Page 13: Satistic Assignment 2

If P-value < - value, Ho will be rejected.α If P-value > - value, Ho will be accepted.α

Step-5:

Making calculation and taking decision;

From above Table# 03-D we can see that the significance value of Levene’s Test for Equality of Variances is 0.030 and the both significance values of t-test Equity of Means is 0.000.

The probability of P cannot be more than the significance value of Levene’s Test for Equality of Variances, or P ≤ 0.030.

Decision (Comparing Variances):

Since, P-value (0.030) > -value (0.01) then Hα 0 is accepted.

i.e. σ1 = σ2

So, equal variance is assumed. Decision (Comparing Means):

Since, P-value (0.030) > -value (0.01) then Hα 0 is accepted.

i.e. µ1 = µ2

Interpretation:

No, at the 0.01 significance level, we cannot conclude that there is a difference in the mean selling price of homes with an attached garage and homes without an attached garage.

Exercise – 04 ___________________________________________________________________________________

a) At the 0.01 significance level, is there a difference in the variability of the selling prices of homes that have a pool versus that do not have a pool?

Step-1:

Page 14: Satistic Assignment 2

Ho: σ1 = σ2 σ1 = with poolH1: σ1 ≠ σ2 σ2 = without pool

Step-2:

Significance level, α = 0.01

Step-3:

F- Test statistic should be used

Step-4:Formulate the Decision Rule,

If P-value < - value, Ho will be rejected.α If P-value > - value, Ho will be accepted.α

Step-5:

Making calculation and taking decision;

Here,

The statistical problem is solved by using SPSS software; the output of the solution is given bellow:

Table# 04-A

From above table we found that,

For homes with pools: For homes without pools:

Number of pools, N = 39 Number of pools, N = 21

Page 15: Satistic Assignment 2

Sample Mean, = 234.2436 Sample Mean, = 205.1381

Sample Standard Deviation, S = 49.81567 Sample Standard Deviation, S = 27.78887

Standard Error Mean, = 7.97689 Standard Error Mean, = 6.06403

Table# 04-B

From above Table# 04-B we can see that the significance value of Levene’s Test for Equality of Variances is 0.012 and the significance values of t-test Equity of Means are 0.016 and 0.005.

The probability of P cannot be more than the significance value of Levene’s Test for Equality of Variances, or P ≤ 0.012.

Decision:

Since, P-value (0.005) < -value (0.01) then Hα 0 is rejected and H1 is accepted.

i.e. σ1 ≠ σ2

Interpretation:

Yes, at the 0.01 significance level, we can conclude that there is a difference in the variability of the prices of homes that have a pool versus homes that do not have a pool.

b) At the 0.05 significance level, is there a difference in the mean selling prices of homes among five Townships?

Page 16: Satistic Assignment 2

Here we assume,

µ1= Uttara

µ2= Banani

µ3= Gulshan

µ4= Baridhara

µ5= Nikunjo

Step 1: Ho: µ1=µ2=µ3=µ4=µ5

H1: At least one pair will differ.

Step 2:

Significance Level, = 0.05α

Step 3: F- Test statistic will be used

Step 4:Formulate the Decision Rule- If P-value< - value, Hα o will be rejected.

If P-value > - value, Hα o will be accepted.

Step 5:

Making calculation and taking decision;

Here,

The statistical problem is solved by using SPSS software; the output of the solution is given bellow:

Table# 04-C

Page 17: Satistic Assignment 2

Decision:

Since P-value (0.084) > α- value (0.05) then H0 is accepted and H1 is rejected.

i.e. µ1=µ2=µ3=µ4=µ5.

Interpretation:

No, at 0.05 significance level there is no any difference in the mean selling price of the homes among the five Townships.

Exercise – 05 ______________________________________________________________________________________

Page 18: Satistic Assignment 2

a) Write out the regression equation including all the variables except township. Discuss the variables size of the homes in square feet, distance from the city and garage attached with the homes.

Here,

The statistical problem is solved by using SPSS software; the output of the solution is given bellow:

Table# 05-A

Regression Equation:

Y= a + b1 x1 + b2 x2 + b3 x3 + b4 x4 + b6 x6 + b7 x7

Here, x1 = Number of bedrooms b1 = 8.508x2 = Area of the home in square feet b2 = 31.39x3 = Pool b3 = 19.405x4 = Distance from the center of the city b4 = -2.804x6 = Garage b6 = 27.203x7 = Number of bathrooms b7 = 5.338

a = 107.796So regression equation is,

Page 19: Satistic Assignment 2

Y = 107.796 + 8.508 x1 +31.39 x2 + 19.405 x3 + (-2.804) x4 + 27.203 x6 + 5.338 x7

Interpretation:-

Number of bedrooms: Co-efficient of the number of bedrooms is 8.508. That means if the number of the bedroom is increased by one, then the selling price of the homes will increase by $ 8.508 considering all other factors constant.

Area of the homes in square feet: Co-efficient of size of the homes in square feet is 31.39. That means if size of the home is increased by one square feet, the selling price of the homes will increase by $31.39 considering all other factors constant.

Pool: Co-efficient of the pool is 19.405. That means if there is a pool attached with the homes then the selling price of the homes will increase by $19.405, considering all other factors constant.

Distance from the center of the city: Co-efficient of distance from the center of the city is -2.804. That means if distance from the center of the city is increased by one mile, then the selling price of the homes will decrease by $2.804, considering all other factors constant.

Garage: Co-efficient of size of the garage attached is 27.203. That means, if there is garage is attached with the homes then, the selling price of the homes will increase by $ 27.203, considering all other factors constant.

Number of bathrooms: Co-efficient of Number of bathrooms is 5.338. That means, if number of bathroom is increased by one, then the selling price of the homes will increase by $5.338 considering all other factors constant.

b) Determine the value of R2 and multiple regression error. Interpret

Here,

The statistical problem is solved by using SPSS software; the output of the solution is given bellow:

Table# 05-B

Page 20: Satistic Assignment 2

Determination of R2: From above table,

R2 = (0.751)2

= 0.564001

Interpretation:

56.4% of the total variation in the dependent variable Y (Selling price) is explained by the variation in the independent variables number of bathrooms, size of home in square feet, garage, pool, number of bedrooms and distance from the center of the city.

c) Develop a correlation matrix. Which independent variables have strong or weak correlation with the dependent variable? Do you see any problem with multicollinearity? If any how do you solve it?

Page 21: Satistic Assignment 2

Here,

A Correlation matrix is developed by using SPSS software; the output of the solution is given bellow

Table# 05-C(i)

##Independent variables’ correlation with the dependent variable is given bellow##

Page 22: Satistic Assignment 2

Table# 05-C(ii)

Correlation of Dependent Variable with Independent Variable

Variables Correlation Comment

Selling Price of homes with Number of bedrooms

0.486It is a weak and

positive relationship

Selling Price of homes Area of the homes in square feet

0.373It is a weak and

positive relationship

Selling Price of homes Pool 0.309It is a weak and

positive relationship

Selling Price of homes Distance from the center of the city

-0.523It is a moderate

inverse relationship

Selling Price of homes Garage 0.529It is a moderate

positive relationship

Selling Price of homes Number of bathrooms

0.269It is a weak and

positive relationship

## Correlation between the Independent Variables is given bellow##

Table# 05-C(iii)

Page 23: Satistic Assignment 2

Correlation between the Independent Variables

Variables Correlation Comment

Number of bedrooms with area of the home in square feet

0.352 Weak positive relationship

Number of bedrooms with pool -0.028 Weak inverse relationship

Number of bedrooms with distance from the center of the city

-0.242 Weak inverse relationship

Number of bedrooms with garage 0.233 Weak positive relationship

Area of the home in square feet with pool 0.235 Weak positive relationship

Area of the home in square feet with distance from the center of the city

-0.109 Weak inverse relationship

Area of the home in square feet with number of garage

0.028 Weak positive relationship

Area of the home in square feet with number of bathrooms

0.011 Weak positive relationship

Pool with distance from the center of the city -0.107 Weak inverse relationship

Pool with garage attached 0.148 Weak positive relationship

Pool with number of bathrooms 0.036 Weak positive relationship

Distance from center of the city with garage -0.533 Weak inverse relationship

Distance from the center of the city with number of bathrooms

-0.286 Weak inverse relationship

Garage with the number of bathrooms 0.224 Weak positive relationship

Multicollinearity Problem:

There is no problem of Multicollinearity because all the values of correlations between the independent variables are less than 0.7.

d) Conduct the global test on the set of independent variables. Interpret.

The global test:

The global test on the set of independent variables is given bellow

Page 24: Satistic Assignment 2

Step 1: H0: β1= β2= β3= β4=β5= β6=0H1: Not all the ’s are zeroβ

Step 2: Significance Level = 0.05α

Step 3: F-test statistic will be used.

Step 4: Formulate the decision rule:-If P-value < - value than Hα o will be rejected.If P-value > - value than Hα o will be accepted

Step 5: Making calculation and taking decision:-

Here,

The statistical problem is solved by using SPSS software; the output of the solution is given bellow:

Table# 05-D

Decision:

Since P-value (.000) < - value (.05), Hα 0 should be rejected, and H1 is accepted.

i.e. Not all the ’s are zeroβ

That is at least one variable has significant effect.

Page 25: Satistic Assignment 2

This means that the regression model is valid; the independent variables have enough capability to estimate the selling prices of the homes.

e) Conduct a test of hypothesis on each of the independent variables. Would you consider deleting any of the variables? If so which ones?

Test of hypothesis on each of the independent variables:

Test of hypothesis on each of the independent variables is given below

Step 1:

H0: β1=0, β2=0, β3=0, β4=0, β5=0, β6=0H1: β1≠0, β2≠0, β3≠0, β4≠0, β5≠0, β6≠0

Step 2: Level of significance, = 0.05α

Step 3: t- test statistic will be used.

Step 4: Formulate the decision rule:-

If P-value < - value than Hα o will be rejectedIf P-value > - value than Hα o will be accepted

Step 5:

Here,

The statistical problem is solved by using SPSS software; the output of the solution is given bellow:

Table# 05-E

Page 26: Satistic Assignment 2