The Book of R by Tilman M. Davies
Author:Tilman M. Davies
Language: eng
Format: epub, mobi, pdf
Publisher: No Starch Press, Inc.
Published: 2016-08-24T16:00:00+00:00
18.4.1 Single Categorical Variable
Like the Z-test, the one-dimensional chi-squared test is also concerned with comparing proportions but in a setting where there are more than two proportions. A chi-squared test is used when you have k levels (or categories) of a categorical variable and want to hypothesize about their relative frequencies to find out what proportion of n observations fall into each defined category. In the following examples, it must be assumed that the categories are mutually exclusive (in other words, an observation cannot take more than one of the possible categories) and exhaustive (in other words, the k categories cover all possible outcomes).
I’ll illustrate how hypotheses are constructed and introduce the relevant ideas and methods with the following example. Suppose a researcher in sociology is interested in the dispersion of rates of facial hair in men of his local city and whether they are uniformly represented in the male population. He defines a categorical variable with three levels: clean shaven (1), beard only or moustache only (2), and beard and moustache (3). He collects data on 53 randomly selected men and finds the following outcomes:
R> hairy <- c(2,3,2,3,2,1,3,3,2,2,3,2,2,2,3,3,3,2,3,2,2,2,1,3,2,2,2,1,2,2,3,
2,2,2,2,1,2,1,1,1,2,2,2,3,1,2,1,2,1,2,1,3,3)
Now, the research question asks whether the proportions in each category are equally represented. Let π1, π2, and π3 represent the true proportion of men in the city who fall into groups 1, 2, and 3, respectively. You therefore seek to test these hypotheses:
Download
The Book of R by Tilman M. Davies.mobi
The Book of R by Tilman M. Davies.pdf
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Deep Learning with Python by François Chollet(12633)
Hello! Python by Anthony Briggs(9946)
OCA Java SE 8 Programmer I Certification Guide by Mala Gupta(9818)
The Mikado Method by Ola Ellnestam Daniel Brolund(9810)
Dependency Injection in .NET by Mark Seemann(9367)
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(8331)
Test-Driven iOS Development with Swift 4 by Dominik Hauser(7787)
Grails in Action by Glen Smith Peter Ledbrook(7719)
The Well-Grounded Java Developer by Benjamin J. Evans Martijn Verburg(7590)
Becoming a Dynamics 365 Finance and Supply Chain Solution Architect by Brent Dawson(7344)
Microservices with Go by Alexander Shuiskov(7109)
Practical Design Patterns for Java Developers by Miroslav Wengner(7027)
Test Automation Engineering Handbook by Manikandan Sambamurthy(6973)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(6442)
Angular Projects - Third Edition by Aristeidis Bampakos(6386)
The Art of Crafting User Stories by The Art of Crafting User Stories(5912)
NetSuite for Consultants - Second Edition by Peter Ries(5826)
Demystifying Cryptography with OpenSSL 3.0 by Alexei Khlebnikov(5639)
Kotlin in Action by Dmitry Jemerov(5089)
