Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Summary

Summary Chi-square

Rating
-
Sold
-
Pages
4
Uploaded on
15-01-2025
Written in
2024/2025

This document provides a detailed explanation of the Chi-Square test, including its concepts, applications, and step-by-step procedures. It covers key topics such as hypothesis testing, assumptions, types of Chi-Square tests (Goodness-of-Fit and Test of Independence), and interpretation of results. Examples with detailed solutions are included to enhance understanding. Whether you're a student, researcher, or professional, this guide is an excellent resource for mastering the Chi-Square test.

Show more Read less
Institution
Course

Content preview

community project
encouraging academics to share statistics support resources
All stcp resources are released under a Creative Commons licence

stcp-karadimitriou-chisqR

The following resources are associated:
Summarising Categorical Data in R, Logistic Regression in R and the Excel dataset ‘Titanic.csv’


Chi-squared test for association in R
Research Question Type: Association of two categorical variables
What kind of variables: Categorical (nominal or ordinal with a few categories)
Common Applications: Association between two categorical variables.
The chi-squared test tests the hypothesis that there is no relationship between two categorical
variables. It compares the observed frequencies from the data with frequencies which would be
expected if there was no relationship between the variables.

Data: On April 14th 1912 the ship the Titanic sank. Only 705 passengers and crew out of the total
2228 population on board survived. Information on 1309 of those on board will be used to
demonstrate summarizing categorical variables.
After saving the ‘Titanic.csv’ file somewhere on your computer, open the data, call it TitanicR and
define it as a data frame. Attach the data so variables can be referred to by their column name.
TitanicR<-data.frame(read.csv('...\\Titanic.csv',header=T,sep=','))
attach(TitanicR)




R needs to know which variables are categorical variables and the labels for each value which can
be specified using the factor command.
variable<-factor(variable,c(category numbers),labels=c(category names)).
The values are as follows: survival (0=died, 1=survived), Gender (0 = male, 1 = female), Country of
Residence (Residence=American, British, Other).
survived<-factor(survived,c(0,1),labels=c(‘Died','Survived'))
Residence<-
factor(Residence,levels=c(0,1,2),labels=c('American','British','Other'))
Gender<-factor(Gender,levels=c(0,1),labels=c('Male','Female'))

© Sofia Maria Karadimitriou and Ellen Marshall Reviewer: Paul Wilson
University of Sheffield University of Wolverhampton
Based on material provided by Mollie Gilchrist and Peter Samuels of Birmingham City University

Written for

Institution
Course

Document information

Uploaded on
January 15, 2025
Number of pages
4
Written in
2024/2025
Type
SUMMARY

Subjects

$20.99
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
mankchaudhary

Get to know the seller

Seller avatar
mankchaudhary Self
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
1 year
Number of followers
0
Documents
4
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions