STAT 230: R, Hypothesis Testing & Categorical Data

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/60

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 9:10 PM on 10/15/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

61 Terms

1
New cards

What does margin= 1 mean?

Our rows add up to 1.

2
New cards

What must we interpret when running a t-test or chi-square test?

The p-value.

3
New cards

What is tabular data?

Columns are variables and rows are observational units.

4
New cards

What are observational units?

The person or object on which the data is collected.

5
New cards

What is the difference between a vector and a dataframe?

A vector is a 1-dimensional list of items of the same data type; a dataframe is a 2-dimensional table made up of multiple equal-length vectors.

6
New cards

What does the mutate() function do?

Creates new columns in a dataset and can also edit existing columns.

7
New cards

What does the distinct() function do?

Helps find unexpected categories and typos.

8
New cards

Which ggplot theme is the default theme?

Theme_gray.

9
New cards

What is a type 1 error?

Rejecting H0 when it is actually true.

10
New cards

What is a type 2 error?

Failing to reject H0 even though the alternative is true.

11
New cards

What is the difference between an error message and a warning message?

Error messages indicate R could not complete the command; warning messages indicate R completed the command but something may be wrong.

12
New cards

What does the filter() function do?

Conditions must evaluate to TRUE or FALSE; filtering keeps rows that meet a condition.

13
New cards

What does the select() function do?

Select chooses columns from a dataset without changing the number of rows.

14
New cards

True or false: t.test() can handle more than 2 groups.

False.

15
New cards

What does a large t-statistic mean?

Our observed difference is far from what we expect under the Null Hypothesis.

16
New cards

What does a higher standard error generally mean?

Our sample statistic could largely vary from the population parameter.

17
New cards

What does a small t-statistic mean?

Our observed difference is close to what we expect under the Null Hypothesis.

18
New cards

What is a parsing problem?

When R cannot convert raw data into the expected data type.

19
New cards

What is the general definition of the Standard Error?

How much, on average, the sample difference in means varies from the population difference in means.

20
New cards

What does a higher Standard Error mean?

Our sample statistic could largely vary from the population parameter.

21
New cards

True or False: If a 95% confidence interval includes 0, we fail to reject the null hypothesis?

True.

22
New cards

What is the difference between statistical significance and practical significance?

Statistical significance is when the p-value is low; practical significance is when we decide if it is helpful and of real-world importance.

23
New cards

Why is random assignment important in an experiment?

Helps reduce confounding.

24
New cards

What do population assumptions allow us to do?

Calculate P-value and build confidence intervals.

25
New cards

What is a joint distribution?

Shows counts or proportions for combinations of two variables using an AND statement.

26
New cards

What is Marginal distribution?

Only mentions one variable.

27
New cards

What is conditional distribution?

Shows the distribution of one variable within levels of another variable.

28
New cards

What is sampling distribution?

Shows the distribution of a statistic across repeated samples.

29
New cards

What do confounders influence?

The explanatory variable and the outcome.

30
New cards

What is the most powerful tool we have to make causal claims?

Randomized experiments.

31
New cards

What is the impact of random assignment in experiments?

It allows us to isolate the effect of the treatment and helps eliminate confounding.

32
New cards

What makes a good experiment?

Comparison group, replication, random assignment, clear and consistent measurement of outcomes.

33
New cards

When analyzing the effect of a specific treatment, which type of distribution is generally the most informative?

Conditional distribution.

34
New cards

What does the Z-statistic measure in a two-proportion test?

The difference between observed difference and the hypothesized difference.

35
New cards

What is the primary purpose of a 'Contingency Table'?

To display counts for combinations of categorical variables.

36
New cards

What is the Z statistic null hypothesis?

Π1 - π2.

37
New cards

What does the chi-square test measure?

The total scaled difference between the observed counts in the data and the counts we would expect if the variables were independent.

38
New cards

Under what conditions can we conclude that a significant chi-square result provides evidence of a 'causal association'?

Only if the data were collected through a randomized experiment.

39
New cards

What are the appropriate null and alternative hypotheses for a chi-square test for the association of two variables?

H0: The variables are independent; Ha: The variables are associated.

40
New cards

How should a researcher interpret a specific 'chi-square contribution' or 'residual' for a single cell in a table?

It shows the cell-level difference between what was observed and what was expected.

41
New cards

What does a negative value in test$residuals indicate?

The observed count is below the expected count.

42
New cards

True or False: A 'Proportion' in categorical data can be thought of as the mean of a variable coded only as 0s and 1s.

True.

43
New cards

What does the Z-statistic represent in a two-proportion test?

The difference between our observed difference and our hypothesized difference, measured in standard units.

44
New cards

True or False: If you run a prop.test() with a one-sided alternative, the resulting confidence interval will be a standard two-sided interval.

False.

45
New cards

Why might a researcher run prop.test() twice when dealing with a one-sided research question?

To check for coding errors and to get a one-sided p-value for the test.

46
New cards

When using the sample() function to simulate drawing a sample from a large population, why is replace = TRUE typically used?

It allows values to be sampled more than once.

47
New cards

What is a key requirement for using map_dbl() instead of a standard for loop?

Each iteration of the code must be independent of the others.

48
New cards

When is the chisq.test() function in R considered reliable?

When all expected counts are at least 5.

49
New cards

True or False: When expected counts are very small, the true sampling distribution of the chi-square statistic becomes 'discrete and clumpy'.

True.

50
New cards

What is the difference between a population parameter and sample statistic?

A population parameter describes a characteristic of an entire group; a sample statistic is calculated from a small subset used to estimate that population value. Population parameters are greek symbols. sample statistics have roman symbols with hats on them.

51
New cards

What are the correct null and alternative hypothesis for a t.test?

For two sample t-test

Ho: u1-u2 = 0

Ha: u1-u2 does not = 0

for one sample t-test

Ho: u=u0

Ha: u does not = u0

52
New cards

What are the correct and null hypothesis for a z-test?

For 2 proportions

Ho: Π1- π2 = 0

Ha: Π1- π2 > 0

for one proportion

Ho: Π=π0

Ha: Π > π0

53
New cards

What are the correct and null hypothesis for a chi-square test?

No equation just

Ho: they are independent

Ha: they are associated

54
New cards

what is a Double

Real numbers that can have decimal points or continuous values (e.g., 28.15, 0.75)

55
New cards

what is a factor?

Categorical variables with defined, fixed categories called levels (e.g., a variable storing "Men" and "Women" as distinct groups for modeling)

56
New cards

what is a character?

Plain text surrounded by quotes (e.g., "Home", "Away", "Basketball")

57
New cards

what is an integer?

Whole counting numbers without decimals (e.g., 1, 45, 122)

58
New cards

what is a logical?

Boolean values that are strictly TRUE or FALSE

59
New cards

what is a response variable?

Y: The outcome or result you are measuring, predicting, or trying to explain

60
New cards

What is an explanatory variable?

X: The variable you hypothesize influences, explains, or predicts changes in the response

61
New cards

Still learning (50)

You've started learning these terms. Keep it up!