Correlations

Column

Pearson Correlation

Pearson Correlation

Spearman Rank correlation

Spearman Rank correlation

\[ 1 - \frac{6\left( \sum d^2 + \frac{t^3-t}{12} \right)}{n(n^2-1)}\]

The adjustment for tied values \[ \frac{t^3-t}{12} \], where \(t\) is the number of tied values

Hypothesis Testing

Correlation Coefficient - Hypothesis Testing

Formulas

\[ \rho_{XY} \]

Chi Square Tests

Column

Chi Square Tests

There are two types of Chi-Square Test

Testing Goodness of Fit

A Chi Square Test is often used to measure a goodness of fit between an observed and expected distribution of values. Knowing how to perform a Chi Square Test can be useful for testing probable to expected outcomes, fitting points to a curve, or testing a statistical hypothesis.

2. Chi square test of independence

If the columns are not contingent on the rows, then the rows and column frequencies are independent. The test of whether the columns are contingent on the rows is called the chi square test of independence. The null hypothesis is that there is no relationship between row and column frequencies.

Chi Square Testing for Goodness of Fit

Testing Goodness of Fit

Contingency tables are used to examine the relationship between subjects’ scores on two categorical variables.

Chi square test of independence

If the columns are not contingent on the rows, then the rows and column frequencies are independent. The test of whether the columns are contingent on the rows is called the chi square test of independence. The null hypothesis is that there is no relationship between row and column frequencies.

Chi-Square Testing
  • Expected Values under the null hypothesis (here)
  • Chi-Square Exercise (here)

Test Statistic

For this test we used the chi-squared test statistic which is given by: \[\begin{equation} X^2 = \sum_{i=1}^{n} {(O_i - E_i)^2 \over E_i} \end{equation}\]

The Chi Square test tests a null hypothesis stating that the frequency distribution of certain events observed in a sample is consistent with a particular theoretical distribution. The events considered must be mutually exclusive and have total probability 1. A common case for this is where the events each cover an outcome of a categorical variable.

  • \(X^2\) = the test statistic that asymptotically approaches a \(\chi^2\) distribution.
  • \(O_i\) = an observed frequency;
  • \(E_i\) = an expected (theoretical) frequency, asserted by the null hypothesis;
  • $n $ = the number of possible outcomes of each event.

The chi-square statistic can then be used to calculate ap-value by comparing the value of the statistic to a chi-square distribution. The number of degrees of freedom is equal to the number of cells n'', minus the reduction in degrees of freedom,p’’.

Chi-Square Testing

  • Chi Square Test- computing the expected values - Here
  • Chi Square Exercise - Here
Chi Square Test
  • Computing the Chi-Square Test Statistic - HERE.
  • Determining the Chi-Square Critical Value - HERE.
  • Chi Square Worked Example Part 1 - HERE
  • Chi Square Worked Example Part 2 - HERE

Testing Goodness of Fit

Contingency tables are used to examine the relationship between subjects’ scores on two categorical variables.

Worked Examples

Worked Examples 1

One of the questions on a business magainzes subscribers only study was:

“In the past 12 months, when travelling for business, what types of airline tickets did you purchase most often?”

The data obtained are show in the table below

Domestic Flight International Flight
First Class 65 55
Business Class / Executive 140 100
Economy 520 120
Exercises
  • Using a 5% significance level, test for the independence of type of flight and type of ticket. What is your conclusion?
Solution

Other Videos

  • Chi Square Test- computing the expected values - Here
  • Chi Square Exercise - Here