get_chisqr_stat: Calculates the chi-square statistic

View source: R/SDS100_get_statistics.R

get_chisqr_statR Documentation

Calculates the chi-square statistic

Description

Calculates the chi-square statistic

Usage

get_chisqr_stat(observed_counts, expected_proportions)

Arguments

observed_counts

A vector of observed count data.

expected_proportions

A vector indicating the expected probability that data comes from a given group.

Examples

 set.seed(100)
 observed_counts <- c(138, 99, 106, 115, 104, 164)
 expected_proportions = c(1/6, 1/6, 1/6, 1/6, 1/6, 1/6)
 get_chisqr_stat(observed_counts, expected_proportions)


emeyers/SDS100 documentation built on April 28, 2024, 5:07 p.m.