Skip to main content

Inference for Categorical Data in R

In this course you'll learn how to leverage statistical techniques for working with categorical data.

Start Course for Free
4 Hours14 Videos53 Exercises6,261 Learners
4000 XP

Create Your Free Account



By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA. You confirm you are at least 16 years old (13 if you are an authorized Classrooms user).

Loved by learners at thousands of companies

Course Description

Categorical data is all around us. It's in the latest opinion polling numbers, in the data that lead to new breakthroughs in genomics, and in the troves of data that internet companies collect to sell products to you. In this course you'll learn techniques for parsing the signal from the noise; tools for identifying when structure in this data represents interesting phenomena and when it is just random noise.

  1. 1

    Inference for a single parameter


    In this chapter you will learn how to perform statistical inference on a single parameter that describes categorical data. This includes both resampling based methods and approximation based methods for a single proportion.

    Play Chapter Now
    The General Social Survey
    50 xp
    Exploring consci
    100 xp
    Generating via bootstrap
    100 xp
    Constructing a CI
    100 xp
    Why more bootstraps?
    50 xp
    Interpreting a Confidence Interval
    50 xp
    CIs and confidence level
    50 xp
    SE with less data
    100 xp
    SE with different p
    100 xp
    The approximation shortcut
    50 xp
    CI via approximation
    100 xp
    Methods compared
    50 xp
  2. 2

    Proportions: testing and power

    This chapter dives deeper into performing hypothesis tests and creating confidence intervals for a single parameter. Then, you'll learn how to perform inference on a difference between two proportions. Finally, this chapter wraps up with an exploration of what happens when you know the null hypothesis is true.

    Play Chapter Now
  3. 4

    Comparing many parameters: goodness of fit

    The course wraps up with two case studies using election data. Here, you'll learn how to use a Chi-squared test to check goodness-of-fit. You'll study election results from Iran and Iowa and test if Benford's law applies to these datasets.

    Play Chapter Now

In the following tracks

Statistical InferenceStatistician


Nick SolomonBenjamin FederJonathan Ng
Andrew Bray Headshot

Andrew Bray

Assistant Professor of Statistics at Reed College

Andrew Bray is an assistant professor of statistics at Reed College. His interests are in computing, differential privacy, environmental statistics, and statistics education. He is a co-author of the infer package for tidy statistical inference.
See More

What do other learners have to say?

I've used other sites—Coursera, Udacity, things like that—but DataCamp's been the one that I've stuck with.

Devon Edwards Joseph
Lloyds Banking Group

DataCamp is the top resource I recommend for learning data science.

Louis Maiden
Harvard Business School

DataCamp is by far my favorite website to learn from.

Ronald Bowers
Decision Science Analytics, USAA