Midterm Quiz 2
.pdf
keyboard_arrow_up
School
University of California, Berkeley *
*We aren’t endorsed by this school
Course
6501
Subject
Computer Science
Date
May 27, 2024
Type
Pages
30
Uploaded by GrandMoonTrout26
Course
Midterm Quiz 2 - Summer 2020
Midterm Quiz 2
Midterm Quiz 2 - GT Students and
Veri±ed MM Learners
Midterm Quiz 2 - GT Students and Veri±ed MM Learners
Midterm Quiz 2 due Jul 7, 2020 23:00 PDT
Past Due
90 Minute Time Limit
Instructions
Work alone.
Do not collaborate with or copy from anyone else.
You may use any of the following resources:
One sheet (both sides) of handwritten (not photocopied or scanned) notes
If any question seems ambiguous, use the most reasonable interpretation (i.e. don't be like Calvin):
Good Luck!
This is the beginning of Midterm Quiz 2. Please make sure that you submit all your answers before the time runs out. Once you
submit an answer to a question, you cannot change it. There is no overall Submit button.
After submitting all answers, please click the "End my Exam" button, above, before exiting from ProctorTrack to complete your exam.
Information for Question 1
There are ±ve questions labeled "Question 1." Answer all ±ve questions. For each of the following ±ve questions, select the probability
distribution that could best be used to model the described scenario. Each distribution might be used, zero, one, or more than one time
in the ±ve questions.
These scenarios are meant to be simple and straightforward; if you're an expert in the ±eld the question asks about, please do not rely on
your expertise to ±ll in all the extra complexity (you'll end up making the questions below more di²cult than I intended).
Question 1
1.4/1.4 points (graded)
Number of hits to a real estate web site each minute
Poisson
You have used 1 of 1 attempt
Question 1
1.4/1.4 points (graded)
Time between hits on a real estate web site
Exponential
You have used 1 of 1 attempt
Question 1
1.4/1.4 points (graded)
Time from when a house is put on the market until the ±rst o²er is received
Weibull
You have used 1 of 1 attempt
Question 1
1.4/1.4 points (graded)
Time between people entering the ID-check queue at an airport
Submit
Submit
Submit
Exponential
You have used 1 of 1 attempt
Question 1
1.4/1.4 points (graded)
Number of faces correctly identi±ed by deep learning (DL) software until an error is made
Geometric
You have used 1 of 1 attempt
Questions 2a, 2b
10.0/10.0 points (graded)
Five classi±cation models were built for predicting whether a neighborhood will soon see a large rise in home prices, based on public
elementary school ratings and other factors. The training data set was missing the school rating variable for every new school (3% of the
data points).
Because ratings are unavailable for newly-opened schools, it is believed that locations that have recently experienced high population
growth are more likely to have missing school rating data.
Model 1 used imputation, ±lling in the missing data with the average school rating from the rest of the data.
Model 2 used imputation, building a regression model to ±ll in the missing school rating data based on other variables.
Model 3 used imputation, ±rst building a classi±cation model to estimate (based on other variables) whether a new school is likely to
have been built as a result of recent population growth (or whether it has been built for another purpose, e.g. to replace a very old
school), and then using that classi±cation to select one of two regression models to ±ll in an estimate of the school rating; there are
Submit
Submit
two di±erent regression models (based on other variables), one for neighborhoods with new schools built due to population growth,
and one for neighborhoods with new schools built for other reasons.
Model 4 used a binary variable to identify locations with missing information.
Model 5 used a categorical variable: ²rst, a classi²cation model was used to estimate whether a new school is likely to have been built
as a result of recent population growth; and then each neighborhood was categorized as "data available", "missing, population
growth", or "missing, other reason".
a. If school ratings can be reasonably well-predicted from the other factors, and new schools built due to recent population growth can be
reasonably well-classi²ed using the other factors, which model would you recommend?
b. In which of the following situations would you recommend using Model 2? [All predictions and classi²cations below are using the other
factors.]
Model 1
Model 2
Model 3
Model 4
Model 5
Ratings can be well-predicted, and reasons for building schools can be well-classi²ed.
Ratings can be well-predicted, and reasons for building schools cannot be well-classi²ed.
You have used 1 of 1 attempt
Information for Question 3
In a diet problem (like we saw in the lessons and homework), let x
be the amount of food i
in the solution (
x
>= 0)
, and let M
be the
maximum amount that can be eaten of any food.
Suppose we added new variables y
that are binary (i.e., they must be either 0 or 1): if food i
is eaten in the solution, then it is part of the
solution (
y
= 1)
; otherwise y
= 0
.
There are ±ve questions labeled "Question 3." Answer all ±ve questions. For each of the following ±ve questions, select the
mathematical constraint that best corresponds to the English sentence. Each constraint might be used, zero, one, or more than one time
in the ±ve questions.
Question 3
1.4/1.4 points (graded)
Select the mathematical constraint that corresponds to the following English sentence:
Ratings cannot be well-predicted, and reasons for building schools can be well-classi±ed.
Ratings cannot be well-predicted, and reasons for building schools cannot be well-classi±ed.
Submit
i
i
i
i
i
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
Related Questions
Mattings
View
Tell me what you w to do
165
M-
AlloCel AaBbCd AaBbC AaBbce AaB ABCD ABOCED A08bCD AaBbCcD ABBCCD AnBbCcl B
1 Normal No low
eping ding 1
Tile
Suositte
Subia Em Loginsess
Qu
1
Q1) If y₁ =sin(x), y2 = cos(x), y₁ = tan(x), where -
arrow_forward
Please answer this
arrow_forward
You are working on development of a new water treatment plant for Spokane, Washington. Monthly rainfall data has been collected as part of designing the new water treatment plant, and you are required to develop a computer program that will perform statistical analysis. The input data file is called rainfall. As you examine the input file, you notice that the first record line is the name of the city and type of data, the second record line contains the control numbers, and the remaining record lines are the average monthly rainfall amounts: 12 rows (January – December) and 6 years (2015 – 2020).
Write a C program that will read the data from the input file, such that the city name and type of data are stored in a one-dimensional character array, and the rainfall amounts are stored in a two-dimensional array. Manipulate the two-dimensional array to calculate the average rainfall for each year and the standard deviation in rainfall for each year. Then find the minimum and maximum…
arrow_forward
With the aid of a flow chat show the techniques for Input of a Block of Data.
arrow_forward
Assignment 2 Directions
Please choose Option 1 or Option 2. You do not need to do both.
Option 1:
Please write a short paper based on Module 2 Hardware Components. Anything in the module can be a topic.
Write a summary paper as follows:
• Prepare a Word document with a minimum of 3 pages (not including title and references pages) and a minimum of 3
solid references.
Be sure to use APA Guidelines for references.
• Make sure to save the file in the following format: FirstName_LastName_Paper.doc(x)
• Upload the completed file as an attachment to this assignment.
.
Option 2:
1. Create an algorithm to add two integer numbers.
2. Implement the program in a high level language like C or Java. It does not need to run for me, but the code should
be included in a text document called FirstnameLastnameHLA2.txt in your assignment submission.
3. Implement the program in MIPSzy Assembly language. Use the high level code as comments to the right of the
Assembly code as the textbook does.
4. If you…
arrow_forward
Don't you dare give me AI generated answer or plagiarised answer. If I see these things I'll give you multiple downvotes and will report immediately.
arrow_forward
The college ground is rectangular in shape. The Management decides to build a fence around the ground. In order to help the construction workers to build a straight fence, they planned to place a thick rope around the ground. They wanted to buy only the exact length of the rope that is needed. They also wanted to cover the entire ground with a thick carpet during rainy season. They wanted to buy only the exact quantity of carpet that is needed. They requested your help.
Help them by writing a C program to find the exact length of the rope and the exact quantity of carper that is required?
Input Format:
Input consists of 2 integers. The first integer corresponds to the length of the ground and the second integer corresponds to the breadth of the ground.
Output Format:
Refer Sample Input and Output for exact formatting specifications.
Sample Input and Output:
[All text in bold corresponds to input and the rest corresponds to output]
Length:
50
Width:
20
Required length is 140m
Required…
arrow_forward
Create a VBA algorithm that calculates the
weighted grade of four exams of 10 students.
Column 1- Student's Name Column 2 -Exam 1
|
Score Column 3 - Exam 2 Score Column 4 -
Exam 3 Score Column 5 - Exam 4 Score Column
6 – Weighted Grade Formula of Weighted Grade:
Weighted Grade = 30% Exam 1+ 25% Exam 2 +
25% Exam 3 + 20% Exam 4
arrow_forward
INSTRUCTIONS
• Create a project, create a VI and Design the logic circuits below.
You can create all the circuits in one VI.
When done, use the save all function to save the project and the VI.
Zip (not RAR) and save the files under your ID and name e.g.
10448989_Matthew_Fiifi_Hayford.zip.
1. F(X, Y, Z) = X + YZ
Design the logic diagram below and simulate. Ensure that you get the output as shown in the
truth table.
X Y Z X+YZ or F
000
001
010
011
100
101
11
111
1
Y
1
1
1
> N
arrow_forward
Short, edit and update runs are all distinct.
arrow_forward
ess News | Sto...
Home- Microsoft A...
D Page view
A
Read aloud Add text
Task #2
Bob employs a Landscaping company that wants to use your services to help create an invoice
generating system. The landscapers submit an invoice weekly. They charge $50 per hour worked. They
also charge tax- 13%. Bob likes to see an invoice that displays all the information -number of hours,
the charge per hour, the total BEFORE tax and the total AFTER tax. Since this is an invoice, we also need
to display the name of the company (Landscaping Xperts) at the top of the invoice. Display all of the
information on the screen.
Using Pseudocode, develop an algorithm for this problem.
The comments must include the Number (i.e. Task#1), your full name and your student
Question
number
Submit an electronic version using the submission point located in the week 1 folder. The
electronic version MUST be in pdf format. Any other format will NOT be accepted and you will
receive a zero mark for your assignment.
The…
arrow_forward
Create a VBA algorithm that calculates the weighted grade of four exams of 10 students.
Column 1 – Student’s Name Column 2 –Exam 1 Score Column 3 – Exam 2 Score Column 4 – Exam 3 Score Column 5 – Exam 4 Score Column 6 – Weighted Grade
Formula of Weighted Grade:
Weighted Grade = 30% Exam 1 + 25% Exam 2 + 25% Exam 3 + 20% Exam 4
arrow_forward
Using the MATLAB editor, create a script m-file which includes a header block and comments:Create a matrix which holds values of:
y = a^x
where a is a column array A having the values 1-5 in 0.5 increments
x is a row array X having integer values 1-5
Display a message explaining the results which will be displayed.Display the 5th row of the matrix.
Save the script and publish function to create a pdf file from the script in a file named "ECE105_Wk2_L2_Prep_2".
arrow_forward
Create a table that shows the relationship between the units of mass in kilograms and pound mass in the range of 50 kg to 120 kg. Use increments of 10 kg. Present your work incorporating the ideas discussed in this module. Use a word processor to create your report. Upload your file here.
arrow_forward
Using matlab
arrow_forward
dont copy existing posting multiple times strict warning skip if dont know
arrow_forward
X
\CD
0
For the given truth table's results column X, please fill the Karnaugh Map, indicating which M
locations you're using.
ABCD
0 0 0
00
00
01
11
10
AB
0
0
0
1
00
m0
m1
m3
m2
0
0
1
0
0
0 1
1
01
m4
m5
m7
m6
0
1
0 0
11
m12 m13
m15
m14
0 1
0
1
1
0
1
1
0
10
m8
m9
m11
m10
0
1
1
1
1
1
0
0
0
1
0 0
1
1
0 1
0
1
1
0 1
1
1
1
0 0
1
101
1
1
1
1
0
1
1
1
1
1
arrow_forward
Please do not give solution in image format thanku
arrow_forward
An ISBN-10 (International Standard Book Number)consists of 10 digits: d1d2d3d4d5d6d7d8d9d10. The last digit, d10, is a checksum,which is calculated from the other 9 digits using the following formula:(d1 x 1 + d2 x 2 + d3 x 3 + d4 x 4 + d5 x 5 +d6 x 6 + d7 x 7 + d8 x 8 + d9 x 9),11If the checksum is 10, the last digit is denoted as X according to the ISBN-10convention. Write a program that prompts the user to enter the first 9 digits anddisplays the 10-digit ISBN (including leading zeros). Your program should readthe input as an integer. Here are sample runs:
Enter the first 9 digits of an ISBN as integer: 013601267 ↵EnterThe ISBN-10 number is 0136012671
arrow_forward
An ISBN-10 (International Standard Book Number)
consists of 10 digits: d1d2d3d4d5d6d7d8d9d10. The last digit, d10, is a checksum,
which is calculated from the other 9 digits using the following formula:
(d1 x 1 + d2 x 2 + d3 x 3 + d4 x 4 + d5 x 5 +
d6 x 6 + d7 x 7 + d8 x 8 + d9 x 9),11
If the checksum is 10, the last digit is denoted as X according to the ISBN-10
convention. Write a program that prompts the user to enter the first 9 digits and
displays the 10-digit ISBN (including leading zeros). Your program should read
the input as an integer. Here are sample runs:
arrow_forward
An election is coming to your former high school, and the election committee is talking to you about creating a voting mechanism that will determine the overall number of votes for each candidate. Each member of each of the two-party lists will be displayed on the screen. Assume that only a trustworthy official has access to your system; the previous student body president will input the data; the names of the candidates must be displayed on the screen for the official to encode the votes for each candidate; and your program must determine and display the official winners in the school election. Plan the logic by using pseudocode C++ or Javascript is fine thanks
arrow_forward
An election is coming to your former high school, and the election committee is talking to you about creating a voting mechanism that will determine the overall number of votes for each candidate. Each member of each of the two-party lists will be displayed on the screen. Assume that only a trustworthy official has access to your system; the previous student body president will input the data; the names of the candidates must be displayed on the screen for the official to encode the votes for each candidate; and your program must determine and display the official winners in the school election.
Plan the logic by using pseudocode
arrow_forward
I asked you to rewrite this memorandam. please send me revision .
arrow_forward
You need to take a trip by car to another town that you have never visited before. Therefore, you
are studying a map to determine the shortest route to your destination. Depending on which route
you choose, there are five other towns (call them A, B, C, D, E) that you might pass through on
the way. The map shows the mileage along each road that directly connects two towns without
any intervening towns. These numbers are summarized in the following table, where a dash
indicates that there is no road directly connecting these two towns without going through any
other towns.
Miles between Adjacent Towns
Town
A B C DE
Destination
Origin
A
40
60
50
10
70
B
20
55
40
50
10
D
60
E
80
(a) Formulate this problem as a shortest-path problem by drawing a network where nodes
represent towns, links represent roads, and numbers indicate the length of each link in
miles.
(b) Use the Dijkstra's algorithm to solve this shortest path problem.
arrow_forward
You need to take a trip by car to another town that you have never visited before. Therefore,
you are studying a map to determine the shortest route to your destination. Depending on
which route you choose, there are five other towns (call them A, B, C, D, E) that you might pass
through on the way. The map shows the mileage along each road that directly connects two
towns without any intervening towns. These numbers are summarized in the following table,
where a dash indicates that there is no road directly connecting these two towns without going
through any other towns.
Town
Origin
A
B
C
D
E
A
40
Miles between Adjacent Towns
C D E
B
60
10
50
20
- 70 55 -
88811
40
50
10
Destination
| | || 88
60
80
(a) Formulate this problem as a shortest-path problem by drawing a network where nodes
represent towns, links represent roads, and numbers indicate the length of each link in
miles.
(b) Use the Dijkstra's algorithm to solve this shortest path problem. Illustrate your work by
using a table.…
arrow_forward
Gather 1 set of real data (floating point data type) as a function of time (30 samples) in an Excel file. This can be generated using a formula or you can get data from the internet just cite the source properly.
Ex. distance and time energy and time velocity and time
etc.
Submit the following files:
1. Excel Data
2. .m file
arrow_forward
Here's some background information on our Gregorian calendar. Although the Gregoriancalendar was created in 1582, The United States did not adopt it until 1752. Therefore, theGregorian calendar formula for calculating leap years only applies to years 1752 and later in theUnited States. The Gregorian calendar provided an improved formula for calculating whichyears are Leap Years. The criteria for a determining whether a year is a Leap Year is:Leap Year Definition:• The year is evenly divisible by 4;
• If the year can be evenly divided by 100, it is NOT a leap year, unless;• The year is also evenly divisible by 400. Then it is a leap year.Your assignment is to create a Python program that in general uses a function to determinewhether a year is a leap year and another function for obtaining year input values from the user.More specifically your program should:1. Contain a function that determines whether a year passed to it is:a. A valid year for the Gregorian calendar usage in the…
arrow_forward
This piece will define file extensions and identify the programs that generate them. Some concrete examples would be helpful.
arrow_forward
DO NOT COPY FROM OTHER WEBSITES.
Correct and detailed answer will be Upvoted else downvoted. Thank you!
arrow_forward
SEE MORE QUESTIONS
Recommended textbooks for you
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:9781337508841
Author:Carey
Publisher:Cengage
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Related Questions
- Mattings View Tell me what you w to do 165 M- AlloCel AaBbCd AaBbC AaBbce AaB ABCD ABOCED A08bCD AaBbCcD ABBCCD AnBbCcl B 1 Normal No low eping ding 1 Tile Suositte Subia Em Loginsess Qu 1 Q1) If y₁ =sin(x), y2 = cos(x), y₁ = tan(x), where -arrow_forwardPlease answer thisarrow_forwardYou are working on development of a new water treatment plant for Spokane, Washington. Monthly rainfall data has been collected as part of designing the new water treatment plant, and you are required to develop a computer program that will perform statistical analysis. The input data file is called rainfall. As you examine the input file, you notice that the first record line is the name of the city and type of data, the second record line contains the control numbers, and the remaining record lines are the average monthly rainfall amounts: 12 rows (January – December) and 6 years (2015 – 2020). Write a C program that will read the data from the input file, such that the city name and type of data are stored in a one-dimensional character array, and the rainfall amounts are stored in a two-dimensional array. Manipulate the two-dimensional array to calculate the average rainfall for each year and the standard deviation in rainfall for each year. Then find the minimum and maximum…arrow_forwardWith the aid of a flow chat show the techniques for Input of a Block of Data.arrow_forwardAssignment 2 Directions Please choose Option 1 or Option 2. You do not need to do both. Option 1: Please write a short paper based on Module 2 Hardware Components. Anything in the module can be a topic. Write a summary paper as follows: • Prepare a Word document with a minimum of 3 pages (not including title and references pages) and a minimum of 3 solid references. Be sure to use APA Guidelines for references. • Make sure to save the file in the following format: FirstName_LastName_Paper.doc(x) • Upload the completed file as an attachment to this assignment. . Option 2: 1. Create an algorithm to add two integer numbers. 2. Implement the program in a high level language like C or Java. It does not need to run for me, but the code should be included in a text document called FirstnameLastnameHLA2.txt in your assignment submission. 3. Implement the program in MIPSzy Assembly language. Use the high level code as comments to the right of the Assembly code as the textbook does. 4. If you…arrow_forwardDon't you dare give me AI generated answer or plagiarised answer. If I see these things I'll give you multiple downvotes and will report immediately.arrow_forwardThe college ground is rectangular in shape. The Management decides to build a fence around the ground. In order to help the construction workers to build a straight fence, they planned to place a thick rope around the ground. They wanted to buy only the exact length of the rope that is needed. They also wanted to cover the entire ground with a thick carpet during rainy season. They wanted to buy only the exact quantity of carpet that is needed. They requested your help. Help them by writing a C program to find the exact length of the rope and the exact quantity of carper that is required? Input Format: Input consists of 2 integers. The first integer corresponds to the length of the ground and the second integer corresponds to the breadth of the ground. Output Format: Refer Sample Input and Output for exact formatting specifications. Sample Input and Output: [All text in bold corresponds to input and the rest corresponds to output] Length: 50 Width: 20 Required length is 140m Required…arrow_forwardCreate a VBA algorithm that calculates the weighted grade of four exams of 10 students. Column 1- Student's Name Column 2 -Exam 1 | Score Column 3 - Exam 2 Score Column 4 - Exam 3 Score Column 5 - Exam 4 Score Column 6 – Weighted Grade Formula of Weighted Grade: Weighted Grade = 30% Exam 1+ 25% Exam 2 + 25% Exam 3 + 20% Exam 4arrow_forwardINSTRUCTIONS • Create a project, create a VI and Design the logic circuits below. You can create all the circuits in one VI. When done, use the save all function to save the project and the VI. Zip (not RAR) and save the files under your ID and name e.g. 10448989_Matthew_Fiifi_Hayford.zip. 1. F(X, Y, Z) = X + YZ Design the logic diagram below and simulate. Ensure that you get the output as shown in the truth table. X Y Z X+YZ or F 000 001 010 011 100 101 11 111 1 Y 1 1 1 > Narrow_forwardShort, edit and update runs are all distinct.arrow_forwardess News | Sto... Home- Microsoft A... D Page view A Read aloud Add text Task #2 Bob employs a Landscaping company that wants to use your services to help create an invoice generating system. The landscapers submit an invoice weekly. They charge $50 per hour worked. They also charge tax- 13%. Bob likes to see an invoice that displays all the information -number of hours, the charge per hour, the total BEFORE tax and the total AFTER tax. Since this is an invoice, we also need to display the name of the company (Landscaping Xperts) at the top of the invoice. Display all of the information on the screen. Using Pseudocode, develop an algorithm for this problem. The comments must include the Number (i.e. Task#1), your full name and your student Question number Submit an electronic version using the submission point located in the week 1 folder. The electronic version MUST be in pdf format. Any other format will NOT be accepted and you will receive a zero mark for your assignment. The…arrow_forwardCreate a VBA algorithm that calculates the weighted grade of four exams of 10 students. Column 1 – Student’s Name Column 2 –Exam 1 Score Column 3 – Exam 2 Score Column 4 – Exam 3 Score Column 5 – Exam 4 Score Column 6 – Weighted Grade Formula of Weighted Grade: Weighted Grade = 30% Exam 1 + 25% Exam 2 + 25% Exam 3 + 20% Exam 4arrow_forwardarrow_back_iosSEE MORE QUESTIONSarrow_forward_ios
Recommended textbooks for you
- Np Ms Office 365/Excel 2016 I NtermedComputer ScienceISBN:9781337508841Author:CareyPublisher:CengageEBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENT
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:9781337508841
Author:Carey
Publisher:Cengage
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT