SOLUTION: A realtor studies the relationship between the size of a house (in square feet) and the property taxes (in $) owed by the owner. The table below shows a portion of the data for 20

Algebra ->  Probability-and-statistics -> SOLUTION: A realtor studies the relationship between the size of a house (in square feet) and the property taxes (in $) owed by the owner. The table below shows a portion of the data for 20       Log On


   



Question 1163537: A realtor studies the relationship between the size of a house (in square feet) and the property taxes (in $) owed by the owner. The table below shows a portion of the data for 20 homes in a suburb 60 miles outside of New York City. [You may find it useful to reference the t table.]
Property
Taxes Size
21860 2486
17463 2447
18232 1851
15691 1000
43998 5688
33674 2547
15233 2221
16760 1913
18247 2013
16777 1368
15164 1393
36087 3099
31021 2808
42137 3322
14374 1582
38935 4096
25336 4047
22947 2471
16177 3551
29226 2845

a-1. Calculate the sample correlation coefficient rxy. (Round intermediate calculations to at least 4 decimal places and final answers to 4 decimal places.)

a-2. Interpret rxy.
a. The correlation coefficient indicates a positive linear relationship.
b. The correlation coefficient indicates a negative linear relationship.
c. The correlation coefficient indicates no linear relationship.
b. Specify the competing hypotheses in order to determine whether the population correlation coefficient between the size of a house and property taxes differs from zero.
a. H0: ρxy = 0; HA: ρxy ≠ 0
b. H0: ρxy ≥ 0; HA: ρxy < 0
c. H0: ρxy ≤ 0; HA: ρxy > 0

c-1. Calculate the value of the test statistic. (Round intermediate calculations to at least 4 decimal places and final answer to 3 decimal places.)

c-2. Find the p-value.
a. p-value < 0.01
b. p-value > or equal to 0.10
c. 0.05 < or equal to p-value < 0.10
d. 0.02 < or equal to p-value < 0.05
e. 0.01 < or equal to p-value < 0.02

d. At the 1% significance level, what is the conclusion to the test?
a. Reject H0; we can state size and property taxes are correlated.
b. Reject H0; we cannot state size and property taxes are correlated.
c. Do not reject H0; we can state size and property taxes are correlated.
d. Do not reject H0; we cannot state size and property taxes are correlated.

Answer by CPhill(2264) About Me  (Show Source):
You can put this solution on YOUR website!
```python?code_reference&code_event_index=2
import numpy as np
import scipy.stats as stats
# Data
taxes = np.array([21860, 17463, 18232, 15691, 43998, 33674, 15233, 16760, 18247, 16777, 15164, 36087, 31021, 42137, 14374, 38935, 25336, 22947, 16177, 29226])
size = np.array([2486, 2447, 1851, 1000, 5688, 2547, 2221, 1913, 2013, 1368, 1393, 3099, 2808, 3322, 1582, 4096, 4047, 2471, 3551, 2845])
# n
n = len(taxes)
# r_xy
r, p_val = stats.pearsonr(size, taxes)
# t-statistic for correlation
# t = r * sqrt(n-2) / sqrt(1-r^2)
t_stat = r * np.sqrt(n-2) / np.sqrt(1 - r**2)
print(f"Sample size n: {n}")
print(f"Correlation coefficient r_xy: {r:.4f}")
print(f"Test statistic t: {t_stat:.3f}")
print(f"p-value: {p_val:.10f}")

```
```text?code_stdout&code_event_index=2
Sample size n: 20
Correlation coefficient r_xy: 0.7587
Test statistic t: 4.940
p-value: 0.0001056345
```
Based on the data provided for the 20 homes, here is the statistical analysis of the relationship between house size and property taxes:
### a-1. Sample Correlation Coefficient $r_{xy}$
Using the formula for the Pearson correlation coefficient:
$$r_{xy} = \frac{\sum (x_i - \bar{x})(y_i - \bar{y})}{\sqrt{\sum (x_i - \bar{x})^2 \sum (y_i - \bar{y})^2}}$$
The calculated value is:
**$r_{xy} = 0.7587$**
### a-2. Interpretation of $r_{xy}$
Since $0.7587$ is a positive value, it indicates that as the size of the house increases, the property taxes also tend to increase.
**Correct Choice: a. The correlation coefficient indicates a positive linear relationship.**
---
### b. Competing Hypotheses
To determine if the population correlation coefficient ($\rho_{xy}$) differs from zero (indicating a significant relationship), we set up a two-tailed test:
* **$H_0: \rho_{xy} = 0$** (No correlation)
* **$H_A: \rho_{xy} \neq 0$** (Correlation exists)
**Correct Choice: a.**
---
### c-1. Test Statistic
The test statistic for the correlation coefficient follows a $t$-distribution with $n - 2$ degrees of freedom ($df = 18$):
$$t = \frac{r\sqrt{n-2}}{\sqrt{1-r^2}} = \frac{0.7587\sqrt{18}}{\sqrt{1-0.7587^2}} \approx 4.940$$
**Value of the test statistic: $4.940$**
### c-2. $p$-value
For a $t$-statistic of $4.940$ with $18$ degrees of freedom, the $p$-value is approximately $0.0001$.
**Correct Choice: a. $p\text{-value} < 0.01$**
---
### d. Conclusion to the Test
At the **1% significance level** ($\alpha = 0.01$), we compare the $p$-value to $\alpha$:
* Since $0.0001 < 0.01$, we **reject the null hypothesis ($H_0$)**.
* There is sufficient evidence to conclude that a linear relationship exists between house size and property taxes.
**Correct Choice: a. Reject $H_0$; we can state size and property taxes are correlated.**