# 7.1.11 - Question 2: Matching Perceptions

7.1.11 - Question 2: Matching Perceptions## Example 7-11: Spouse Data (Question 2)

Next, we will return to the second question posed earlier in this lesson.

### Question 2: Do the husbands and wives accurately perceive the responses of their spouses?

To understand this question, let us return to the four questions asked of each husband and wife pair. The questions were:

- What is the level of passionate love you feel for your partner?
- What is the level of passionate love your partner feels for you?
- What is the level of companionate love you feel for your partner?
- What is the level of companionate love your partner feels for you?

Notice that these questions are all paired. The odd-numbered questions ask about how each person feels about their spouse, while the even-numbered questions ask how each person thinks their spouse feels towards them. The question that we are investigating now asks about perception, so here we are trying to see if the husbands accurately perceive the responses of their wives and conversely to the wives accurately perceive the responses of their husbands.

In more detail, we may ask:

In this case, we are asking if the wife accurately perceives the amount of passionate love her husband feels toward her.

Here, we are asking if the husband accurately perceives the amount of passionate love his wife feels toward him.

- Does the husband's answer to question 1 match the wife's answer to question 2?
- Secondly, does the wife's answer to question 1 match the husband's answer to question 2?
- Similarly, does the husband's answer to question 3 match the wife's answer to question 4?
- Does the wife's answer to question 3 match the husband's answer to question 4?

To address the research question we need to define four new variables as follows:

- \(Z_{i1} = X_{1i1} - X_{2i2}\) - (for the \(i^{th}\) couple, the husband's response to question 1 minus the wife's response to question 2.)
- \(Z_{i2} = X_{1i2} - X_{2i1}\) - (for the \(i^{th}\) couple, the husband's response to question 2 minus the wife's response to question 1.)
- \(Z_{i3} = X_{1i3} - X_{2i4}\) - (for the \(i^{th}\) couple, the husband's response to question 3 minus the wife's response to question 4.)
- \(Z_{i4} = X_{1i4} - X_{2i3}\) - (for the \(i^{th}\) couple, the husband's response to question 4 minus the wife's response to question 3.)

These **Z**'s can then be collected into a vector. We can then calculate the sample mean for that vector...

\(\mathbf{\bar{z}} = \dfrac{1}{n}\sum_{i=1}^{n}\mathbf{Z}_i\)

as well as the sample variance-covariance matrix...

\(\mathbf{S}_Z = \dfrac{1}{n-1}\sum_{i=1}^{n}\mathbf{(Z_i-\bar{z})(Z_i-\bar{z})'}\)

Here we will make the usual assumptions about the vector \(Z_{i}\) containing the responses for the \(i^{th}\) couple:

- The \(Z_{i}\)'s have common mean vector \(\mu_{Z}\)
- The \(Z_{i}\)'s have common variance-covariance matrix \(\Sigma_{Z}\)
*Independence*. The \(Z_{i}\)'s are independently sampled.*Multivariate Normality*. The \(Z_{i}\)'s are multivariate normally distributed.

Question 2 is equivalent to testing the null hypothesis that the mean \(\mu_{Z}\) is equal to **0**, against the alternative that \(\mu_{Z}\) is not equal to **0** as expressed below:

\(H_0\colon \boldsymbol{\mu}_Z = \mathbf{0}\) against \(H_a\colon \boldsymbol{\mu}_Z \ne \mathbf{0}\)

We may then carry out the Paired Hotelling's T-Square test using the usual formula with the sample mean vector z-bar replacing the mean vector y-bar from our previous example, and the sample variance-covariance matrix \(S_{Z}\) replacing the sample variance-covariance matrix \(S_{Y}\) also from our previous example:

\(n\mathbf{\bar{z}'S^{-1}_Z\bar{z}}\)

We can then form the *F*-statistic as before:

\(F = \frac{n-p}{p(n-1)}T^2 \sim F_{p, n-p}\)

And, under \(H_{o} \colon \mu_{Z} = 0\) we will reject the null hypothesis \(H_{o}\) at level \(\alpha\) if this *F*-statistic exceeds the critical value from the *F*-table with *p* and *n*-*p* degrees of freedom evaluated at \(α\).

\(F > F_{p, n-p, \alpha}\)

The analysis may be carried out using the SAS program as shown below:

The SAS program hopefully resembles the program spouse.sas used to address question #1.

Download the SAS Program: spouse2.sas

Explore the code below to see how to find Hotelling's \(T^{2}\) using the SAS statistical software application.**Note**: In the upper right-hand corner of the code block you will have the option of copying (* *) the code to your clipboard or downloading (* *) the file to your computer.

```
options ls=78;
title "Paired Hotelling's T-Square: Matching Perceptions";
/* The differences 'd1' through 'd4' are defined
* and added to the data set.
*/
data spouse;
infile "D:\Statistics\STAT 505\data\spouse.csv" firstobs=2 delimiter=','
input h1 h2 h3 h4 w1 w2 w3 w4;
d1=h1-w2;
d2=h2-w1;
d3=h3-w4;
d4=h4-w3;
run;
proc print data=spouse;
run;
/* The iml code below defines and executes the 'hotel' module
* for calculating the one-sample Hotelling T2 test statistic.
* The calculations are based on the differences, which is why
* there is a single null vector consisting of only 0s.
* The commands between 'start' and 'finish' define the
* calculations of the module for an input vector 'x'.
* The 'use' statement makes the 'spouse' data set available, from
* which the difference variables are taken. The difference variables
* are then read into the vector 'x' before the 'hotel' module is called.
*/
proc iml;
start hotel;
mu0={0, 0, 0, 0};
one=j(nrow(x),1,1);
ident=i(nrow(x));
ybar=x`*one/nrow(x);
s=x`*(ident-one*one`/nrow(x))*x/(nrow(x)-1.0);
print mu0 ybar;
print s;
t2=nrow(x)*(ybar-mu0)`*inv(s)*(ybar-mu0);
f=(nrow(x)-ncol(x))*t2/ncol(x)/(nrow(x)-1);
df1=ncol(x);
df2=nrow(x)-ncol(x);
p=1-probf(f,df1,df2);
print t2 f df1 df2 p;
finish;
use spouse;
read all var{d1 d2 d3 d4} into x;
run hotel;
```

The output contains on its first page a printing of the data for each of the matrixes, including the transformations d1 through d4.

Page two contains the output from the iml procedure which carries out the Hotelling's \(T^{2}\) test. Again, we can see that \(\mu_{0}\) is defined to be a vector of 0's. The sample mean vectors are given under YBAR.

S is our sample variance-covariance matrix for the **Z**'s.

### Hotelling's T2 test for matched perceptions

To calculate the Hotelling T2 statistic for matched perceptions:

**Open**the ‘spouse’ data set in a new worksheet.**Name the columns**h1, h2, h3, h4, w1, w2, w3, and w4, from left to right.**Name new columns**diff1, diff2, diff3, and diff4.**Calc > Calculator****Highlight and select**'diff1' to move it to the Store result window.- In the Expression window,
**enter ‘h1’ - ‘w2’**. - Choose
**'OK'**. The first difference is created in the worksheet.

**Calc > Calculator****Highlight and select**'diff2' to move it to the 'Store result' window.- In the Expression window,
**enter ‘h2’ - ‘w1’**. - Choose
**'OK'**. The second difference is created in the worksheet.

**Calc > Calculator****Highlight and select**'diff3' to move it to the 'Store result' window.- In the Expression window,
**enter ‘h3’ - ‘w4’.** - Choose
**'OK'**. The third difference is created in the worksheet.

**Calc > Calculator****Highlight and select**'diff2' to move it to the 'Store result' window.- In the Expression window,
**enter ‘h4’ - ‘w3’.** - Choose
**'OK'.**The fourth difference is created in the worksheet.

**Stat > Basic Statistics > Store Descriptive Statistics****Highlight and select**all 4 difference variables (diff1 through diff4) to move them to the 'Variables' window.- Under Statistics,
**choose ‘Mean’, and then ‘OK’**. - Choose
**‘OK’**again. The 4 difference means are displayed in new columns in the worksheet.

**Data > Transpose Columns****Highlight and select**the 4 column names with the means from the step above.**Choose ‘After last column in use’ then ‘OK'**. The means are displayed in a single column in the worksheet.

**Name the new column of the numeric means ‘means’**for the remaining steps.**Data > Copy > Columns to Matrix****Highlight and select ‘means’**for the 'Copy from columns' window.**Enter the ‘M1’**in the In current worksheet window. Then choose**‘OK’.**

**Calc > Matrices > Transpose****Highlight and select ‘M1’**in the 'Transpose from' window and enter ‘M2’ in the 'Store result' window.- Choose
**‘OK’.**

**Stat > Basic Statistics > Covariance****Highlight and select**all 4 difference variables (diff1 through diff4) to move them to the Variables window.**Check the box to 'Store matrix' and then choose ‘OK’.**This will store the covariance matrix in a new variable ‘M3’.

**Calc > Matrices > Invert****Highlight and select ‘M3’**to move it to the 'Invert from' window.**Enter ‘M4’**in the 'Store result in' window and choose**‘OK’**. This will store the inverted covariance matrix in a new variable ‘M4’.

**Calc > Matrices > Arithmetic****Choose Multiply and enter M2 and M4,**respectively in the two windows.**Enter ‘M5’**as the name in the Store result window and then ‘OK’.

**Calc > Matrices > Arithmetic****Choose Multiply and enter M5 and M1**, respectively in the two windows.**Enter ‘M6’**as the name in the Store result window and then ‘OK’. The answer 0.2143 is displayed in the results window.

**Calc > Calculator****Enter C16**(or any unused column name) in the 'Store result' window.- In the Expression window,
**enter 0.2143 * 30**(this is the answer from 16b times the sample size). Choose ‘OK’. The value of the T2 statistic 6.43 is displayed in the worksheet under ‘C16’.

### Analysis

The Hotelling's \(T^{2}\) statistic comes out to be 6.43 approximately with a corresponding *F* of 1.44, with 4 and 26 degrees of freedom. The *p*-value is 0.24 which exceeds 0.05, therefore we do not reject the null hypothesis at the 0.05 level.

### Conclusion

In conclusion, we can state that there is no statistically significant evidence against the hypothesis that husbands and wives accurately perceive the attitudes of their spouses. Our evidence includes the following statistics: ( \(T^{2}\) = 6.43; *F* = 1.44; *d.f.* = 4, 26; *p* = 0.249).