Questions and CORRECT Answers
> print("PSTAT 10") - CORRECT ANSWER - [1] "PSTAT 10"
>7+5*SQRT(9)-2 - CORRECT ANSWER - 20
example of character vector - CORRECT ANSWER - y<- c("one","two","three")
command that extracts the 4th element of x - CORRECT ANSWER - x[4]
barplot(H, xlab, ylab, main, names.arg, col, border)
Then names. arg is.... - CORRECT ANSWER - a vector of the names that will appear
under each bar
summary(x) - CORRECT ANSWER - prints the result of min, 1st Qu.,Median, Mean, 3rd
Qu., Max.
given the vector x<-3:7, the length of x is: - CORRECT ANSWER -5
rbind(x,y) - CORRECT ANSWER - [,1] [,2] [,3]
x123
y 10 11 12
which of the following is NOT a predefined constant in R? - CORRECT ANSWER -
MONTH.NAME
a tibble: - CORRECT ANSWER - displays the first 10 rows and all the columns that fit on
the screen
, df1<- data.frame(x=c(1,2,3), y=c(5,NA,8))
na.omit(df1) - CORRECT ANSWER -xy
115
338
a fair coin is tossed ten times. The probability of obtaining 4 or fewer heads can be found by
submitting which of the following lines of code? - CORRECT ANSWER - pbinom(4,
size=10, prob=1/2)
which of the following is a binomial random variable? - CORRECT ANSWER - the
number of women taller than 68 inches in a random sample of 5 women
which of the following is a continuous random variable? - CORRECT ANSWER - the
time it takes a randomly selected student to complete a multiple choice exam
the expected value of a random variable is the: - CORRECT ANSWER - mean value over
an infinite number of observations of the variable
which of the following properties holds for the standard normal distribution but not for other
normal distributions? - CORRECT ANSWER - The mean is 0 and the standard deviation
is 1
which of the following if the modulus operator in R? - CORRECT ANSWER - %%
what is the result of running the following script:
i<- 2
while(i<4){
print(i)
i=i+1} - CORRECT ANSWER - [1] 2