Write the following queries using the schema below
Class (Number, Department, Term, Title)
Student (Username, FirstName, LastName, Year)
Takes (Username, Department, Number, Term, Grade)
[clarification] In Student, Year is an integer. A student can be a 2nd year student. In that case, Year value would be 2.
For the Takes relation:
· Grade is NA for current semester students
· Username is foreign key to Student
· (Department, Number, Term) is foreign key to Class
a) Write an SQL query that returns the Term when students with username “alex” and “bob” take at least 1 class together. Include the number of class that they have taken together in that Term.
b) Write an SQL query that returns the usernames of the students who take exactly two classes in the “CSE” department in the term “Fall.2020”
c) Write an SQL query that returns the title of all classes which have not been taken by any first-year student.
In: Computer Science
You have been given the task of finding out what proportion of students that enroll in a local university actually complete their degree. You have access to first year enrolment records and you decide to randomly sample 111 of those records. You find that 80 of those sampled went on to complete their degree. a)Calculate the proportion of sampled students that complete their degree. Give your answer as a decimal to 3 decimal places. Sample proportion =
You decide to construct a 95% confidence interval for the proportion of all enrolling students at the university that complete their degree. If you use your answer to part a) in the following calculations, use the rounded version. b)Calculate the lower bound for the confidence interval. Give your answer as a decimal to 3 decimal places. Lower bound for confidence interval =
c)Calculate the upper bound for the confidence interval. Give your answer as a decimal to 3 decimal places. Upper bound for confidence interval =
In: Statistics and Probability
In a study of academic procrastination, the authors of a paper reported that for a sample of 481 undergraduate students at a midsize public university preparing for a final exam in an introductory psychology course, the mean time spent studying for the exam was 7.54 hours and the standard deviation of study times was 3.80 hours. For purposes of this exercise, assume that it is reasonable to regard this sample as representative of students taking introductory psychology at this university.
(a) Construct a 95% confidence interval to estimate μ,
the mean time spent studying for the final exam for students taking
introductory psychology at this university. (Round your answers to
three decimal places.)
(b) The paper also gave the following sample statistics for the
percentage of study time that occurred in the 24 hours prior to the
exam.
n = 481 x = 43.78 s = 21.46
Construct a 90% confidence interval for the mean percentage of
study time that occurs in the 24 hours prior to the exam. (Round
your answers to three decimal places.)
In: Statistics and Probability
a. all Hypothesis Tests must include all four steps, clearly labeled;
b. all Confidence Intervals must include all output as well as the CI itself
c. include which calculator function you used for each problem.
2. An experiment was done to see whether open-book tests make a difference. A calculus class of 48 students agreed to be randomly assigned by the draw of cards to take a quiz either by open-notes or closed-notes. The quiz consisted of 30 integration problems of varying difficulty. Students were to do as many as possible in 30 minutes. The 24 students taking the exam closed-notes got an average of 15 problems correct with a standard deviation of 2.5. The open-notes crowd got an average of 12.5 correct with a standard deviation of 3.5. Assume that the populations are approximately normal. At the 5% significance level, does this data suggest that differences exist in the mean scores between the two methods?
In: Statistics and Probability
For Questions 1-4 , use the table below. It is data for the heights (inches) for Ms. Smith’s 4th grade class.
|
Student |
Height (inches) |
Student |
Height (inches) |
|
1 |
47 |
11 |
53 |
|
2 |
47 |
12 |
54 |
|
3 |
47 |
13 |
55 |
|
4 |
49 |
14 |
56 |
|
5 |
50 |
15 |
59 |
|
6 |
51 |
16 |
59 |
|
7 |
51 |
17 |
60 |
|
8 |
52 |
18 |
60 |
|
9 |
52 |
19 |
60 |
|
10 |
52 |
20 |
91 |
In: Statistics and Probability
6. Some personal computer software is sold at special discounts to students. Other software is provided in a less powerful version for students. Why do publishers offer discounts to students? What is the purpose of developing less powerful editions?
7. Using the kinked demand model, explain why a decrease in costs might not lead to a change in price or output (see Chapter 10).
10. Stargazer Recordings sells compact discs in two markets. The marginal cost of each disc is $2. Demand in each market is given by Q1 = 40 – 10P1 and Q2 = 40 – 2P2 where Q is thousands of compact discs.
a. If the firm uses price discrimination, how much output should
it produce and what price should it charge? What is its profit?
What type of price discrimination is it using?
b. If the firm cannot prevent resale of compact discs, what will
its profit be?
In: Economics
Large Sample Proportion Problem. A survey was
conducted on high school marijuana use. Of the 2266 high school
students surveyed, 970 admitted to smoking marijuana at least
once. A study done 10 years earlier estimated that 45%
of the students had tried marijuana. We want to conduct a
hypothesis test to see if the true proportion of high school
students who tried marijuana is now less than 45%. Use
alpha = .01.
What is the conclusion for this test?
Group of answer choices
The p-value was below .05, therefore we failed to reject the null hypothesis.
The p-value was below .01, therefore we failed to reject the null hypothesis.
Based on a tests statistic that is not in the rejection region for alpha = .01, we failed to reject the null hypothesis.
Based on a p-value less than .01, we would reject the null hypothesis and conclude the rate is now lower than 45.
In: Statistics and Probability
What kind of quantity is length?
ratio
ordinal
interval
nominal
What type of graph is best for expressing percentages
of a whole?
We are selecting seven CD's out of twelve to take the mountains. How many possible selections are there, given that order doesn't matter?
Karen scored a 76 on an exam whose mean is 74 and whose standard deviation is 8. Find her z score.
At a college, 60% of the students are women. If we select 7 students at random, what is the probability that exactly 5 of tyen are women (to the nearest hundredth)?
The heights of students or normally distributed with a mean of 59" and a standard deviation of 5" what is the probability that a randomly selected student will be between 57 and 65" tall?
We are to select a president vice president secretary and treasurer out of a club with 15 members assuming that no one can hold more than 1 office how many selections are possible?
In: Statistics and Probability
In a recent survey of 200 elementary students, many revealed they preferred math than English. Suppose that 80 of the students surveyed were girls and that 120 of them were boys. In the survey, 60 of the girls, and 80 of the boys said that they preferred math more.
1. What is the difference in the probability between that girls prefer math more and boys prefer math more?
a.0.0833
b. 0.5
c 0.0042
d. 0.4097
2. What is the standard error of the difference in the probability between that girls prefer math more and boys prefer math more?
a.0.4097
b.0.0042
c. 0.0833
d. 0.0647734
3. Calculate an 80% confidence interval for the difference in proportions
4. Suppose the 90% confidence interval for the difference in proportion is (-0.0232, 0.1899).
Is the following interpretation of the confidence interval true?
"For all elementary students, I have 90% confidence that the true proportion difference between girls and boys is in the interval (-0.0232, 0.1899)."
In: Statistics and Probability
Students are expected to have higher grades if they spend more time studying. An educational theorist collects data on 22 students and the number of hours they spend studying is:
In R: hours <- c(22.3, 22.8, 21.7, 21.3, 18.5, 20.2, 20.7, 18.2, 22.9, 21.5, 18.1, 19.8, 22.7, 22.9, 19.3, 20.8, 21.1, 18.8, 22.4, 18.2, 20, 23) Their grade average is: grades <- c(8.6, 8.5, 7.8, 9.1, 8, 10.2, 7.4, 8.8, 8.8, 8, 8.3, 8.8, 9.8, 9.1, 9.4, 7.4, 10.2, 7.1, 10.4, 7, 9.2, 10.7)
Is there evidence that students who spend more hours studying score higher grades?
(a) State a sensible null hypothesis
(b) State the precise definition of p-value and explain what “more extreme” means in this context
(c) Is a one-sided or two-sided test needed? justify
(d) Perform a linear regression using R and interpret
In: Statistics and Probability