Upload
emranul-islam-shovon
View
42
Download
2
Embed Size (px)
DESCRIPTION
Statistic Lab
Citation preview
10
1. First enter the Real estate data (text book data set 1) into SPSS and then
select a sample of size, n = last two digits of your ID and answer the
exercises.
I. Select an appropriate class interval and organize the “Selling price” into
a frequency distribution.
II. Compute the Mean, Median, Mode, Standard Deviation, Variance,
Quartiles, 9th Decile, 10th Percentile and Range of “Selling price” from
the raw data of your sample and interpret.
III. Develop a histogram (Using question “1”) for the variable “selling
cost”.
IV. Develop a Pie chart and a Bar diagram for the variable “Township”.
V. Develop a Box plot for the variable “Distance”.
What information can you give from these plots?
Note: Comment on all your findings, charts and diagrams.
10
Answer to the question No.1II. Computation of the Mean, Median, Mode, Standard Deviation, Variance, Quartiles, 9th
Deciles, 10th Percentile and Range of “Selling price” from the raw data of sample, n=64 :
From SPSS output, we get,Selling Price in TK. 000 (Thousand)
N Valid 64
Missing 0
Mean 2192.659
Median 2090.500
Mode 1880.3(a)
Std. Deviation 462.2481
Variance 213673.30
4
Percentiles 10 1707.000
20 1807.000
25 1880.300
30 1910.550
40 2050.100
50 2090.500
60 2220.100
70 2415.350
75 2468.050
80 2540.300
90 2930.350
Interpretation
Mean: On average the selling price of homes sold in Denver, Colorado is about TK. 2192.659
(Thousands).
Median: 50% of the selling price sold in Denver, Colorado is less than TK. 2090.500
(Thousands) and 50% of the selling price is above TK. 2090.500 (Thousands).
10
Mode: The maximum number of selling price of homes is TK1880.3 (Thousands) which appears
more than any other selling price. In other words the homes has been sold maximum in the price
of TK. 1880.3 (Thousands).
Std. Deviation: The actual amount of selling price of homes on average differs/varies from the
mean selling price TK2192.659thousands by TK462.2481 (Thousands).
Variance: The average variation of the selling price is Tk. 213673.304 (thousands).
Range: The range of selling price of homes is TK. 2199.4 (Thousands) where highest amount of
selling price of homes is TK.3450.3 (Thousands) and lowest amount of selling price of homes is
TK.1250.9 (Thousands).
Quartiles: The selling price of first 25% homes is equal or less than TK. 1880.300 thousands
and 75% homes is higher than TK. 1880.300 thousands that is presented as the first quartile, =
TK. 1880.300 thousands.
The median amount of selling price of homes is given by second quartile, =TK. 2090.500
(Thousands) i.e. the selling price of the 50% homes is less than TK2090.500 (Thousands) and the
selling price of the other 50% homes is higher than TK2090.500 (Thousands) .
The Selling price of the 75% homes is equal or less than TK. 2468.050 thousands and 25%
homes is higher than TK. 2468.050 thousands, denoted as third quartile, =TK. 2468.050
thousands.
9th Deciles: The selling price of the 90% homes sold in Denver, Colorado is equal or less than
TK. 2930.350 (Thousands) and 10% homes are above TK. 2930.350 (Thousands) .
10
10th Percentile: The selling price of the first 10 percent homes is equal or less than Tk.
1707.000 thousands i.e. given by or =Tk. 1707.000 and 90 % homes are above it.IV.
Pie chart for the variable “Township”
Figure: Pie chart for the variable “Township”
12.5%
25.0%
25.0%
17.19%
20.31%
BananiDhanmondiDOHSUttaraGulshan
Pie chart for the variable “Township”
Comment: From the pie chart we see that, 25.0% of the Township is in Dhanmondi, 25.0% of
the Township is in DOHS, 20.31% of the Township is in Gulsan, 17.19% of the Township is in
Uttara, and 12.5% of the Township is in Banani. We also see that, the largest percentage of
Township involves with Dhanmondi, DOHS and the lowest percentage of Township involves
with Banani.
10
Figure: Bar chart for the variable “Township”
BananiDhanmondiDOHSUttaraGulshan
Township
20
15
10
5
0
Freq
uenc
y
12.5%
25.0%25.0%
17.19%
20.31%
Comment: From the Bar chart we see that, 25% of the Township is in Dhanmondi, 25% of the
Township is in DOHS, 20.31% of the Township is in Gulsan, 17.19% of the Township is in
Uttara, and 1205% of the Township is in Banani. We also see that, the largest percentage of
10
Township involves with Dhanmondi, DOHS and the lowest percentage of Township involves
with Banani.
V. Box plot for the variable “Distance”
Figure: Box plot of “Distance”
Distance
30.0
25.0
20.0
15.0
10.0
5.0
__
Comment: There is no outlier. The median distance is 15 and about 50 percent distance is
between 11 to19.
10
2. For the variable “Selling price”
I. Determine the coefficient of skewness. Is the distribution positively or negatively
skewed?
II. Develop a Box plot. Are there any outliers
Answer to the question No.2I. From SPSS output, we get,
Statistics
Selling Price in TK. 000 (Thousand)
N Valid 64
Missing 0
Skewness .665
Std. Error of Skewness .299
Kurtosis .280
Std. Error of Kurtosis .590
10
3500.03000.02500.02000.01500.01000.0
Selling Price in TK. 000 (Thousand)
12
10
8
6
4
2
0
Freq
uenc
y
Mean = 2192.659Std. Dev. = 462.2481N = 64
Selling Price in TK. 000 (Thousand)
__
Comment: The distribution is positively skewed. Since mean is the largest and mode is the
smallest average.
ii. Box plot for the variable “Selling price”
10
Figure: Box plot of “Selling price”
Selling Price in TK. 000 (Thousand)
3500.0
3000.0
2500.0
2000.0
1500.0
1000.0
17
__
Comment: There is one outlier that is 17.
3. Refer to the Real Estate data, which reports information on the homes sold in Denver,
Colorado, last year. [Chapter-9]
I. Develop a 95 percent confidence interval for the mean selling price of the homes and interpret.
10
II. Develop a 95 percent confidence interval for the mean distance the home is from the center of
the city and interpret.
III. Develop a 95 percent confidence interval for the proportion of homes with an attached garage
and interpret.
Answer to the Question No.3
I. For 95 percent confidence interval for the mean selling price of the homes
Using SPSS we get the following output as-
One-Sample Statistics
One-Sample Test
One-Sample Test
Test Value = 0
t df Sig. (2-tailed)Mean
Difference
95% Confidence Interval of the Difference
Lower UpperSelling Price in TK. 000 (Thousand) 38.337 63 .000 2169.0381 2055.976 2282.100
So the 95% Confidence Interval for the mean selling price of the homes is ($2055.976,
$2282.100).
From the above table we have, Mean = 2169.038& Std. deviation 452.6248
The value of t at 95 % level of confidence & 63 df is 1.998 We know the confidence interval,
CI = ± t = 2192.659± 115.446 = ($1977.193, $2208.126) which is the 95% Confidence
Interval for the mean selling price of the homes.
N Mean Std. DeviationStd. Error
MeanSelling Price in TK. 000 (Thousand) 64 2169.038 452.6248 56.5781
10
Interpretation:
Probability ($1977.193≤ μ ≤ , $2208.126) = 0.95
The mean selling price of the homes ranges from $1977.193 to $2208.126 we are 95% confident
about it.
In other words, this interval ($2077.193, $2308.126) contains the population mean with
probability 0.95. If we take a sample of Selling Price 100 times this interval will contain the
population 95 times.
II. 95 percent confidence interval for the mean distance the home is from the center of the
city:
Using SPSS, we get the following output as-
One-Sample Statistics
N Mean Std. Deviation
Std. Error
Mean
Distance 64 14.91 5.291 .661
One-Sample Test
Test Value = 100
t df Sig. (2-tailed)
Mean
Difference
95% Confidence Interval
of the Difference
Lower Upper
Distance -128.670 63 .000 -85.094 -86.42 -83.77
95 percent confidence interval for the mean distance the home is from the center of the city (-
86.42, -83.77)
From the table we have, Mean=14.91& Std. deviation = 5.291
The value of t at 95 % level of confidence & 63df is 1.998
We know the confidence interval,
10
CI = ± t =14.91 ± (1.998)*( 5.291/7.94) = 14.91 ± 1.33 = (-86.42, -83.77)
Interpretation: Probability (-86.42≤ μ ≤ -83.77) = 0.95
The mean distance of the homes from the center of the city ranges from -86.42 miles to -83.77
miles we are 95 % confident about it.
In other words, the interval (from -86.42 miles, -83.77miles) contains the population mean with
probability 0.95. If we take a sample 100 times, this interval will contain the population 95 times.
III. 95 percent confidence interval for the proportion of homes with an attached garage
Garage Attached
Frequency Percent Valid Percent
Cumulative
Percent
Valid No 23 35.9 35.9 35.9
Yes 41 64.1 64.1 100.0
Total 64 100.0 100.0
We know, the sample proportion of homes with an attached garage,
= = 41/64 = 0.64
Thus we estimate 64 percent of the homes with an attached garage.
We determine the 95 % Confidence Interval for the proportion of homes with an attached garage
as
± z =.64±1.96√.64(1-.64)/64=.64 ± 0.1176= .5224, .7576
Interpretation: The proportion of homes with an attached garage ranges from (52-76) and we
are 95% confident about it.
10
4. Refer to the Real Estate data, which report information on the homes sold in Denver,
Colorado, last year. [Chapter-10]
I. A recent article in the Denver Post indicated that the mean selling price of the homes in the
area is more than $2200. Can we conclude that the mean selling price in the Denver area is more
than $2200? Use the .01 significance level. What is the p-value?
II. The same article reported the mean size was more than 2100 square feet. Can we conclude
that the mean size of homes sold in the Denver area is more than 2100 square feet? Use the .01
significance level. What is the p-value?
Answer to the question No.4
i. Hypothesis testing:
Step1: State the Null Hypothesis (H0) and Alternative Hypothesis (H1)
H0 : μ ≤ $ 2200 i.e.; mean selling price of homes in Denver is not more than $2200
H1 : μ > $ 2200 i.e.; mean selling price of homes in Denver is more than $2200
Step 2: select the level of significance
Here, the level of significance is, α = .01
Step 3: Determine the appropriate test statistic
t-test statistic will be used here.
Step 4: Formulate the decision rule
If p-value < α – value (or calculated value is greater than critical value), H0 is rejected
If p-value > α- value (or calculated value is less than critical value), H0 is accepted
Step 5: Select the sample, perform the calculations and make a decision
From SPSS output, we get, One-Sample Statistics
N Mean Std. Deviation
Std. Error
Mean
Selling Price in TK.
000 (Thousand)64 2192.659 462.2481 57.7810
10
One-Sample Test
Test Value = 2200
t df Sig. (2-tailed)
Mean
Difference
99% Confidence Interval
of the Difference
Lower Upper
Selling Price in TK.
000 (Thousand)-.127 63 .899 -7.3406 -160.815 146.134
We get, p-value=.899/2=.449
Decision: Since the computed value of the test statistic (t= -.127) is less than the critical value
(2.387) and P-value (.449) > α (.01). So we accept H0.
Comment:
So, we can conclude that the mean selling price of homes in Denver is not more than 2200
ii. Hypothesis testing:
Step1: State the Null Hypothesis (H0) and Alternative Hypothesis (H1)
H0: µ 2100
H1: µ> 2100
Here, H0 = mean size of the homes sold in the Denver area is not more than 2100 square feet
Here, H1 = mean size of the homes sold in the Denver area is more than 2100 square feet
Step 2: select the level of significance
Here the level of significance is, α = .01
Step 3: Determine the appropriate test statistic
t-test statistic will be used here.
Step 4: Formulate the decision rule
If p-value < α- value, H0 will be rejected
10
If p-value > α- value, H0 will be accepted.
Step 5: Select the sample, perform the calculations and make a decision
From SPSS output, One-Sample Statistics
N Mean Std. Deviation
Std. Error
Mean
Size of the Home
in Square Feet64 2223.44 264.120 33.015
One-Sample Test
Test Value = 2100
t df Sig. (2-tailed)
Mean
Difference
99% Confidence Interval
of the Difference
Lower Upper
Size of the Home
in Square Feet3.739 63 .000 123.438 35.74 211.13
So, p-value = .001/2=.0005
Decision: Since P-value (0.0005) < α (.01) and (Calculated value, 3.739is larger than the critical
value or tabulated value 2.387). So we reject H0.
Comment:So, we can conclude that mean size of the homes sold in the Denver area is more than 2100
square feet.