ALTKLAUSURFRAGEN Flashcards
Explain briefly the aims of inferential and descriptive statistics.
ALTKLAUSURFRAGE
Similarities:
All four commands are used for data handling and loading in R.
They allow for accessing, manipulating, or loading data into the R environment.
They play a role in data analysis and programming tasks in R.
Differences:
- data() is specifically used to load built-in datasets in R by their names.
- read.table() is employed for reading data from external text files and creating a data frame.
- source() executes R code stored in external files, often used for loading functions or scripts.
- load() loads previously saved R objects, such as data frames or models, into the R environment.
Explain briefly the aims of inferential and descriptive statistics.
ALTKLAUSURFRAGE
Descriptive Statistics:
Descriptive statistics aims to describe and summarize the main characteristics of a dataset. It helps to understand the data by providing measures like averages, ranges, and graphs that give us a clear picture of what the data looks like.
Inferential Statistics:
Inferential statistics aims to make predictions and draw conclusions about a larger group based on a smaller sample. It uses probability and statistical techniques to analyze the sample data and make inferences about the population as a whole.
In summary, descriptive statistics focuses on summarizing and describing data, while inferential statistics aims to draw conclusions and make predictions about populations based on sample data.
Assign the letters of the following explanations to the commands below:
A) store a complete workspace with all objects in a RData file
B) store session R commands from your current workspace in a text file C) store data into a flat text file
D) store a single object into a given filename
E) save current R plot an in image file
F) load and execute R code from a flat file
Here are the commands - write the right letter A-F after the commmand (one letter above is wrong):
- write.table
- savehistory
- saveRDS
- source
- save.image
Here are the assigned letters for each command:
write.table: C
savehistory: B
saveRDS: D
source: F
save.image: A (The previous answer marked this as E, which is incorrect)
Corrected assignment:
write.table: C
savehistory: B
saveRDS: D
source: F
save.image: A
Assign the letters of following explanations to the data structures below:
A) two dimensional data structure where every column can have a different data type
B) two dimensional data structure where every element must have the same data type
C) two or more dimensional data structure where every element must have the same data type
D) regular n * m structure where values represent counted items
E) more or less structured sequence of values of various types
F) sequence of values all of the same type
G) single value
A) two dimensional data structure where every column can have a different data type = data frame
B) two dimensional data structure where every element must have the same data type = matrix
C) two or more dimensional data structure where every element must have the same data type = array
D) regular n * m structure where values represent counted items = table
E) more or less structured sequence of values of various types = list
F) sequence of values all of the same type = vector
G) single value = scalar
Upps, the length in R for a vector is broken, you have to reimplement it. Write a function length which get’s a vector x as input and determines it’s length, so the number of elements, without using the broken function length. You an ignore the NA’s. Hint: Use a loop.
custom_length <- function(x) {
count <- 0
for (element in x) {
if (!is.na(element)) {
count <- count + 1
}
}
return(count)
}
Create two or three logical sentences using the terms: conformational switch, sequence, sequence homology, twilight zone, psipred, chou-fasman, secondary structure prediction, relative frequency.