Practical 1 Understanding Check

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

1/132

encourage image

There's no tags or description

Looks like no tags are added yet.

133 Terms

1
New cards

Object

What stores information in R?

2
New cards

Function

What is a set of instructions that runs a command called?

3
New cards

Argument

What is an input given to a function called?

4
New cards

Package

What is an add-on set of extra R functions called?

5
New cards

install.packages()

Which function downloads a package (needed only once)?

6
New cards

library()

Which function loads a package for the current session?

7
New cards

R project

What kind of folder acts as the working home for your files?

8
New cards

here()

Which function builds file paths from the project folder?

9
New cards

Portable and reproducible

Why is it better to use here() than a typed-out file path?

10
New cards

read.csv()

Which function reads a CSV file into a data frame?

11
New cards

Data frame

What is a table of rows and columns called in R?

12
New cards

Variable

What is a measured characteristic that varies called?

13
New cards

$

Which symbol selects a column from a data frame?

14
New cards

x[5]

What code picks the 5th value of x?

15
New cards

NA

What does R use to represent a missing value?

16
New cards

na.rm=T

Which argument tells a function to ignore missing values?

17
New cards

Preservation and incomplete remains

Why is missing data common in archaeology?

18
New cards

#

Which symbol starts a comment in R?

19
New cards

set.seed()

Which function makes random results repeatable?

20
New cards

subset()

Which function keeps only rows meeting a condition?

21
New cards

recode()

Which function renames categories?

22
New cards

|

Which symbol means "or" in R?

23
New cards

&

Which symbol means "and" in R?

24
New cards

ggplot()

Which function starts a plot?

25
New cards

aes()

Which function maps variables to plot axes?

26
New cards

geom_histogram()

Which function draws a histogram?

27
New cards

Histogram

What plot shows the distribution of one variable?

28
New cards

binwidth

Which argument sets the width of each histogram bar?

29
New cards

labs()

Which function sets axis labels and the title?

30
New cards

facet_wrap()

Which function splits a plot into panels by group?

31
New cards

ggsave()

Which function saves a plot to a file?

32
New cards

Reproducible workflow

Why should you save figures with code instead of by hand?

33
New cards

Units and labels

What should you double-check before analysing, since a plot label can be wrong?

34
New cards

Distribution

What is the overall pattern of how a variable's values occur called?

35
New cards

Unimodal

What is a distribution with one peak called?

36
New cards

Symmetric

What is a distribution with the same shape on both sides of the centre called?

37
New cards

Central tendency

Mean, median, and mode are all ways to measure the typical or middle value of a data set. What is the general name for the concept of a typical or middle value?

38
New cards

Dispersion

What is how spread out values are called?

39
New cards

Mean

What is the average value called?

40
New cards

Standard deviation

What measures the typical distance of values from the mean?

41
New cards

Descriptive statistics

What type of statistics summarise the sample?

42
New cards

mean()

Which function calculates the sample mean?

43
New cards

sd()

Which function calculates the sample standard deviation?

44
New cards

Normal distribution

What is the symmetric bell-shaped distribution called?

45
New cards

Gaussian

What is another name for the normal distribution?

46
New cards

Mean and standard deviation

What are the two parameters of a normal distribution?

47
New cards

Parameter

What is a value that defines a model called?

48
New cards

center of the curve

What does the mean control in a normal distribution?

49
New cards

width of the curve

What does the SD control in a normal distribution?

50
New cards

Two numbers describe all the data

Why is the normal distribution so useful?

51
New cards

Probability density

What is the height of the curve called?

52
New cards

dnorm()

Which function gives the probability density at a value?

53
New cards

pnorm()

Which function gives the proportion of data below a value?

54
New cards

rnorm()

Which function generates random numbers from a normal distribution?

55
New cards

About 34.1%

What percent of data falls between the mean and 1 SD above it?

56
New cards

About 84.1%

What percent of data falls below the mean plus 1 SD?

57
New cards

No

Does the percent of data within 1 SD change with different means and SDs?

58
New cards

No, all models are wrong

Does a model ever match real data perfectly?

59
New cards

stat_function()

Which ggplot function overlays a function curve on a plot?

60
New cards

after_stat()

Which ggplot function lets you use a calculated value, such as density, on an axis?

61
New cards

Sampling error

What is the random difference between a sample and its population called?

62
New cards

Chance in who is sampled

What causes sampling error?

63
New cards

Messier, less representative

What do small samples do to a histogram?

64
New cards

Simulation

What is generating fake data from a model called?

65
New cards

See what chance alone produces

Why simulate data?

66
New cards

Still do not match perfectly

How does simulated data compare to the model it came from?

67
New cards

nsim

What name is often used for the number of simulated values?

68
New cards

Imperfect model and sampling error

What are two reasons data differ from a model?

69
New cards

is.na()

Which function returns TRUE where a value is missing?

70
New cards

!

What symbol means "not" in R?

71
New cards

!is.na()

What code returns TRUE where a value is present?

72
New cards

Counts the TRUEs

What does sum() do to TRUE and FALSE values?

73
New cards

sum(!is.na(x))

What code gives the sample size excluding NAs?

74
New cards

x[5] > x

What code tests whether the 5th value of x is greater than every value in x?

75
New cards

sum(value > data)/n * 100

What code calculates a percentile rank?

76
New cards

Percentile rank

What is the percent of data below a given value called?

77
New cards

Z-score

What is the number of SDs a value is from the mean called?

78
New cards

(value minus mean) divided by SD

What is the Z-score formula?

79
New cards

Standardisation

What is converting data to Z-scores called?

80
New cards

scale()

Which function calculates Z-scores?

81
New cards

Z-score of 0

Which Z-score means a value equals the mean?

82
New cards

1

Which Z-score means a value is one SD above the mean?

83
New cards

0

What is the mean of a set of Z-scores?

84
New cards

1

What is the SD of a set of Z-scores?

85
New cards

Compare variables on the same scale

Why use Z-scores?

86
New cards

Standard normal distribution

What is a normal distribution with mean 0 and SD 1 called?

87
New cards

Z-scores are standardised

Why does pnorm(z, 0, 1) give the same result as pnorm(x, mean, sd)?

88
New cards

Population

What is the whole group we want to know about called?

89
New cards

Sample

What is the subset we actually measured called?

90
New cards

Parameter

What is a true population value called?

91
New cards

Statistic

What is a value calculated from a sample called?

92
New cards

Inferential statistics

What type of statistics uses a sample to learn about a population?

93
New cards

Descriptive describes sample, inferential infers population

What is the difference between descriptive and inferential statistics?

94
New cards

Estimate

What is a best guess of a parameter called?

95
New cards

Point estimate

What is a single best guess called?

96
New cards

Interval estimate

What is a range that shows uncertainty called?

97
New cards

Almost never

How often does a sample mean exactly equal the population mean?

98
New cards

Sample mean

In descriptive statistics, what is the best estimate of the population mean?

99
New cards

Standard error

What measures how spread out sample means would be across repeated samples bc of sampling error?

100
New cards

Confidence interval

What is a plausible range for a parameter called?