6: Introduction to Statistics in R

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

1/18

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 11:02 PM on 7/29/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

19 Terms

1
New cards

FRONT

BACK

2
New cards

What function allows you to calculate the variance of a dataset?

var()

3
New cards

What function allows you to calculate the standard deviation of a dataset?

sd()

4
New cards

What function splits data into values that represent fractions of the data? What is the default fraction that splits the function evenly? How would you code using this function to split code evenly using a different fraction, as well as unevenly?

quantile()

fourths

quantile(data, probs = seq(lowBound, upBound, fraction)

quantile(data, probs = c(split1, split2, split3))

5
New cards

What is the IQR?

The interquartile range is the range between the 25th and 75th percentile

6
New cards

What is a good general test for what counts as an outlier?

x < Q1 - 1.5 * IQR | data > Q3 + 1.5 * IQR

7
New cards

What function allows you to get a number of random rows from a dataset? What is replacement, and how would you code an argument of the aforementioned function to have replacement?

slice_sample()

Replacement means nothing is taken out when a row is sampled

slice_sample(replace = TRUE)

8
New cards

How do you set a seed for randomness?

set.seed(seedNum)

9
New cards

What function calculates the probability a value picked randomly within a range will fall on one side of a specified, different value? What side of the specified value does the function calculate the probability for, and how would you code the function so that the probability is calculated for the opposite side?

punif()

The probability is usually calculated for the left side

punif(lower.tail = FALSE)

10
New cards

What function generates random decimal numbers?

runif()

11
New cards

What function generates random boolean values that can be weighted towards 0 or 1? What are the main arguments for this function?

rbinom(numTrials, numberOfBools, probability)

12
New cards

What function gives the probability of a particular binomial distribution occurring from a specific set of circumstances? What are the main arguments for this function?

dbinom(numOfOnes, numTrials, wtTowardsOne)

13
New cards

What function gives the probability of a range of binomial distributions occurring from a specific set of circumstances? What are the main arguments for this function? What is the default range for the default arguments?

pbinom(numOfOnes, numTrials, wtTowardsOne, lower.tail)

Default range is zero to numOfOnes

14
New cards

What is the standard normal distribution?

When the mean is zero and the standard deviation is 1

15
New cards

What function gives a projected percentage of a dataset’s datapoints that lie on one side of specified point? What is the default side this function looks at, and how would you code this function’s main arguments?

pnorm(point, mean, sd, lower.tail)

The default side is to the left of the specified point

16
New cards

What function gives a point that a projected percentage of a dataset’s datapoints lie on one side of? What is the default side this function looks at, and how would you code this function’s main arguments?

qnorm(percentage, mean, sd, lower.tail)

The default side of the percentage is on the left

17
New cards

What function generates random datapoints for a specified normal distribution? How would you code its main arguments?

rnorm(nPoints, mean, sd)

18
New cards

FIRST PASS

FIRST PASS

19
New cards

SECOND PASS

SECOND PASS