First Assignment Secure Programming COMP10068 Coding Standards for Secure Programming In this assignment, you will solidify your practical skills in, as well as your knowledge of, the elementary components of secure systems programming. The assignment is presented in two parts. In the first part, you are asked to answer two questions using up to 100 words for each. For the second part, you are provided with five C++ programs. You should: 1. Repair any vulnerabilities you find in each C++ program; and 2. Briefly describe (in a separate document) how you completed each repair. You should work individually. Submit the modified code you develop, along with a single pdf document, as a single zip to Aula by the date noted above. Please do not submit the build directory; executables (*.exe); or any interme- diate object files (*.obj). Only the C++ codes, and the pdf are required. Question 1 Use approximately 100 words to compare and contrast the following program- ming language constructs in your own words: the execution (call) stack; and the heap (free store). Question 2 Use approximately 100 words to explain the difference between a vulnerability and an exploit in terms of computer security. You may provide an example to help you explain. Five Vulnerable Programs You are provided with 5 C++ files contained within five folders. The five files are noncompliant[1-5] .cpp. Each exhibits a vulnerability which is addressed by a specific SEI CERT C++ Coding Standard rule; which is available in pdf form on the Week 2 Aula page, or online here. Each program violates at least one of the rules which are provided within the SEI CERT C++ Coding Standard. The rules are organised into 11 different cat- egories. You should begin by selecting one of the five programs; then find which rule is being violated by that program. Use the guidelines provided at the SEI rule description to modify the code and check that the output of your modified program is then as you would expect. Include the modified C++ file for each of the 5 programs. You should not modify the main function. For each of the five programs, you should create a subsection in your doc- ument, and write 50-100 words on the nature of the vulnerability, and how you fixed it. n.b. For each, you should reference a specific rule and clearly identify its name and number (e.g. ERR52-CPP. Do not use setjmp() or longjmp()). Submit a zip containing your 5 modified C++ files, and a single pdf docu- ment. The pdf will include the answers to Questions 1 & 2, as well as the five short explanations of each solution, in your own words. Overall, the document will contain around 500 words. Marking Scheme The assignment is worth 30% of the marks awarded for the entire module. The following provides a breakdown of the marking scheme: Answer to Question 1 Answer to Question 2 3 2 Modified code for Program 1 Modified code for Program 2 Modified code for Program 3 Modified code for Program 4 Modified code for Program 5 3 3 3 3 3 Report text for Program 1 Report text for Program 2 Report text for Program 3 Report text for Program 4 Report text for Program 5 2 2 2 2 2
Econ 152, Winter 2025 Week 4 Practice Questions In Ed Lazear’s study of Safelite’s PPP plan, the author shows that two concerns may arise when trying to determine the effects of introducing a new wage schedule on employee productivity. These confounders include seasonal variation in productivity and changes in productivity due to the hiring of new workers who have different productivity relative to the current workforce. • ln(Qij): the logged productivity • PPP ij : an indicator variable that equals 1for worker i in time j that has the option to choose the PPP plan, and 0 if they do not have this option • Mij : a set of 12 month indicator variables, one for each month • Yj : an indicator for whether the observation is from the first or second year • Wi : a set of worker fixed effects Below are a set of models of the logged productivity as a function of the availability of the PPP plan. In all models, β approximately represents the effect of the PPP plan on productivity, in percentage terms. However, the estimated effect may be biased due to confounders. a. ln(Qij) = a + β 1∙PPP ij+ εij b. ln(Qij) = β2∙PPP ij + Mij + Yij+ εij c. ln(Qij) = β3∙PPP ij + Wi + εij d. ln(Qij) = β4∙PPP ij + Mij + Yij + Wi + εij 1. If we want to isolate the effect the PPP plan on productivity due to an increase in within- worker productivity, which of the following would provide us with the best estimate: a. b. c. d. e. 2. If we want to isolate the effect the PPP plan on productivity due to selection effects of new workers, which of the following would provide us with the best estimate: a. b. c. d. − e. − 3. If we want to isolate the effect the PPP plan on productivity due to the timing of the plan’s rollout, which of the following would provide us with the best estimate: a. b. c. d. − e. − 4. Using a diagram, explain why we expect Safelite’s PPP plan to increase the variance of output across workers. 5. Using a diagram, explain why we expect Safelite’s PPP plan to raise the utility of high-ability workers without changing the utility of low-ability workers. 6. Using a diagram, explain why high-ability workers are more likely to have flatter indifference curves, and low-ability workers more likely to have steeper indifference curves 7. In their “Legos” experiment, Ariely et al. estimated that the intrinsic value of ‘meaningful’ work had a motivational effect equivalent to a 39 percent wage increase. Using a diagram, describe how they came up with this number. 8. Daedalus and his colleagues at the University of Troy did a study of the value of meaningful work that was very similar to Ariely et al.’s Legos study. But instead of offering a declining marginal rewards schedule ($2.00for the first Bionicle, $1.89for the second, etc.) Daedalus et al.paid their subjects $2.00for every Bionicle they produced, as indicated by the red Marginal Pay per Bionicle line in the Figure below. The authors found that their subjects produced an average of 8 Bionicles in the Meaningful condition and 4 Bionicles in the Sisyphus condition. Daedalus et al. propose that the behavior. of their subjects can be explained by the two marginal- cost-of-effort curves shown as straight blue lines in the diagram below. Notice that the marginal disutility of effort is negative for the first three Bionicles produced under the Meaningful condition. For each of the following statements about the Figure, state whether it is TRUE or FALSE: a) The Vʹ(B) schedule for the Meaningful condition implies that subjects were irrational: It does not make sense to have a negative cost of effort. b) According to the Figure, if the experimenters had paid $4 instead of $2 per Bionicle, the subjects would have produced 4 Bionicles under the Sisyphus condition. c) According to the Figure, if the experimenters had paid $3 instead of $2 per Bionicle, the subjects would have produced 6 Bionicles under the Sisyphus condition. d) These subjects were behaving as though the disutility of producing one more Bionicle was 2 dollars greater in the Sisyphus condition than in the meaningful condition. In other words, the value of meaningful work to the subjects was two dollars per Bionicle. e) The horizontal distance c-a = d-b measures the dollar value of meaningful work for an experimental subject with these Vʹ(B) curves. f) According to the Figure, a typical experimental subject would have produced 3 Bionicles for free if he was allowed to produce them in the Meaningful condition.
ENGR 304 Personal Project Winter 2025 First paper Assignment- your Personal view (which may be supplemented with yours or market data) Due date: Feb 07 , 2025 Format: 1) Select a Topic from the list, below 2) Write a paper/article - paper should include three sections • Introduction/abstraction - one or two short phrases • Body – 1 ½ to 2 pages, Maximum • Conclusion/summary – one or two short phrases Also Add an additional page of Pros/Cons • Pros/Cons: Personal project is an assignment about what you points. Please add one page to your personal project and provide two reasons to validate your points/data and two reasons as to why someone may not agree with your points/thoughts/data 3) Maximum 3 pages + 1 page on pros/Cons 4) Double space 5) Font 12 Topics: Please select one topic from the suggested topics, below: 1. Local NEWS and Global NEWS and the unverified News impact to our daily personal and work life? Should we care to follow the news? if yes, why and how we can/should verify the data especially those that are generated and or powered by Gen-AI? 2. Find and Hire the right Team/Staff ; assign them on the right Project – How should this be done ? There are a lot of Gen-AI tools to find resources as well as train resources . Gen-AI Topic and the Gen AI-powered tools should be considered as an important skill that every potential staff/hire should have an understanding on and know how to use - moving forward. As a Global Team Building leader , what resources should we use? Where should we go to find the right resources? 3. How do you think the Global world and the technologies and the technologists who are involved in them/innovate them/run them /manage them, moving forward with the new Gen-AI trends? Are they in-sync ? how and why? 4. Are virtual teams the future of our workforce? How Gen-AI will be impacting this? For pro/con section answer this questions What are three advantages and three disadvantages of virtual teamwork?
W25 STATS 250 – Introduction to Statistics and Data Analysis SECTION A: COURSE OVERVIEW A1 Course Description Stats 250 is a one-term, algebra-based introductory statistics course that introduces students to the investigative process of statistics so they may become critical consumers of statistical results and claims. Students will learn to graphically and numerically summarize data and use their understanding of variability to make inferences from a sample to its associated population. A2 Learning Objectives After taking Stats 250 you will be able to: ● Think critically about quantitative information in your everyday life, including asking questions about and evaluating the origins of data, analysis of data, and interpretations and real-world decisions based on data. ● Translate research questions into appropriate statistical procedures and use data to address those questions. ● Understand that variability is a natural part of the scientific process and how variability affects data that we analyze in everyday life. ● Effectively communicate statistical ideas to a non-statistical audience. ● Use a statistical programming software R via RStudio to perform basic data analysis and use data to investigate scientific questions. A4 Required Resources Required 1: STATS 250 Winter 25 Interactive Course Pack: We do not require students to purchase a publisher-developed textbook but do require students to always bring to class a course pack we have written to integrate into lecture meetings. This class moves quickly and students sometimes express difficulty copying down relevant information from scratch. The course pack provides partially filled-in notes, activities, examples, and supplemental readings, allowing students to focus only on writing the most important concepts. Students must bring the course pack to class. We provide two options for students: 1. Hardcopy ($33.22): We work with a publisher to print the entire course pack at a discounted price, cheaper than if students elected to print out the course pack themselves. You can purchase the course pack and have it shipped to a street address of your choosing atthis link. 2. Digital: Students with access to a tablet and stylus can elect to download a PDF of the full course pack from our class Canvas page and annotate the digital course pack with a PDF editor of their choosing. Required 2: Gradescope ($0 free): All course-related assignments are submitted, evaluated, and returned to students through Gradescope. To create your Gradescope account for this course, visit the course Canvas site and click on the `Gradescope` link from the left-hand navigation bar. Thereafter, you’ll be auto-enrolled in our course sites (no join code needed). Required 3: Posit.Cloud Account ($0 free) Refer to the Lab 0 assignment on Gradescope for instructions on creating an RStudio Cloud account. You can only create an account on the Stats 250 Posit.Cloud workspace by following the steps outlined in Lab 0. A5 Additional Resources ● ECoach for Stats 250: ECoach is a free, personalized, web-based coaching tool aimed at helping you do your best in this course. ECoach gives you strategies about the best ways to study, insider tips on course resources, feedback on your scores, and evidence-based tools to boost your scores. Sign up with your UM email address:https://ecoach.ai.umich.edu/ ● Piazza: An online forum where students can submit questions that are reviewed by the instructional team before being posted for everyone to see. Once a question is posted, students are encouraged to answer and discuss it, helping each other and building a virtual community of learning. The purpose of Piazza is to create a collaborative environment where everyone can contribute to deepening their understanding of the course material. You can link to Piazza through Canvas. ● Office Hours: Office hours are available throughout the week, following the office hours schedule we will post at the start of the 2nd week of the semester. In-person office hours are typically held in Angel Hall G219; we occasionally offer remote office hours via zoom. In special circumstances, your professors can also arrange office hours by appointment. Office hours are open to everyone, whether you have specific questions or not. Make it a habit to attend regularly–get the support you need to succeed in the course! 5.1 Mental Health and Wellbeing The University of Michigan is committed to advancing the mental health and wellbeing of its students. If you or someone you know needs support, services are available. For help, contact Counseling and Psychological Services (CAPS) at (734) 764-8312 and https://caps.umich.edu/during and after hours, on weekends and holidays. You may also consult University Health Service (UHS) at (732) 764-8320 andhttps://www.uhs.umich.edu/mentalhealthsvcs, or for alcohol or drug concerns, see www.uhs.umich.edu/aodresources. 5.2 Disability Statement The University of Michigan recognizes disability as an integral part of diversity and is committed to creating an inclusive and equitable educational environment for students with disabilities. Students who are experiencing a disability-related barrier should contact Services for Students with Disabilities (SSD)https://ssd.umich.edu/; 734-763-3000 or [email protected]. For students who are connected with SSD, accommodation requests can be made in Accommodate, a new platform recently adopted on campus. If you have just started working with SSD and plan to get documentation, please email [email protected] as soon as possible. Due to the time necessary for instructional staff to make appropriate arrangements to ensure accommodations are applied, 3 weeks in advance notice of testing accommodations is requested. If testing accommodations are not received by the course instructors within 14 days of an exam, we cannot guarantee those accommodations can be facilitated. In rare cases, we acknowledge the need for a testing accommodation may arise within a shorter turnaround time (example: a broken wrist). In these cases, the student should contact the SSD office and work with their instructor to determine what is possible, knowing that not all accommodations can be provided on short notice. If you have any questions or concerns, please contact your SSD Coordinator or visit SSD’s Current Student webpage. SSD considers aspects of the course design, course learning objects, and the individual academic and course barriers experienced by the student. Further conversation with SSD, instructors, and the student may be warranted to ensure an accessible course experience. A6 Engaging with the Material ● Attend Lectures Regularly: Lectures introduce key concepts essential for your understanding of the course. Here are a list of study strategies that will help you succeed in the learning process: o Follow along with the interactive lecture notes: Use the provided notes during lectures to actively engage with the material. The notes are designed to keep you on tract with the fast pace of the class. o Participate in the “Try It” examples: Engage with classmates to work through the “Try It” examples scattered throughout the lectures. These exercises reinforce your learning and provide real-time practice. o Summarize key ideas: At the end of each lecture, you will find a space to summarize the key ideas covered. Devote a few minutes soon after the lecture to reflect on these key concepts and jot down any questions you still have. You can post your questions on Piazza or visit office hours to get clarifications. One of the challenges in this course is learning how to learn effectively and discovering study techniques that work best for you. Regularly engaging with these prompts will help you build skills while reinforcing the material. ● Weekly Labs: Labs are designed to help you apply concepts learned in lecture to real-world data using R. GSIs will guide you through analyzing real-world data sets in R, focusing on applying statistical methods and interpreting results. Your first lab will meet the week of January 27. o Preparing for Lab: Labs assume you have attended lectures, as they focus on application and analysis rather than re-teaching lecture content. The key to getting the most out of lab is to come prepared by reviewing the relevant lecture material beforehand. ● Ask Questions and Contribute to Discussion: There are several opportunities to ask questions and clarify your understanding, whether during lectures, in labs, during office hours, or on Piazza. Actively participating by asking questions and engaging in discussion with your peers is key to deepening your understanding of the material. A7 Tips for Succeeding in Stats 250 The full instructional team is here to help you navigate the course and successfully complete it. Some helpful tips: ● Set a general study schedule for each week. It’s easier to block off time for each class than to juggle your work without a general plan. ● Keep up with lectures. Do not substitute labs for lectures. Labs are meant to provide practice with using some features of R to visualize and analyze real data. Lab instructors will assume students are keeping up with lecture material prior to attending lab. ● Start your homework early and ask questions when you have them. Ask questions when you have them. ● Participate in class by asking and/or answering questions during lectures, lab meetings, office hours, or through piazza. Contact members of the instructional team (GSI and lecture instructors using email) if you are having difficulties (earlier, rather than later). SECTION B: GRADING POLICIES Your overall grade in Stats 250 is determined by the three components: (1) Exams and Lecture Assignments, worth 50% of your overall course grade; (2) Weekly Lab Assignments and Case studies Write-Ups, worth 40% of your overall course grade; and (3) Weekly Homework Assignments, worth 10% of your overall course grade. B1 Exams and Lecture Work: 50% of your overall course grade. Together, exams and lecture work total 50% of your overall course grade. Students can choose between two options for precisely how this contribution is tabulated. The ‘Traditional’ approach weights exams at 50% and lecture work at 0%; the ‘Active’ approach weights exams at 40% and lecture work at 10%. 1.1 Exam Information Exam dates and times are common across all lecture sections; 100, 200, 300, and 400. You will have 80 minutes to complete exams which are proctored in-person, on paper, in a closed-notes format. Calculators are permitted, but not required on exams. NOTE: If you are entitled to extended time or reduced distraction testing environments, please see our policy on submitting accommodations in section 5.2, above. You must take both Exam 01 and Exam 02 to complete the class. Exam 01 – Tuesday, February 25th Exam 01 covers lectures 01 – 11, proctored at 6:00 PM on February 25th. Students can bring a calculator if they would like to but will not need one to be successful on the test. Roughly one week before the exam, the instructional team will post a practice exam and review packet students can use to assist in studying. Additionally, the lab just prior to the exam will be used as an additional review session. Exam 02 -- Thursday, April 24th Exam 02 covers lectures 12-24. Although this exam is technically non-cumulative, many concepts in STATS 250 do build off one another. Like Exam 01, this is a closed note, pen-and-paper exam, proctored at 7:30 PM on April 24th. Review materials will be provided roughly one week prior to Exam 02. [NOTE: Although the Registrar allocates two hours for final exam proctoring sessions, Exam 02 is only 80 minutes long, just like Exam 01.] 1.2 Lecture Approach Options Here’s how it works: the semester is divided into two blocks of lectures. At the start of each block, students will be asked to choose between two options outlined below: ● Option 01: Traditional Lecture o Attendance: Not required. Students can keep up with the lecture material by attending lectures or reviewing recordings. o Lecture work: Not required. Lecture pre-work and group work are not required. o Keep up with material: Attend lecture in person or watch the recording at your convenience. Keep in mind that students should be caught up with lecture-related content before beginning any lab or HW assignments due for a given week. Plan accordingly! o Grading Impact: Exams are more heavily weighted (each exam is 25% of your overall grade). ● Option 02: Active Learning Lecture o Attendance: Required in person. Students can keep up with the lecture material by attending lectures and accessing lecture recordings. o Lecture work: Required. Students complete two low-stakes assignments associated with each lecture. . Prework Assignments: Students complete a brief 5-10 minute assignment before each lecture. These assignments are designed to familiarize students with key ideas in an upcoming class meeting or to review key ideas from a recent one. . Group Work Assignments: During the last 30 minutes of each lecture meeting, students will work with 2-3 of their peers (i.e., in teams of up to 4) to complete and submit a set of exercises by the end of each lecture. These exercises are designed to give students immediate practice with concepts and skills learned during a lecture meeting. o Graduate student instructors and undergraduate instructional assistants will be present in lectures to help facilitate group work. o Lecture work (pre-work and group work) provides low-stakes opportunities for students to practice recent content; these assignments contribute to the overall course grade. o Grading Impact: Exams are weighted less heavily (each exam is 20% of your overall grade) and lecture work assignments are factored into your overall grade (1% prework per block; 4% group work per block). 1.3 Choosing your approach Students will be asked to choose between these two options twice during the semester. Here's how the decision will be factored into the overall course grade: ● Block 01: January 22 – March 11 (11 lectures) - Decide between option 01 and option 02 by Thursday, January 16 at 8 pm (see Gradescope to select) o If option 01 (traditional lecture) is selected: . Lecture pre-work and group work for block 01 will be worth 0% of your overall course grade . Exam 01 will be worth 25% of your overall course grade o If option 02 (active lecture) is selected: . Lecture pre-work for block 01 will be worth 1% of your overall course grade, and group work for block 01 will be worth 4% of your overall course grade . Exam 01 will be worth 20% of your overall course grade Note: After Thursday, January 16, the lecture format option for block 01 will be set and cannot be changed. If no option is selected by January 16, then option 01 (traditional approach) will be used as the default option (this applies to all waitlisted students). ● Block 02: March 12 – April 17 (11 lectures) - Decide between option 01 and option 02 by Tuesday, March 11 at 8 pm (see Gradescope to select) o If option 01 (traditional lecture) is selected: . Lecture pre-work and group work for block 02 will be worth 0% of your overall course grade . Exam 02 will be worth 25% of your overall course grade o If option 02 (active lecture) is selected: . Lecture pre-work for block 02 will be worth 1% of your overall grade, and group work for block 02 will be worth 5% of your overall course grade . Exam 02 will be worth 20% of your overall course grade Note: After Tuesday, March 11, the lecture format option for block 02 will be set and cannot be changed. If no option is selected by March 11, then option 01 (traditional approach) will be used as the default option (not the block 01 lecture format option) B2 Labs and Case Studies: 40% of your overall course grade. 2.1 Overview of Labs and Case Studies: Exploring Real Data with R During lab, we will delve into the exciting world of data analysis using R, a powerful tool for statistical computing and graphics. These lab sessions are designed to complement and enhance your understanding of the lecture material, offering you hands-on experience with real-world data and practical applications. While lab attendance is not mandatory, we strongly encourage you to actively participate in lab discussions. Attending labs will enhance your grasp of the material and offer practical insights that contribute to your overall success in the course. Your first lab will meet the week of January 27th. 2.2 Expectations for Lab Preparation To make the most of your lab session, it is essential to come prepared. Keeping up to date with the lecture material is a vital part of effective lab preparation. The lab assignments will build upon concepts discussed in lectures, and your familiarity with these topics will enable you to fully engage in the lab activities and discussions. 2.3 Purpose of Lab Assignments Our lab assignments are carefully designed to provide you with opportunities to apply concepts covered in lectures to real data scenarios. By engaging in these lab activities, you will strengthen your analytical skills, gain proficiency in R, and develop deeper comprehension of the subject matter, all while gaining valuable skills that can be applied to future research or professional endeavors. Note: All lab assignments are submitted via Gradescope. It is incumbent upon students to verify they have uploaded the intended file in the correct format before the stated deadline. Leniency will not be provided to students who mistakenly upload an incorrect or corrupted file and then request a re-evaluation after an assignment deadline. Submissions will not be accepted via email under any circumstances, barring explicit directions from a member of the instructional team. 2.4 Lab Options The course includes six labs leading to three major case study assignments. Like with lecture participation, you can elect how you would like your lab work to be evaluated. You can choose between two lab options, labeled the Traditional Lab and Active Lab options. The Traditional Lab option benefits from increased flexibility when it comes to attending in-person lab meetings; the Active Lab option benefits from the option to work together and submit in pairs. The options also differ in terms of how lab and case study submissions are weighted. Lab option 01: Traditional Lab - Attendance: Not required. Work at your own pace by watching lab videos or attending lab meetings in person. - Grade impact: - Lab work: 5% of overall course grade. - Case Study 01: 8% of overall course grade. - Case Study 02: 12% of overall course grade. - Case Study 03: 15% of overall course grade. - Work submission: all lab and case study assignments must be submitted individually. - Commitment: This decision is independent of the lecture format you select. Students will need to make a lab format commitment by Thursday, January 30th at 8 pm (see Gradescope to make a selection). Once the lab format selection is made, you cannot switch to the other lab option. Your selection applies for the entire semester. Lab option 02: Active Lab - Attendance: Required in person.* (see note below) - Grade impact: - Lab work: 10% of overall course grade. - Case Study 01: 7% of overall course grade. - Case Study 02: 10% of overall course grade. - Case Study 03: 13% of overall course grade. - Work submission: lab and case study assignments can be submitted in pairs. Paired case study submissions (but not labs) are eligible for +2 bonus points. - Commitment: This decision is independent of the lecture format you select. Students will need to make a lab format commitment by Thursday, January 30th at 8 pm (see Gradescope to make a selection). Once the lab format selection is made, you cannot switch to the other lab option. Your selection applies for the entire semester. *Note that, in addition to 1 guaranteed drop throughout the semester, we will be implementing the following attendance policy for students who have selected the Active Lab approach: Active Lab students are afforded one excused absence per semester. If a student cannot attend lab in a given week, they are welcome to complete and submit the associated lab assignment outside of their lab for full credit evaluation. Any additional lab absences will result in a 10% penalty on lab/case study assignments submitted that week. As an example: There are 8 required lab meetings Active Lab students must attend this term. Suppose an Active Lab student misses two of these lab meetings, but still completes and submits the associated lab assignments. The first will be evaluated for full credit, but the second will be evaluated with a 10% penalty. Then, at the end of the semester, the guaranteed drop will be applied to the lowest score across all lab assignments submitted across the entire semester. Late submissions for lab assignments: We offer a 1-hour late submission window for all lab assignments without any penalty. No submissions are accepted after this 1-hour extension. Students are responsible for ensuring they have uploaded the intended file in the correct format before the deadline. Late submissions for case study reports: We offer a 1-hour late submission window for all case study assignments without any penalty. Thereafter, we offer an additional 23-hour late submission window at a 10% penalty to the student’s overall grade (e.g., a case study that is submitted 3 hours late cannot earn above 90%). Students are responsible for ensuring they have uploaded the intended file in the correct format before the deadline.
Econ 190 ASSIGNMENT #2: EXPERIMENTAL DESIGN & HYPOTHESES SECTION The first section of the paper that you will write is actually the second section of the pa- per. The first section is the introduction, but we will write the introduction at the very end. As I mentioned in class, you can think of the introduction as a version of an ‘execu- tive summary’ of the paper. It is difficult to write a good executive summary before you actually have the rest of the paper. The Experimental Design & Hypotheses section consists of four parts, as we saw in class: (1) Subsection 2.1 Basic Environment (2) Subsection 2.2 Treatments (3) Subsection 2.3 Hypotheses (4) Subsection 2.4 Procedures Let me go over each subsection, as I did in class. For the assignment you will work on the Sec2-Design.tex file of your overleaf folder. Subsection 2.1 Basic Environment Here you have to describe the problems at the heart of the study. You can start by de- scribing what a lottery is. You can say, for example, that a lottery L(Y,Z) is an object that pays Y with 50% chance and Z with 50% chance. You can then say that each problem involves a choice between two options: a relatively safer (S) and a relatively riskier (R) lottery. And you can also describe how each option can be generically described as: X + L(Y,Z). Then you would describe the three frames. For example, in the ‘lottery frame’ you would have X=0. In the ‘INS+ frame,’ you would have a positive X. But notice that you can- not just say that Y and Z in the INS+ frame are the same as in the lottery frame because then it would not just be a change of frame. So, here is a suggestion on how to do it: use subscripts. You would describe an option in the lottery frame as XLot + L(YLot,ZLot ) and say that XLot=0. To do the INS+ frame you would say that an option is XIN S++ L(YIN S+,ZIN S+). To make it clear that it is just a frame, you would say that XIN S++ YIN S+=Y Lot and X IN S++ ZIN S+=ZLot. An Aside: You may be wondering: ‘How doI write a subscript. using latex?’ The easiest way to find out is: google it and there will be somebody describing the answer. But for this one, I’ll add something here. To write X IN S+, what I actually needed to type in latex is X$_{INS+}$. The $ tells latex that something ‘mathy’ is about to start. The _ is the way to indicate: ‘subscript’. If you wanted to indicate superscript, you would have to type ^ instead. The { } indicates what you want latex to write as a subscript. Finally the $ tells latex that themathy part is over. In the same manner, you can introduce the ‘Ins- frame’. Then you can introduce the 10 problems using the Table there. In the the code Sec2- Design.tex file, find the code for the table (starting approximately inline 6). In that piece of code you can see the following line: label{tab:Values}. This line there creates a label. You will use this label to refer to this table. For instance, if you want to latex to write: “Ta- ble 1 presents all 10 problems” you would actually write: “Table ref{tab:Values} presents all 10 problems” You can describe how the problems differ, using the table. You can describe that the first four problems have expected payoffs for the safe option higher than for the risky option, that problems 6-9 have the opposite, and that problems 5 and 10 have dominated options. Then explain that each problem can be organized depending on σ . [The way you write σ in latex is by typing $sigma$.] You don’t need to go into details on what a CRRA is. Maybe you just want to say something like this: “According to the CRRA, a payoff of x generates utility given by: u (x) = x(1−σ)/(1 − σ) if σ ≠ 1 and u (x) = ln(x) if σ = 1. Negative coefficients indicate risk lovingness, σ = 0 captures risk neutrality, and positive coefficients indicate risk aversion.” [You may wonder how to write the math in the previous paragraph using latex. For latex to print u (x) = x(1−σ)/(1−σ) if σ ≠ 1, what you actually have to write is $u(x)=x^{(1-sigma)/(1- sigma)$ if $sigmaneq1$]}. I assume that from this you can figure out how to write the case where σ = 1.] You can simply explain that for each problem it is possible to solve for the value of the parameter σ in a CRRA utility function that would make a decision maker indifferent between the two options. You can even use problem 1 as an example and describe in words what σ = −0.42 means there, as I did in class. Then use that to explain what happens as you move to other problems. This subsection can take a page or maybe a page and a half. If you want to explain for longer, that is totally fine. Subsection 2.2 Treatments Here you have to describe the three treatments that we covered in class. First, explain that it will be a between-subjects design. Recall that this means the follow- ing. Subjects will be assigned to participate in only one of the three treatments. Describe the thing that treatments have in common: • Participants face 40 choices. • There are blocks of 10 choices, that correspond to the 10 problems described in the previous part. • Each treatment has two parts. Each part involves 20 rounds (2 blocks of 10 prob- lems). • All treatments have one part of 20 rounds in which subjects face the 10 problems the lottery frame. twice. Describe then how treatments differ: • In the Insurance+ treatment the other part with 20 rounds involves two blocks of 10 problems in the‘INS+ frame’. • In the Insurance- treatment the other part with 20 rounds involves two blocks of 10 problems in the‘INS- frame’. • In the Insurance treatment the other part with 20 rounds involves one block of 10 problems in the‘INS+ frame’and another block of 10 problems in the‘INS- frame’. Recall to describe how things are randomized: • Within each block of 10 problems the order in which participants face the prob- lems is random. • Which of the two parts of 20 rounds participants see first and which one they see second is also random. • In each problem, which of the two options is presented first and which is pre- sented second is randomized. This subsection should not take more than a page. Subsection 2.3 Hypotheses Here you need to describe the two hypotheses that we covered in class. For this, you need to describe how we will classify each participant in each block of 10 problems. Here it is useful to refer to each block of 10 problems as‘an elicitation.’Recall that for each block of 10 problems (each elicitation) a participant can be classified in one of seven‘bins’or‘intervals for where their σ would lie’. The seven intervals are described in detail in the slides Iused in class. So, you will describe the seven bins. And you will explain that based on their answers to a block of 10 problems, a participant is classified in one of the 7 intervals. It is useful to introduce notation here. For some elicitation A, you will say that IA is the interval that the subject was assigned to. That is,IA ∈ 1, 2..., 7 so that if, for example,IA =3 it means that in elicitation A the participant’s choices placed her in the third interval. Then you can state the hypotheses, which I will write in more words here than I did in the slide in class: • Hypothesis 1 (within frame): For two elicitations A and B of the same frame, we say that a participant’s preferences are stable in that within-frames comparison if IA =IB. • Hypothesis 2 (across frames): For two elicitations A and B of the different frame, we say that a participant’s preferences are stable in that across-frames comparison if IA =IB. This subsection should take approximately a page, maybe a bit less, maybe a bit more. Subsection 2.4 Procedures For this subsection simply follow the procedures slides from class. You can say that par- ticipants are Amazon Turk workers and describe the final samples in each treatment. You can then describe how there was an instruction period before participants faced the forty problems and how making mistakes in the instructions would disqualify them from the rest of the study. Explain that no feedback was provided after each decision and how a participant was paid. Let me remind you what the ‘bonus part’ in the slide refers to. After participants com- pleted the 40 problems, they were presented with three simple adding/subtracting prob- lems. Finally, describe the average earnings of a participant and the average duration of the study. For further details, see the screenshots of the full study that I posted on canvas. This subsection should not take more than a page.
STATS 3DA3 Homework Assignment 2 Instruction • Due before 10:00 PM on Tuesday, February 11, 2025. • Submit a copy of PDF with your solution to Avenue to Learn. You don’t need to write the questions in your answers. • Late Penalty for Assignments: A 15% penalty will be applied for each day an assignment is submitted after 72 hours past the due date (rounded up). This includes accommodations for extended time through SAS. • Assignments submitted after 72 hours will receive a grade of zero. • Your assignment must conform to the Assignment Standards listed below. Assignment Standards • Write your name and student number on the title page. We will not grade assignments without the title page. • Quarto Jupyter Notebook is strongly recommended. • Eleven-point font (times or similar) must be used with 1.5 line spacing and margins of at least 1~inch all around. • Use newpage to write solution for each question (Question 1, 2, 3). • No screenshots are accepted for any reason. • The writing and referencing should be appropriate to the undergradaute level. • You may discuss homework problems with other students, but you have to prepare the written assignments yourself. • Various tools, including publicly available internet tools, may be used by the instructor to check the originality of submitted work. • Assignment policy on the use of generative AI – Generative AI is not permitted in the assignments, except for the use of GitHub Copilot as an assistant for coding. – Clearly indicate in the code comments where GitHub Copilot was used as a coding assistant. – In alignment with McMaster academic integrity policy, it “shall be an offence knowingly to submit academic work for assessment that was purchased or acquired from another source”. This includes work created by generative AI tools. Also state in the policy is the following, “Contract Cheating is the act of”outsourcing of student work to third parties” with or without payment.” Using Generative AI tools is a form. of contract cheat- ing. Charges of academic dishonesty will be brought forward to the Office of Academic Integrity. For all the questions, use Python 3.11.5 and virtual environment. Then, install the required libraries for text mining and Shiny visualization. Question 1: Word Cloud Analysis Let’s explore the article “Data Science and Engineering With Human in the Loop, Behind the Loop, and Above the Loop” by Xiao-Li Meng (2023). Follow the steps below to create and analyze a word cloud for pages 2–5 of the article. (1) Add the article “Data Science and Engineering With Human in the Loop, Behind the Loop, and Above the Loop” by Xiao-Li Meng (2023) to your reference list. (2) Download the PDF of the article. Hint: • Access the article via https://doi.org/10.1162/99608f92.68a012eb. • Click the Download button in the top-right corner, and choose the PDF format. • Move the downloaded file to your working folder and rename it as paper.pdf. (3) Use pdfplumber.open() to open the PDF. (4) Extract the text from pages 2 to 5. (5) Combine the text from these pages into a single string. (6) Split the string by lines using . (7) Create a pandas data frame named df with a column labeled line containing the split lines. (8) Break each line into individual words. (9) Convert each word into a separate row in the data frame. (10) Convert all words to lowercase. (11) Remove stop words. (12) Remove unsuitable words using the following steps: Hint: (i) Remove rows where the word column contains punctuation using • str.contains(r'[,. •‘”“:’;()[]]', regex=True)] (ii) Remove rows where the word column contains numbers using: - str.contains(r'd', regex=True)] (iii) Remove rows where the word column contains single letters using: - str.contains(r'^[a-z]$', regex=True)] (13) Create a term-frequency data frame. Hint: (i) Calculate the frequency of each unique word using: value_counts().reset_index() (ii) Save the result in a DataFrame called freq. (14) Generate a word cloud for the most frequently occurring words (e.g., the top 10 words). (15) Write a summary paragraph (at least two statements) about your word cloud. The summary can include any limitations of your analysis and provide context based on the chosen text. Question 2 Greenhouse gases (GHGs) play a significant role in global warming by capturing and retaining solar heat energy, leading to elevated global temperatures. In 2004, Canada launched the Greenhouse Gas Reporting Program (GHGRP) to monitor and record emissions from facilities that release 10 kilotonnes or more of greenhouse gases, measured in CO2-equivalent units. Facilities meeting this threshold are required to submit annual reports to Environment and Climate Change Canada. The dataset is publicly accessible through Canada’s Open Government Portal: Greenhouse Gas Reporting Program (GHGRP) - Facility Greenhouse Gas (GHG) Data. For Question 2, we have downloaded the dataset PDGES-GHGRP-GHGEmissionsGES-2004- Present.csv from the portal. This analysis focuses on creating a Shiny App to explore trends in greenhouse gas emissions across Canada’s provinces and territories, measured in CO2-equivalent units. Data dictionary: The dataset, spanning from 2004 to the present, includes emissions data (in tonnes and CO2- equivalent tonnes) for each facility, categorized by gas type, including carbon dioxide (CO2), methane (CH4), nitrous oxide (N2O), hydrofluorocarbons (HFCs), perfluorocarbons (PFCs), and sulphur hexafluoride (SF6). It also provides the province or territory where each facility is lo- cated. For further details, refer to the Greenhouse Gas Reporting Program (GHGRP) - Facility Greenhouse Gas (GHG) Data. Pre-Processing Steps To simplify the task of creating a Shiny App, we have pre-processed the data as follows: We start by importing the necessary libraries for data transformation: import numpy as np import pandas as pd import re Next, we read the downloaded dataset in CSV format with the specified encoding (latin1): df = pd.read_csv("GHG_Emissions.csv", encoding='latin1') The column names in the dataset are a mix of English and French. We use the clean_column_names() function to standardize the column names by removing French names, non-ASCII characters, and unnecessary symbols. Here is the clean_column_names() function: # clean_column_names function def clean_column_names(column_names): cleaned_names = [] # loop through each column name for name in column_names: # convert names to ASCII and remove non-ASCII characters name = name.encode('ascii', 'ignore').decode('ascii') # remove everything after '/' (French column name) name = re.sub(r'/.*', '', name) # remove parentheses name = re.sub(r'[()]', '', name) # remove extra whitespace name = ' '.join(name.split()) cleaned_names.append(name) # return new column names return cleaned_names We then apply this function to clean the column names in the DataFrame. df.columns = clean_column_names(df.columns) Next, we select the relevant columns for the analysis: • Reference Year - the year GHG gas emission was recorded. • GHGRP ID No. - the facility identity. • Facility Province or Territory - province or territory of the facility. • CO2 tonnes - emissions (in tonnes and tonnes of CO2 eq.) of carbon dioxide (CO2). • CH4 tonnes - emissions (in tonnes and tonnes of CO2 eq.) of methane. • N2O tonnes - emissions (in tonnes and tonnes of CO2 eq.) of nitrous oxide. • SF6 tonnes- emissions (in tonnes and tonnes of CO2 eq.) of sulphur hexafluoride. • HFC Total tonnes CO2e - emissions (in tonnes and tonnes of CO2 eq.) of hydrofluorocar-bons. • PFC Total tonnes CO2e - emissions (in tonnes and tonnes of CO2 eq.) of perfluorocarbons. selected_cols = [ "Reference Year", "GHGRP ID No.", "Facility Province or Territory", "CO2 tonnes", "CH4 tonnes", "N2O tonnes", "SF6 tonnes", "HFC Total tonnes CO2e", "PFC Total tonnes CO2e" ] df= df[selected_cols] We rename the columns to make them more concise and consistent: df.rename(columns={ "Reference Year": "Year", "GHGRP ID No.": "Facility_ID", "Facility Province or Territory": "Province_Territory", "CO2 tonnes": "CO2", "CH4 tonnes": "CH4", "N2O tonnes": "N2O", "SF6 tonnes": "SF6", "HFC Total tonnes CO2e": "HFC", "PFC Total tonnes CO2e": "PFC" }, inplace=True) print(df.head()) Finally, we save the pre-processed data to a new CSV file: df.to_csv("cleaned_GHG_Emissions.csv", index=False) The pre-processed dataset is now available for analysis and can be accessed at: https://raw.githubusercontent.com/PratheepaJ/datasets/refs/heads/master/cleaned__GHG__Emissions.csv. You will use this dataset for Question 2. Next Steps The following questions guide you through creating a Shiny App to explore trends in CO2, CH4, and N2O emissions across provinces and territories in Canada from 2004 to 2022. (1) Read the pre-processed data from the provided link. (2) Ensure that the year variable is in the correct format. If not, convert it to the date-time format and extract the year. Replace the original ‘Year’ variable with the extracted year. Hint: Use the following command to convert the year: to_datetime(df['Year'], format='%Y').dt.year (3) Some territories may have no facilities reported in early years. Group the data by Year and Province_Territory to count distinct Facility_ID values. Find which territories are missing in 2004. Hint: Use the following code to group the data and find missing territories: df.groupby(['Year', 'Province_Territory']).agg( facilities=('Facility_ID', 'nunique') ).reset_index() (4) Find the earliest and latest year emissions were recorded. (5) Group the data by Year and Province_Territory and sum the emissions of CO2, CH4, and N2O for each province. Hint: Use the following code to calculate the total emissions: df.groupby(['Year', 'Province_Territory']).agg( CO2=('CO2', 'sum'), CH4=('CH4', 'sum'), N2O=('N2O', 'sum') ).reset_index() (6) Plot the CO2 changes over the years for each province and territory, using colored lines to differentiate between them. Note: you will use the dataset obtained in (5) for this plot. (7) Provide a description of the CO2 emission trend across provinces and territories based on the plot in (6). (8) Develop a Shiny app that allows the user to input a start year (from 2004 to 2022), an end year (from 2004 to 2022), and select a gas type (CO2, CH4, N2O). • Use ui.input_select to allow the user to specify the start year (between 2004 and 2022). • Use ui.input_select to allow the user to specify the end year (between 2004 and 2022). • Use ui.input_select to allow the user to select the gas type (CO2, CH4, or N2O). You can start by using the following Shiny app template to structure your app. When writing the app in app.py, remove the template instructions and replace them with your implementation. You will also need to copy-paste your app.py in your assignment answers, similar to the template provided here: # load the required libraries # define the UI for the Shiny app app_ui = ui.page_fluid( ui.input_select( id='emissiontype' label='Choose emission type', # Add more gases as necessary in ... choices=['CO2', '...', '...'], selected='CO2' ), ui.input_select( "start_year", "Start Year", [str(year) for year in range(2004, 2023)] ), ui.input_select( "end_year", "End Year", [str(year) for year in range(2004, 2023)] ), ui.output_plot('myplot') ) # define the server function for the Shiny app def server(input, output, session): @output @render.plot def myplot(): # Read the pre-processed data # from the provided link df = ... # Convert 'Year' column to date-time # format and extract the year df['Year'] = ... # Filter data based on the # selected start and end year start_year = int(input.start_year()) end_year = ... df = df[(df['Year'] >= start_year) & (df['Year']
Problem Set 1 Due: Friday, February 7, 5:00 p.m. Eastern Time Submission Instructions: Upload a Single PDF File to Canvas, under “Assignments” Applied Econ 440.602: Macroeconomic Theory Spring, 2025 1. Growth Rates. In this question, you’re asked to consider some variable — call it xt — that’s changing over time. The subscript. t refers to the time at which the variable is observed, so the sequence of numbers x1, x2, x3, . . . refers to values of the variable in time periods 1, 2, 3, . . .. For example, if xt stands for GDP, and if GDP is measured on a yearly basis, then x1 would stand for GDP in year 1, x2 would stand for GDP in year 2, and so on. GDP is a concrete example of a variable that’s changing over time, but the ideas here apply to any variable that’s changing over time. Let’s introduce the notation ∆xt to refer to the change in xt between periods t − 1 and t: ∆xt ≡ xt − xt−1. (1) Notice the “≡” in the above expression; this symbol means that ∆xt is defined as xt − xt−1. Again, for example, suppose that xt stands for GDP in year t; then, ∆xt is the change in GDP between year t − 1 and year t. If we write ∆x2, then it means the change in GDP between year 1 and year 2: ∆x2 = x2 − x1. (2) The difference in a variable between period t − 1 and period t should not be confused with the growth rate of a variable between period t−1 and period t. Let’s introduce the notation %∆xt to refer to the growth rate of xt between period t − 1 and period t: %∆xt ≡ xt−1/xt − xt−1. (3) As before, the “≡” means that %∆xt is defined as xt−1/xt − xt−1. Whereas ∆xt is the change in xt from one time period to the next, %∆xt is the percent change or the growth rate. Notice that saying %∆xt = g is equivalent to saying: xt = (1 + g) × xt−1. (4) Equation (4) comes from replacing %∆xt with g in equation (3) and rearranging terms. As a point of caution, %∆xt needs to be multiplied by 100 to be converted to a proper percentage: Saying that “xt grew by 5%” is equivalent to saying that %∆xt = .05. Calculations involving growth rates arise frequently in macroeconomics. Economic growth refers to the growth rate of real output; inflation refers to the growth rate of prices; a rate of return refers to the growth rate of the value of an asset. (a) Suppose that xt = yt + zt. Show that the growth rate of xt is a weighted average of the growth rates of yt and zt: %∆xt = xt−1/yt−1 × %∆yt + xt−1/zt−1 × %∆zt. (5) In general, when I ask you to show something, I mean that you should justify the given statement as being correct. In this case, I’m asking you to verify that equation (5) is correct, given that xt = yt + zt, and given the definitions of %∆xt, %∆yt, and %∆zt. It’s acceptable for you to undertake any sequence of steps that makes the left-hand side of equation (5) equal to the right-hand side. You just have to make it clear what steps you’re undertaking, and in what order. (b) Suppose that xt = yt × zt. Show that: (1 + %∆xt) = (1 + %∆yt) × (1 + %∆zt). (6) (c) In many applications, percent changes are practically small at short horizons. For example, quarterly real GDP growth and quarterly inflation in the U.S. have historically been in the single digits. Suppose that %∆yt ×%∆zt ≈ 0. (If yt and zt each grow by one percent, for example, then %∆yt = %∆zt = .01, so %∆yt × %∆zt = .0001, which is one percent of one percent.) Show that, if xt = yt × zt, then the growth rate in xt is approximately the sum of the growth rates of yt and zt: %∆xt ≈ %∆yt + %∆zt. (7) To justify equation (7), you can take equation (6) as given. If xt = yt ÷ zt, then how would you approximate %∆xt in terms of %∆yt and %∆zt? (d) Let’s test the accuracy of the approximation you just derived in question 1c, while also getting acquainted with some actual data on the U.S. economy. A useful source of economic data is FRED, which is maintained by the Federal Reserve Bank of St. Louis: https://fred.stlouisfed.org/. Download quarterly seasonally adjusted data on nominal GDP and real GDP. (In FRED, the variable code for nominal GDP is GDP, and the code for real GDP is GDPC1.) Recall that: Nominal GDP = Real GDP × Price Level. (8) For each date t for which data is available, compute a price level series pt by taking the ratio of nominal to real GDP. (This measure of the price level is called the GDP deflator.) The inflation rate is defined as the growth rate of the price level in the economy. For each date t, compute the (exact) inflation rate as %∆pt, and plot your results over time. Now, use the approximation from question 1c to calculate the (approximate) inflation rate as the growth rate of nominal GDP minus the growth rate of real GDP. Plot the difference between the exact inflation rate and the approximate inflation rate. Is the approximation a good one? 2. Logs and Growth Rates. Recall the definition of the natural logarithm: We say that log (x) = y if x = e y , where e = 2.718 . . . is a known constant. Taking the log of a variable can provide a useful data transformation. For the purposes of treating data, it might help just to think of the log function as a particular function with some appealing properties, which we will explore in the questions below. (a) Recall the following property of exponents: ab × a c = a b+c , (9) where a is any positive number. Given the above, show that: log (x × y) = log (x) + log (y) (10) log (x ÷ y) = log (x) − log (y). (11) (b) Consider a sequence of numbers: x0, x1, x2, . . .. Define yt ≡ log (xt). If %∆xt is equal to gt, then what is ∆yt? (c) If ϵ is a small number, then one can use the first-order Taylor-series approximation: log (1 + ϵ) ≈ ϵ. (12) Again, growth rates of economic variables are often small over short horizons. Argue that, if yt = log (xt) and %∆xt is close to zero, then: ∆yt ≈ %∆xt. (13) Hint: Use your answer from question 2b and apply the approximation for log (1 + ϵ). (d) As before, we can look at some real data to see how well this approximation works in practice. Using the data on the GDP deflator from question 1d, let pt denote the price level. For each date t for which data is available, calculate exact the exact inflation rate as %∆pt, and calculate the approximate inflation rate ∆ log (pt). Plot the difference between the exact inflation series and the approximate inflation series. Is the approximation a good one? (Hint: If you’re doing this in Microsoft Excel, then use the function LN to compute natural logs.) 3. Real vs. Nominal Interest Rates. The U.S. Treasury sells a type of bond called a Treasury Inflation-Protected Security (TIPS). The amount that these bonds pay out is indexed to inflation, so if the price of goods and services goes up, then you receive more cash when the bond matures. Precisely, if you buy a TIPS at time t with a face value of F and a maturity of n, then the Treasury promises to give you pt/pt+n F dollars in period t + n. Here, pt is the Consumer Price Index (CPI), which measures the cost of a basket of commonly consumed goods. (a) Write the bond’s payout pt/pt+n F in terms of the path of inflation (πt+1, πt+2, . . . , πt+n), where πt ≡ pt−1/pt−pt−1. (Your answer should also contain F, but not any pt terms.) (b) Is the yield to maturity on TIPS a real interest rate or a nominal interest rate? Why? (c) Go to FRED (https://fred.stlouisfed.org/) and download data on the yields for 5-year TIPS and 5-year standard treasury bonds. The codes for these variables in FRED are DFII5 and DGS5, respectively. Use the monthly versions of these variables, which you can get by clicking on “Edit Graph” and using the drop-down menu for “Modify Frequency” to select “Monthly.” i. Make two graphs. On the first, plot the two series for yields on the same set of axes. On the second graph, plot the difference between the yield on the standard bond and the yield on the inflation-protected bond. The graphs should include all dates for which both series are available (2003 to present). ii. Do the two yield series tend to move together? How do you interpret the difference between the two yields?
ITS63304 Object-Oriented Programming Re-sit Coursework (60%) September 2024 Module Learning Outcome (MLO) MLO 1: Apply the appropriate programming concepts and skills to evaluate and solve a given problem. MLO 2: Demonstrate capability to interact positively within a peer group, consider other viewpoints, and foster stable and harmonious relationships in solving computational problems related to object-oriented programming language. Problem Background Coastal cities face increasing threats from climate change, including rising sea levels and extreme weather events. Sustainable infrastructure is essential to mitigate these impacts. Your task is to develop a Climate-Resilient Building Evaluation System using Java language and Object- Oriented Programming (OOP) concepts to assess building designs based on flood resilience, energy efficiency, and sustainability. Program Requirements You are required to write a working Java OOP program that satisfies the following requirements: • Create a Building class with the following: • name (String): The name of the building. • height (double): The height of the building in meters. • floodResilienceScore (int): Score (0-10) representing flood resistance, that measureshow well the building can resist flooding. • energyEfficiencyScore (int): Score (0-10) for energy efficiency, that measures how energy-efficient the building is (e.g., based on renewable energy use). • sustainabilityScore (double): A calculated score based on flood resilience and energy efficiency. • A constructor to initialize the attributes (name, height, floodResilienceScore, energyEfficiencyScore). • Implement the following methods in the Building class: • calculateSustainabilityScore(): Computes the sustainability score using the below formula: sustainabilityScore = (floodResilienceScore + energyEfficiencyScore) / 2 • isFloodResilient(): Returns true if floodResilienceScore ≥ 7, otherwise returns false. • printBuildingInfo(): Displays the building’s name, height, flood resilience score, energy efficiency score, and sustainability score. • Main Program Requirements: • Create an array of at least five Building objects with different attributes. • Use a loop to input data for each building, such as name, height, flood resilience score, and energy efficiency score. • After handling the input, calculate the sustainability score for each building by using the calculateSustainabilityScore() method. • Display each building’s information using printBuildingInfo(). • Use selection statements (if-else) to identify and display flood-resilient buildings. • Use iteration (loops) to determine and display the building with the highest sustainability score. IMPORTANT: You need to create a Java console application. A GUI based program will not be accepted for this assignment. Deliverables: 1. A working / executable JAVA console program, that executes the above requirements. (Submit the zip files for your project/source code, no need to submit JAR file). 2. Prepare and submit a maximum 5-minute recorded video presentation explaining your program solution. You must be able to explain how do you solve each requirements given in the question, and points out to the code solution in your program. You must also be able to record your program demonstration / run the program. You must be very clear and confident during the presentation. 3. Prepare a report for the above program solution including the appropriate description and screenshots of code and output. The report must not exceed 25 pages. You MUST include the marking rubrics in the report.
ETW1001 Introduction to Statistical Analysis Group Assignment Semester: Oct Intake, 2025 Due: Monday, 14 January 2025, 11:55 p.m. The unit learning objectives of this assignment are: Assess the relevance and usefulness of predictive modelling to address business and economic challenges. Communicate statistical results to stakeholders effectively to propose business and economic solutions as a team. This assignment is worth 30% of your final mark for this unit. The total number of marks for this assignment is 80. INSTRUCTIONS 1. Make sure that you regularly make back-up copies of your work. Computer, disk, or cloud problems will not be accepted as valid reasons for late submissions or requests for extensions. 2. Students should pay particular emphasis on the narration, and how the results are presented and interpreted. Students should endeavour to ensure that the report is complete and well-composed. Poor presentation, poor command of English writing and/or failure to comply with instructions may result in a mark penalty. 3. Your answer to the questions should be no more than 15 pages (inclusive of graphs and tables). Any part of the report beyond the 15-page limit will be struck out and not marked. (a) Use default format, paragraph, and margin settings. (b) Font size: 12 (c) At least 1.15 line spacing between lines. (d) Reference list is not counted in the 15-page limit. (e) Penalties may apply if the assignment does not conform to the formatting guide- lines. (g) All workings and relevant Excel output must be clearly shown where appropriate as marks will be awarded for workings. Make sure all your workings are included in an Excel file with proper labels. All tables and visualisations must be included in the written report. The presentation of output must be in reasonable size and readable. 4. Students must uphold academic integrity at all times. Any students caught for cheating, plagiarizing or permitting others to plagiarize their work will be reported to the Responsible Officer for academic misconduct in accordance to the Student Academic Misconduct Procedure. Severe penalties may apply resulting from the investigation. 5. Generative AI tools are restricted for certain functions in this assessment task. In this assessment, you can use generative artificial intelligence (AI) in order to conduct research pertaining to the assessment task only. Any use of generative AI must be appropriately acknowledged (see Learn HQ). 6. All submissions will be via Moodle by 14th January,2025 [before 11.55pm] (a) Please type your report in Microsoft Word, save it as a PDF file, and submit the PDF document. Additionally, you must submit the accompanying Excel document. In total, you are required to submit two files: 1. The PDF file (containing all relevant answers). Written report (Format: .pdf) [Should have the name and student ID for each member] 2. The Excel file. Excel workbook (Format: .xlsx). Important: All answers must be included in the PDF file. Only the PDF file will be graded. Any answers found exclusively in the Excel file will not be marked. (b) You will also be required to put your assignment through a Turnitin report. The similarity index should not be more than 20%. Note that this is only a rough guideline we understand that some common usage of phrases and sentences may contribute to the similarity index. Students should not be worried for this particular instance. Problem Scenario Presume that you are a real estate agent working for an international property firm. Your task is to investigate the variables that are relevant in determining house selling prices. The firm has access to a large dataset, and you have selected a sample of 1,250 properties for your analysis. As a property agent, your primary role is to identify and analyze the significant factors that influence house selling prices. By understanding these variables, you can provide valuable insights to clients, assist in strategic pricing decisions, and support the firmin staying competitive in the real estate. Data Download the data file “HousePrice” from Moodle The key dependent variables are as follows: The file contains the following variable: Selling Price: Selling house price in $. [Dependent Variable] Land Value : Land area value in $. Building Value : Total building value in $. Basement: basement room in square feet. Baths: Number of bathrooms. [Note: Most bathrooms contain a toilet and sink as well as a bathtub and shower] Toilets: Number of toilets. [Note: In most houses, the toilet is located within the bathroom. However, in newer homes, it is increasingly common to find toilets situated in separate spaces, such as a powder room or a dedicated hall area, which contain only a toilet and a sink, without a bathtub or shower.] Fireplaces: Number of fireplaces in a house. Beds: Number of bedrooms in a house. Rooms: Rooms without bed such as power room, TV room etc. AC: Indicator variable for house being air-conditioned (1 = air-condition, 0 = otherwise). Age: age of the house. Your group is required to use a subset of the survey data to answer the following questions. Specifically, your sample should consist of 250 consecutive observations, starting from the observation whose ID matches the last three digits of any group member’s student number. For example, if a group member’s student ID is 20275749, group should start with observation 749 and include observations up to 998. Question 1 [Total 40 marks] a) Construct an appropriate chart to illustrate the relationship between the dependent variable on the land value, building value, age of the house, toilets and air condition. Describe the relationship suggested by the charts in part (a). [10 marks] b) Run a Simple Linear Regression (SLR) with the dependent variable on the land value, building value, age of the house, toilets and air condition. The summary output of the SLR should be shown. [5 marks] c) Report the estimated equation from part (b). Label each of the models as Model 1, Model 2, Model 3, Model 4, and Model 5. [5 marks] d) Interpret the estimated values of the regression coefficients for Model 1 and Model 2 only. [Hint: required to interpret intercepts and slopes] [4 marks] e) Obtain a 95% confidence interval for the slope coefficient in Model 1 [You required to show the calculation for the confidence interval. Answer direct from the excel output will not be awarded any marks. You are required to show the working] Interpret your results. [4 marks] f) What is the value of the coefficient of determination for Model 1? Interpret this value. [2 marks] g) Test the null hypothesis that land value is not a significant predictor of the selling house prices at a 5% level of significance against the alternative that are significant. Use the critical value approach. Carefully show all steps. [4 marks] h) Using a p-value approach at a 5% level of significance, test the null hypothesis that building value not a significant predictor of the selling house prices at a 5% level of significance against the alternative that it has a significant positive effect. Carefully show all the steps. [2 marks] i) Predict the selling price of a house if the building value is $70,000. [1 mark] j) Predict the selling price of a house if the building value is $156,000. [1 mark] k) Explain whether the predictions in (i) and (j) are reliable. [2 marks] Question 2 [Total 28 marks] a) Run a Multiple Linear Regression (MLR) with a house selling price as the dependent variable with ALL the independent variables. Name this model as Model 6. Summary output of the MLR should be shown. [3 marks] b) Formulate an appropriate Multiple Linear Regression estimated model [Model 6] that predicts the selling house price. [4 marks] c) Write down the estimated Multiple Linear Regression equation based on Model 6. [3 marks] d) Interpret the estimated coefficient of the land value and air-condition using Model 6. [4 marks] e) What is the expected sign for age of the house? Explain your reasoning. [2 marks] f) Using a p-value approach at a 5% level of significance, test the null hypothesis that age of the house is not a significant predictor of the selling house prices at a 5% level of significance against the alternative that it has a significant negative effect. Carefully show all the steps. [4 marks] g) Without doing any calculation which variables contribute significantly to the prediction of house selling price? Why? [2 marks] h) By removing all the insignificant variables from Model 6 and then form a Multiple Linear Regression with significant variables. [Name it as Model 7]. Summary output should be shown. [2 marks] i) Using an appropriate method compare Model 6 and 7. Which model is better? Explain. [2 marks] j) Using Model 7, predict the house selling price by substituting the fifth observation from your sample. [2 marks] Question 3 [10 marks] Based on your analysis above, write a concise report summarizing the key findings for your firm. Your report should highlight the significant variables influencing house selling prices and explain how these factors can guide strategic pricing decisions. Emphasize the practical implications of the results, such as how the insights can help the firm optimize pricing strategies for the house sellers and remain competitive in the real estate market. Additionally, discuss how these findings can be used to identify trends, improve client recommendations, practical implications of the results, enhance the firm's overall market positioning and recommendations. [Your report should be less than 250 words] Your report should have following scopes: o An introduction to the topic o Key findings or analysis o A conclusion or summary o References if any [10 marks] Formatting [2 marks] The overall report should provide a concise and consistent format with a clear label for each figure. Remember, you are representing your organization to present this study so prepare your report that will be detailed and suitable for readers.
Homework 4: Coding portion AMATH 301, Winter 2025 Due Friday, February 7, 2025, 11:59PM in Gradescope 20 points 1. In this problem we will find the largest (real) eigenvalue of a matrix, and its associated eigenvector, approximately using Power iteration. Create the following matrix as a np.array object called Apower. Make sure not to round fractions when creating Apower. This matrix could be a representation of the web (directed graph) below in Google PageRank, in which case the eigenvector associated with the largest eigenvalue is proportional to the fraction of the time a random surfer is located at each webpage (node). Start at a guess of x0 = [ 1 0 0 0 0 ]T and use Power iteration to repeatedly update xn ; call this new vector xn+1 . The step distance from xn to xn+1 can be quantified by the 2-norm: step = ||xn+1 − xn || 2 . You can use np.linalg.norm(y,2) to calculate the 2-norm, where y is the vector whose norm you desire. Stop the Power iteration as soon as the value of the step is below 10 −5, or after 100 iterations, whichever comes first. This x vector is the (approximate) eigenvector associated with the largest real eigenvalue in absolute value. (a) (2 points) Record the number of iterations taken, as the variable iterspower. Start counting iterations at 1. (b) (2 points) Save your eigenvector as an np.array object named eigvecpower. Make sure that the eigenvector has length ||x|| 2 = 1 and the first component of x is positive. (c) (2 points) Find the associated eigenvalue using the formula: Save that number as the variable eigvalpower. 2. Given the equations: The value [ x y z ]T where all three equations are satisfied is the point of intersection of three surfaces, which is shown below. You can find an interactive version here. Define a Python function f(v) which takes as an argument a vector v = [ x y z ]T as a np.array object, and outputs the vector Then define a Python function J(v) which takes as an argument a vector v = [ x y z ]T as a np.array object, and outputs the Jacobian matrix of f(v): Start with an initial guess v0 = [ 0 0 0 ]T . (a) (2 points) Plug v0 into f(v) and save the resulting f(v0 ) in a np.array object called fv0. Plug v0 into J(v) and save the resulting J(v0 ) in a np.array object called Jv0. (b) (4 points) Perform the Newton-Raphson method: vn+1 = vn + ∆vn where J(vn )∆vn = —f(vn ). Use np.linalg .solve to solve the linear system for ∆vn at each iteration. Terminate when ||f(v)|| 2
Data Science in Economics (Econ 337) Mock Assignment Guidelines 1. The submitted file must be a Jupyter notebook (which, note, can be written through Google Colab, MyLab, or your own local installation of Python and Jupyter, respectively). 2. There is no word limit, however I urge you to present (and interpret whenever possible) the relevant results of your analysis with brevity and precision. Data The data file “labour supply.csv” (which, note, you can download on the ”Econ 337 – Mock Assign-ment (Week 13)” section of the course’s Moodle page) includes a dataset with samples of women with at least two children in the United States. These are some of the variables that you will encounter in “labour supply.csv”: kids: total number of kids boys2 : = 1 if the first two births boys girls2 : = 1 if the first two births girls boy1st: = 1 if the first birth boy boy2nd : = 1 if the second birth boy multi2nd : =1 if 2nd birth is twin age : age of mom agefstm : age of mom at first birth black : =1 if black hispan : =1 if hispanic worked : = 1 if mom worked last year weeks : number of weeks worked, mom hours : hours of work per week, mom labinc : mom’s labor income, in thousands of dollars faminc : family income, in thousands of dollars nonmomi : ‘non-mom’ income, in thousands of dollars educ : years of education for mother To start, import “pandas” and “numpy”: import pandas a s pd import numpy a s np After, load “labour_supply.csv” as a pandas data frame. labour_supply = pd . readcsv (labour_supply . csv) Lastly, run the following code to select a random subset of observations: np . random . seed (your_student_id) a1 = np . random . choice (labour_supply . shape [0] , \ 10000 , replace=False) train_data = labour_supply . iloc [a1, :] This newly drawn dataset of 10,000 observation will be your training sample. Important: You have to insert your actual student ID number in “your student id”... ... for example, you should use np.random.seed(84377968) if your ID is 84377968. Exercises Read each question carefully and answer to ALL questions: (a) Using your training data, report summary statistics (in a table format – printed, you do not need to save a table in a separate file) of hours, kids, age, faminc, edu, labinc, and black. In addition, create a scatterplot matrix of the same set of variables. Draw the histogram of the hours (with the percentage in y-axis). Describe your findings. Are any of the predictors associated with hours? [hint: search on Google how to estimate each type of plot using matplotlib.pyplot] (20 marks) (b) Again, using your training data , generate a dummy variable morekids that equals 1 if the total number of kids (kids) is larger than or equal to 3. Produce boxplots of faminc (y-axis) over morekids (x-axis). Discuss your findings. [Hint: review “econ337_tutorial_2 ” to know how to create dummy variables] (10 marks) (c) Using your training data, estimate the following two linear regression models: Model 1 : hoursi = β0 + β1kidsi + ei Model 2 : hoursi = β0 + β1kidsi + β2faminci + eis. For each model, give a brief interpretation of the coefficient estimates and discuss whether the signs you obtain match your expectations. For the simple regression (Model 1), plot hours and kids along with the least squares regression line. Also, discuss how does the introduction of the variable faminc affects the estimated parameter on kids. What can you infer about the correlation between faminc and kids? Justify your response. [Hint: review “econ337 tutorial 2 ” to estimate a linear regression model] (20 marks) (d) Using the regression results in (c), find the predicted work hours for a mother who has 3 kids and family income of 20,000$, and 95 % prediction interval. [Hint: review “econ337 tutorial 2 ” to predict outputs from fitted models] (10 marks) (e) This question is composed by four sub-questions (all amounting to 30 marks): (e.1) Run an OLS regression of hours on other control variables. Add whichever other controls you might think are appropriate and explain why your selected variables are important. (5 marks) (e.2) Select your regressors by following the “Forward Selection” algorithm (read p.24-26 in the lecture notes of Week 12 [“Linear Regression”] and see below for an explanation of the algo.): Forward Selection - Algorithm: (a) Begin with the null model - a model that contains an intercept but no predictors; (b) Fit k (number of control variables) univariate linear regressions and add to the null model the variable that results in the largest Adjusted R-squared; (c) Enlarge the model fitted in point (b) with the variable that results in the largest Ad-justed R-squared (amongst all possible two-variable models that include the variable found in point (b)); (d) Continue until some stopping rule is satisfied, for example when all remaining vari-ables have a p-value above some threshold (e.g., p-value > 0.1). (10 marks) (e.3) Select your regressors by following the “Backward Selection” algorithm (read p.24-26 in the lecture notes of Week 12 [“Linear Regression”] and see below for an explanation of the algo.): Backward Selection - Algorithm: (a) Start with all variables in the model; (b) Remove the variable with the largest p-value - that is, the variable that is the least statistically significant; (c) The new (k − 1) variable model is fit, and the variable with the largest p-value is removed; (d) Continue until a stopping rule is reached (again, for instance, we may stop when all remaining variables have p-value smaller than 0.1). (10 marks) (e.4) Compare your results with “Forward Selection”, “Backward Selection” and the methods you have used in (e.1), based on your economic reasoning. (5 marks) (f) Choose (at least) three models with different choices of regressors (e.g., those models selected in (e) if these are all different), predicting hours, and fit these models using your 10,000 obs. training sample. Then, select a validation dataset with 50 observations as follows: np . random . seed (your_student_id ∗ 2 + 1) a2 = np . random . choice (range (labour_supply . shape [ 0 ]) , 50 , replace=False) validation_data = labour_supply . iloc [a2] Then, calculate the “Mean Square Prediction Error (or test MSE)” for the three models you selected (where you calculate the MSE by making predictions with each model using as inputs your 50-observation validation dataset). Choose the model with lowest MSE. Discuss your findings. (10 marks)
Module Name: Motorsport Product Innovation Module Code: 6055MAA Assignment Title: Bill of Materials & design Freeze Assignment Task You will be required to complete a manufacturing flow chart, Manufacturing Bill of Materials This document is intended for Coventry University Group students for their own use in completing their assessed work for this module. It must not be passed to third parties or posted on any website. and answer some cost explanation questions for your specific project area. The format of the BOM and flow chart must also align to the standard format provided and should tie into a master BOM collating the cost information for the entire vehicle. The master file will be provided via AULA. Please note, the boundaries between systems should be decided within your sub -teams with NO areas of the vehicle being neglected and no duplicates of parts, identical or otherwise . 1. Flow chart for sub-assemblies 2. BOM for the parts which shows deadlines for the 2024 build (spreadsheet of all parts) 3. Questions to be answered: a. How have you designed to reduce cost of your part, and where have you chosen performance over cost and why (max 250 words) b. Explain choice between inhouse and external supplied parts (max 150 words) c. What are the overheads of the part not seen in the assembly flowchart (max 200 words) d. Create a table of these overheads with estimated hours of work needed for each overhead. Mark Distribution Flowchart (30%) • Use of template • Detail in the flowchart Manufacturing/BoM Spreadsheet (40%) • Completeness of information • Inclusion of fixings and standard parts • Part naming • Sensible process choices • Sensible timings Response to questions (30%) • Logical explanation/justification of statements • Concise explanation For technical report submissions: • Report Layout (10%) • Introduction and definition of objectives (10%) • Manufacturing or simulation Detail (35%) • Evaluation of results in relation to objectives (20%) • Conclusions and further work (15%) • Referencing (10%) Design Freeze Aim As part of your group projects, you have either been assigned to design, evaluate and manufacture a specific component or sub-assembly. Some of you have been designing parts from scratch and others have been looking at the installation of electrical systems or simulation/analysis. If you have designed an electrical system, please refer to Section 1. If you have been designing a mechanical part or subsystem refer to Section 2. If you have been doing a Simulation or Benchmarking project, please refer to Section 3. If you have designed a Cooling system, please refer to Section 4. If you have designed an Aerodynamics part, please refer to Section 5. 1. Electrical systems Produce a complete wiring diagram, this does not mean a wiring schematic, which complies with BS 7845:1996, BS 3939 and BS EN 60617. This must include all pin-in and pin-out labelling, wire gauge, wire lengths, use of correct symbols for each component. 2. Mechanical parts Produce a comprehensive Technical Engineering drawing for apart you are designing, if you are designing more than one part, please liaise with your supervisor to choose an appropriate part. This technical drawing must comply with BS 8888:2013; there is also a link on the 306MAA Moodle page for more information on engineering drawings and standards. Your drawings must include, but not limited to: • Dimensions • Geometrical tolerances • Datum’s • Material 3. Simulation/benchmarking projects Produce a technical report on your findings to date and how your findings are critical to the vehicle’s performance. You need to state your inputs into your analysis and justify the values you have used. If you are using software as part of your work, you must present an overview of how the software works from the inputs to the outputs. 4. Cooling At current you have designed for manufacture very low quantities (one) . As part of the remit for Formula Student cost report you must give consideration for an annual production of 1000 units per year (S4.7.1) . You must consider production methods suitable to manufacture the required number of parts (ducting and heat exchanger) and justify your choice. You must reflect the cost of the entire build of the cooling system (heat exchanger, pump, air ducting and piping) . This might include mould making, mould preparation, body forming, trimming, painting, fitting, etc. You will submit a small technical report (c.1000 words) comparing the cost of manufacture of the RP parts verses alternative methods of production. If your designs require modification include technical drawings. 5. Aerodynamics You are designing the bodywork and/or assessing downforce generating devices for the 2022 FSAE vehicle. As part of the remit for Formula Student cost report you must give consideration for an annual production of 1000 units per year (S4.7.1) . You must reflect the cost of the entire build of the body, floor or wings; accordingly, this will include mould making, mould preparation, body forming, trimming, painting, fitting, etc. You must also present a full set of instructions for the manufacture of the moulds and bodywork for both the way of manufacture for your chosen design and also for a more cost-effective way for the hypothetical 1000 units per year. You will submit a small technical report (c.1000 words) For Electrical and Mechanical systems: • Compliance to relevant British Standards (25%) • Completeness of schematic/drawing (50%) • Manufacturing considerations (25%) Submission Instructions: The submission format for this coursework is a typed technical report to be submitted online through Aula. The technical report needs to cover all the tasks described above and to include supporting diagrams and clear referencing where needed throughout. The report should be submitted as a Microsoft Word document with the following requirements: Report size: The report should be typewritten and the total length of the main report should not exceed 1000 words. You may wish to include some additional pages of appendices. Word count does NOT include title page, contents page, references pages or appendices. Tables and figure captions are also exempt from the word count. Page layout: The margin shouldn’t be “Moderate” or lower i.e. Top and Bottom of 2.54 and Left and Right 1.91. Font size: The acceptable font size is minimum of 10 and maximum of 12. Subdivision - numbered sections: Divide your report into clearly defined and numbered sections. Subsections should be numbered 1.1 (then 1.1.1, 1.1.2, ...), 1.2, etc. Use this numbering also for internal cross-referencing: do not just refer to 'the text' . Any subsection may be given a brief heading. Each heading should appear on its own separate line. It is suggested (but not mandatory) to follow this structure: Recommended report structure: • Flowcart using format provided on AULA page. • Spreadsheet using excel format provided on AULA page. • Word document with questions asked and answers. • Drawings/schematics on given drawing templates. • Reports in word Documents as detailed above. All figures (including graphs), tables and equations should have a number and a caption: Thus all figures and tables should be referred to from the body of the report. Marking and Feedback How will my assignment be marked? Your assignment will be marked by the module team. How will I receive my grades and feedback? Provisional marks will be released once internally moderated. Feedback will be provided by the module team alongside grades release. This document is intended for Coventry University Group students for their own use in completing their assessed work for this module. It must not be passed to third parties or posted on any website. Marks and feedback will be provided via Aula and present on your Handin assignment either commented within the text or within the comments section Your provisional marks and feedback should be available within 2 weeks / 10 working days What will I be marked against? Details of the marking criteria for this task can be found at the bottom of this assignment brief . Assessed Module Learning Outcomes The Learning Outcomes for this module align to the marking criteria which can be found at the end of this brief. Ensure you understand the marking criteria to ensure successful achievement of the assessment task. The following module learning outcomes are assessed in this task: 1. Analyse and define a problem and identify constraints including; environmental and sustainability limitations; health and safety; risk assessment issues; fitness for purpose; production; operation; maintenance and disposal. 2. Analyse and manage cost drivers; applying knowledge of management techniques which maybe used to achieve engineering objectives within that context. 3. Apply and integrate knowledge and understanding of other engineering disciplines to support study of their own engineering discipline; demonstrating the application of a systems approach to engineering problems. 4. Evaluate and apply appropriate codes of practice and industry standards and be able to work with technical uncertainty. 5. Apply themselves professionally, communicating effectively through presentation of written and verbal methods by demonstrating autonomous and group working to develop, monitor and update a plan to reflect a changing operating environment.
ECON2101 Written Question 2 1. Alice, Bill and their mother are deciding how to split a chocolate bar. Assume that the chocolate bar has 8 squares, so can only be divided into multiples of 8/1. Assume also that each only wants to maximise how much chocolate he or she gets. (a) (1 point) Consider the following simultaneous move game: Alice, Bill and the mom each name a fraction of the chocolate bar that would be allocated to them. If the three fractions add up to a number less than or equal to 1, each player gets the share of the chocolate equal to the fraction they named (e.g. if the mom says 4/1 , Alice says 4/1 and Bill says 4/1 , each gets 4/1 of the chocolate). If the three fractions add up to more than 1, each player gets no chocolate. Name one Nash equilibrium of the game in which at least one player gets chocolate. (b) (2 points) Does the game in (a) have any Nash equilibria in which no player gets any chocolate? If yes, state one such NE. If not, explain why not. (c) (2 points) Consider the following sequential move game: in the first stage, the mom divides the chocolate bar into 3 pieces. In the second stage, Alice takes one of these three pieces. In the third stage, Bill takes one of the remaining two pieces. The mom then gets the piece that remains. This game has two SPNE. In both of them, the mom gets the same fraction of the chocolate. What is this fraction? Explain in two sentences, and feel free to include a drawing if it helps.
Assessment Task Information Key details: Assessment title: Statistical Investigation Module Name: Introduction to Advanced Statistics Module Code: PM608 Assessment will be set on: Beginning of Cycle 3 Feedback opportunities: peer feedback in class, online feedback from class teacher 2 week before submission deadline. Assessment is due on: 9:00 am UK time on 18 February 2025 Assessment weighting: 50% Assessment Instructions What do you need to do for this assessment? Task: You are required to complete a written Statistical Investigation, which will involve researching a topic and question. From the VLE page, you will be provided data set and scenario for this assessment. You will introduce the topic by providing a historical or theoretical background and you will explain how the research question will be answered. You will descriptively analyze the data by use of calculations and graphs. You will complete a written analysis of the data, which will inform. your conclusion. Any sources used will be referenced and analyzed sample data will be included in an Appendices section. Your tutor will provide support and feedback during the weeks leading up to the deadline. You must submit the Statistical Investigation on the VLE and via Turnitin by 18 February 2025, 9:00 am UK time. Guidance: For this assessment you should make use of the following formative activities that you have already completed. These activities have been designed to support this summative assessment: • Peer feedback on proposal to receive feedback. • Workshop with tutor. Deadline for draft submission: 4 February 2025, 9:00 am UK time. Note: Draft submission is compulsory. You do not have to act on their feedback, but you may find it useful to enhance your final submission. Please note: This is an individual assessment so you should not work with any other student. Structure: The Statistical Investigation will be typed as a Word document, with sections and subheadings. Any graphs created using software such as Excel will be inserted into the Word document. Your report should be divided into the following sections. 1. Title page 2. Introduction Outline the purpose of you report and the data used. Explain to the reader the questions you hope to answer and the software you will use. 3. Methodology • Using the data, you should use an appropriate random sampling method to choose a sample of size of 30 for each category (treatment). • Describe the methods used to analyse the data (e.g., statistical analysis, regression analysis, confidence interval). 4. Calculations and Graphs You must include: • A full numerical summary of the data, which includes the 5-number summary, measures of central tendency, measures of variation and skew and shape of the data. • Appropriate graphical representations (e.g., histograms, box plots).The graphs should be presented and labelled appropriately. • Comments on the graphs shown. From the data provided and sample selected, you must highlight any: • possible errors in measurement • outliers You must describe their effect on your conclusions. You should select and justify what statistical methods you will use to identify any statistical links between the variables in the data, and to link this with the questions you wish to answer. 5. Analysis of data a) Regression Analysis. You must include: • three scatter plots • three best fit regression lines • three correlation coefficients, • three residual plots. • comments on the correlation and regression coefficient, including the possible effects of any outliers and/or high influential values. • comments on the validity of the regression model, using all the scatterplots, regression lines, correlation coefficients, and residual plots to do this. • comments on how the collection method of the data and the quality of the data effects the validity of the models. b) Confidence intervals for the difference in means. You must include: • How you are categorizing the data and what 2-sample confidence interval you will use. • You must think about how you are going to compare the data sets. • You must pick two confidence levels, stating clearly what confidence level you will use and why. • Full calculations must be included for each interval. • A discussion on the physical interpretation of the two intervals. • Comments on how the collection method of the data and the quality of the data effects the validity of the intervals. 6. Conclusion You should summarize any findings in the form. of supported recommendations. The clarity of these recommendations and their reasons are paramount. 7. References 8. Appendices – sample of the dataset you received after sampling. Theory and/or task resources required for the assessment: You may use your textbook, notes, PowerPoints etc. You will use a variety of academic sources from which you will collect data. Your work and ideas must be your own and/or correctly referenced. 1: You will have to demonstrate skills in finding the measures of location and spread and creating charts. You will also need to compare scores on different datasets. 2: You will have to demonstrate skills in creating scatter graphs, finding correlation and regression coefficients and interpreting these results. 3: You will have to demonstrate skills in random sampling, constructing grouped frequency tables, graphing data sets, and calculating confidence intervals. 4: You will have to demonstrate skills in the use of Microsoft Excel for data analysis. 5: You will have to make a reasoned written recommendation based on your analysis of the data. Referencing style.: Any sources used must be referenced and included in a Harvard style. reference list at the end of your report. There should be at least 4 references in your report. Expected word count: You must include all the recommended sections but there is no set word count. Learning Outcomes Assessed: 1. Critique original research data sets relevant to their field of study selecting appropriate statistical methods. 2. Discuss the relevance, validity, and reliability of statistical methods in the context of experimental design. 3. Evaluate and interpret scientific information and data, both qualitative and quantitative, relevant to applications of their subject area
Department of Economics (Spring 2025) EC203 A1 Empirical Economics 1 (T,Th 12:30-1:45, CAS 211) Course Description: This is an introductory level course in empirical analysis, i.e. applied statistics for economists. The purpose of the course is to gain an understanding of the uses and limitations of statistical methods as applied to a wide range of economic phenomena and policies, and to train students to use data to investigate economic questions. The first part of the course introduces descriptive statistics, and provides a foundation in probability and distribution theory. The second part of the course discusses random variables and the distributions of random variables. The third part of the course discusses statistical inference, e.g., hypothesis testing, confidence intervals, goodness-of-fit tests, and basic regression analysis. The topics covered in this course provide the foundation required to successfully complete EC 204: Empirical Economics II which will focus on applied econometrics. Hub Learning Outcomes: This class fulfills the Quantitative Reasoning I Hub Capacity. Students will be provided with an introduction to statistics, beginning with descriptive statistical analysis though basic regression analysis. Throughout the class students will be taught how to use an econometrics software package (Stata) in the context of each statistical concept on the syllabus, and to the extent possible, in the context of economics-related empirical research questions. Our goal is to provide students with the tools needed both to perform. statistical analysis of their own, and to be critical consumers of reported statistical evidence, i.e. concept of endogeneity, causality, omitted variables biases appear at different levels of sophistication throughout the sequence. Department Outcomes: Within the economics department, EC203 is half of a full-year empirical analysis sequence in economics, the other half being EC204. These classes are part of the core EC200 level courses in both the major and minor, the other two being Intermediate Microeconomics (EC201), and Intermediate Macroeconomics (EC202), and provide the foundations for upper level electives. Prerequisites: EC101 Introductory Microeconomic Analysis and EC102 Introductory Macroeconomic Analysis. This course, or an approved alternative, must be completed before taking EC203. Students who have taken MA115 or the equivalent are placed out of EC203. Course Web Site: All course documents and announcements will be posted on the course site, which can be accessed at https://learn.bu.edu/. Textbook: Essentials of Statistics for Business and Economics, Anderson, Sweeney, Williams, Camm and Cochran (ASW), 10th edition, South-Western Cengage Learning. The textbook will be available through an electronic purchase through the B&N First Day program, which is much less expensive than buying a paper copy. You can access the text by clicking on the “Course Materials (B&N First Day)” tab. Software: Students are required to use the econometric software package Stata. It can be purchased online at Buy Stata | Student single-user purchases (educational). For the class I suggest that you purchase Stata/BE. You can purchase and annual license for approximately $94 or a perpetual license for approximately $225. You will also be using Stata in EC204. We will start using Stata right away, so students should be sure to buy their copy of Stata within the first week of class. Problem Sets: The problem sets are posted on the course site in the Problem Set Schedule document in the Assignments folder (separate files with the assigned problems are also posted in the Assignments folder as are the needed data files). Students may discuss the problems with each other, but everyone must hand in their own work. You must hand in your problem sets to your TA in the discussion session you are registered in (do not email attachments unless you first get permission to do so from your TA). Your TA will use the discussion session to go through the assigned problems. Discussion Sections: These weekly sessions are an integral part of the course. They are run by a teaching fellow, an advanced graduate student in the economics Ph.D. program at BU. During these meeting your TA will go over the assigned problem sets, answer questions about Stata. Contact information for the TAs will be posted in the document “Discussion Session Information” under Assignments. Please be sure that you have registered for a discussion session associated with this lecture (i.e., A1, A2, A3). Discussion sessions will begin the second week of classes. Attendance will be taken in discussion sessions and repeated lack of attendance may have an adverse effect on your course grade. Teaching Assistant: Qianye (Miranda) Xi ([email protected]). Office hours will be posted on the Blackboard course site. Exams: All exams are based on questions drawn from material covered in the text, lectures, and problem sets. In other words, all material associated with the course may appear on exams, including lecture material that is not in the text, so students should maintain a good set of class notes. Calculators: For exams students may only use calculators with no more than a two line display screen (larger screens have in the past been associated with student malfeasance on exams). Cell phones may not be used. Be sure that your calculator has a key such as xy. A simple calculator of this sort may be purchased for about $10. Makeup Exams: There will be no makeup exams for the two midterms. If you miss a midterm due to a medical emergency, then the points for that midterm will be added to your final exam. Also, please note that under no circumstances will the final exam or midterms be administered on a different date than scheduled because of travel plans or family events (if, though, there is a family medical crisis, you should contact me about this and I may approve shifting points for a midterm to your final exam). Any changes to an announced exam date, time, or place will be announced in class and posted on the course website (emails will also be sent to the class, but if your mailbox is full you may not get the email). It is the responsibility of the student to be aware of these changes. Grades: Course grades will be based on ten problem sets (1 point each, for a total of 10 points), two midterm exams (20 points each), which are not cumulative, and a cumulative final exam (40 points) which may include any material covered in the course during the entire semester and does not necessarily focus predominantly on the material from the last third of the course. If a student scores higher on the final exam than on a midterm, that midterm grade will only count for 10 points and the final exam will count for the additional points. Your final grade will be based on a curve reflecting the Final Course Score, with the median score receiving a grade of B. I will not, therefore, assign letter grades to your midterm exam scores, but since the score distribution and the associated median score will be posted for each midterm exam you can have a reasonably good idea how well you are doing in the course. Attendance: Attendance in lectures (and discussion sessions) is mandatory and repeated absences may affect you course grade. If you miss class you are responsible for getting lecture notes from your classmates. The structure of knowledge in economics is strongly hierarchic in that each successive lecture tends to build on prior material in a rather systematic fashion. As such it is very easy to fall behind if you miss a class and do not study the missed material before the subsequent lecture. Important Administrative Dates: Tuesday, 1/21 – first lecture Tuesday, 2/18 – substitute Monday Schedule (no lecture) *** Spring Recess 3/8-3/16 *** Thursday, 5/1 – last lecture Students with Documented Disabilities: If you have a disability that necessitates extra time for exams, or any other accommodations, you will need to email me a letter from the BU office of Disabilities Services at least two weeks before the first midterm so that I can make arrangements. Policy on Cheating: Cheating on exams will result in a zero grade for that exam (and this grade will fully count in the final course grade calculation regardless of the grade on the final) and will be reported to the Dean’s office. In this regard it is important to remind everyone that students are responsible to know and understand the provisions of the CAS Academic Conduct Code which can be located at the URL https://www.bu.edu/academics/policies/academic-conduct-code/ Course Outline I. Data & Statistics - Chapter 1 II. Summarizing Quantitative Data - Chapter 2 III. Descriptive Statistics - Chapter 3 IV. Probability - Chapter 4 Midterm #1: Tuesday 2/25 (chapters 1-4) V. Discrete Probability Distribution - Chapter 5, delete Section 5.4 VI. Continuous Probability Distribution - Chapter 6, delete Section 6.3 VII. Sampling and Sampling Distribution - Chapter 7 VIII. Interval Estimation - Chapter 8 Midterm #2: Tuesday 4/1 (chapter 5-8) IX. Hypothesis Testing - Chapter 9, Sections 9.1-9.5 X. Inferences About Means and Proportions with Two Populations - Chapter 10 XI. Comparing Multiple Proportions - Chapter 12 XII. Experimental Design and ANOVA - Chapter 13, Sections 13.1-13.3 XII. Simple Linear Regression – Chapter 14, Sections 14.1-14.5
Diploma in Information Technology System Development Techniques Instruction for CA3 Group Assignment January 2025 Semester Assessment This assessment is 100 marks. It constitutes 40% of the overall assessment. The group assignment will cover 30% and the group presentation will cover 10%. Rationale of Group Project The rationale of the group project is to enable collaborative learning with peers and learning to work as a team, which is commonplace in the workplace. Students learn to apply theories taught in class and textbooks to real-world situations. In line with this objective, students cannot reuse old assignments, submit projects from previous semesters, or copy essentially from sources, particularly the Internet. Forming Group Students are to form. groups of 4 to 5 students per group. As this is a group project, each member is expected to put his/her fair share of the effort into it. Groups must manage their groups effectively to complete this project. Students should resolve group dynamics issues and seek mediation through the lecturer as early as possible. Last-minute mediation will not be entertained. If all mediation fails, students may request peer evaluation as a final resort. Finally, the lecturer reserves the right to assign a mark to an individual student different from the rest of the group if that student is deemed not to have put in his/her fair share of effort into the project. Case Study: Small and medium enterprises (SMEs) form the backbone of Singapore’s economy, employing approximately two-thirds of the workforce and contributing nearly half of Singapore’s Gross Domestic Product (GDP). As digital technology transforms every sector of Singapore’s economy, supporting SMEs in their digital growth is essential to ensuring they fully leverage digital solutions to enhance operations and unlock new revenue streams . (SMEs Go Digital - Infocomm Media Development Authority, n.d.) To facilitate this digital growth, the Infocomm Media Development Authority (IMDA) in Singapore launched the SMEs Go Digital programme. This programme aims to help SMEs adopt advanced digital solutions, improve digital capabilities, and seize growth opportunities within the digital economy. It provides a structured and inclusive approach to digital adoption for SMEs across various industries. About the Tourism (Attractions) Industry Digital Plan (IDP) In November 2023, the Tourism (Attractions) Industry Digital Plan (IDP) was launched to support Singapore’s attractions companies in their digitalisation journey. The IDP provides step-by-step guidance on selecting digital solutions aligned with each growth stage across three key job functions within the industry: • customer service and engagement, • sales and marketing, and • sustainability. The IDP also offers insights on how attractions companies can overcome industry challenges as they pursue digital transformation, helping them enhance operational efficiencies and deliver better customer experiences . (Industry Digital Plan – Tourism (Attractions) IDP - Infocomm Media Development Authority, n.d.) Reference: SMEs Go Digital - Infocomm Media Development Authority. (n.d.). Infocomm Media Development Authority. https://www.imda.gov.sg/how-we-can-help/smes-go-digital Industry Digital Plan – Tourism (Attractions) IDP - Infocomm Media Development Authority. (n.d.). Infocomm Media Development Authority. https://www.imda.gov.sg/how- we-can-help/smes-go-digital/industry-digital-plans/tourism-idp Group Task: Your group is tasked with assisting a Singapore tourism attraction company in beginning its digital transformation journey. To support this objective, your group should explore how the company could introduce a revitalized suite of digital solutions for its products and services. This suite should focus on integrating advanced digital tools to improve digital connectivity, strengthen digital capabilities, and ultimately enhance the company’s ability to compete in the digital economy. Your research should address the company’s specific challenges, such as adapting to changing tourist profiles, meeting evolving customer expectations, and staying competitive against local and international rivals. The report will document the methodologies and processes you learned in the Systems Development Techniques module and highlight the strategies and technologies applied during the project. Research Report Requirements: Your group will produce a comprehensive research report, with a maximum length of 6000 words, which may include relevant illustrations, diagrams, or prototypes. The report should cover the following points: 1. Choosing a Company: • Select a Singapore tourism attraction company for your research. • Explore how the company could adopt digital solutions to improve digital connectivity and strengthen digital capabilities. • Conduct interviews with company representatives, if feasible, to understand their specific business needs. • Based on insights from these interviews, develop a System Vision Document that captures the company’s vision for digital transformation. 2. Identifying System Requirements: • Define the system requirements for the new digital solution based on your interviews and the System Vision Document. • Specify the key activities the system must support and any constraints it must meet. • Outline both functional and non-functional requirements. • Using the functional requirements, develop at least TEN (10) User Stories. 3. Developing Use Case: • Create the following diagram/s and documents based on the User Storie: o Use Case Diagram o Use Case Description Table for each of the identified use cases 4. Designing the System: • Illustrate the system’s design with the following diagrams and documents: o Design Class Diagram o Sequence Diagram (Interaction Diagram) o Package Diagram (based on elements in the Design Class Diagram) 5. System Development Life Cycle (SDLC) Approach & Model: • Describe the SDLC approach and model chosen for developing the system, and explain why it was selected. 6. User Acceptance Testing (UAT): • Describe the plan for conducting User Acceptance Testing, including key stages and methods. 7. Presentation Slides: • Prepare presentation slides that clearly summarize points 1 to 6, which will be used for the final project presentation. Note: The presentation slides will be used for the actual presentation. Please ensure that: • Ensure each section of the report aligns with the case study provided. • Explanations and illustrations should be as detailed as possible. • Include any relevant diagrams or prototypes that enhance clarity and understanding. An assessment mark allocation for this research report can be found in the appendix of this assignment. The appendix is a guideline for evaluating your group's research report. Assessment Marks Allocation Component Assessed Marks Allocation Point 1 (System Vision Document) Point 2 (Requirements & User Stories) Point 3 (Use Case) Point 4 (UML Documents) Point 5 (SDLC Approach) Point 6 (UAT) Point 7 (Group Presentation Slides) 15 15 25 20 10 10 5 Total 100
Experiment 1.5 – Pin-Jointed Truss Learning outcomes By the end of this experiment you should hopefully: • be able to calculate the internal forces in a pin-pointed truss subject to a set of external loading conditions Figure 1: Pin-jointed frame. including loading frame. (units: mm) EXPERIMENT Examine the relevant equipment and observe the effect that varying the load has on the readings obtained from the strain gauges positioned on the truss’s members. Make sure the equipment is set up properly (this can be checked with the Teaching Assistant), then follow these steps: ❖ Reduce the load until there is little to no resistance when turning the load dial. ❖ Check the pin in the joint between members 1 and 2, it should be easy to move with little friction. ❖ If the pin binds adjust the load dial in a small increment either clockwise or anticlockwise and check the pin again. ❖ If there is less resistance to the pin moving keep moving the dial in increments until the pin nearly moves freely. ❖ If the pin becomes stiffer move the dial in the opposite direction and repeat. Once the above steps have been completed, the Truss is ready to be loaded and strain on its members can be measured: o Apply loads in increments of 100 N up to a maximum of 500 N, recording the true member strain in Table 1. o Record the deflection of the girder under the dial gauge. o Calculate the theoretical member forces for the framework with a load of 500 N. o Compare the experimental and theoretical results. o Plot a graph of Load (N) against Joint Deflection (mm) and comment on the resulting graph. o Evaluate potential errors in the measurements and calculations performed. Figure 2: Labelled members on pin-jointed truss. Table 1: True Member Strain (μϵ) Load (N) Strain 1 μϵ Strain 2 μϵ Strain 3 μϵ Strain 4 μϵ Strain 5 μϵ Strain 6 μϵ Strain 7 μϵ Joint deflection mm 0 100 200 300 400 500 Subsequently, calculate the equivalent member forces for an applied load of 500 N and complete the “Experimental Forces” column in Table 2. This requires using the measured strain, ε, to calculate the induced stress, σ, noting their relationship as per the material’s Young’s modulus, E, and that members are made from steel: Where, the Young’s Modulus for steel is denoted by Es, F is the force acting through a given member and A is the cross-sectional area. Measure the diameter of the rods to calculate their cross-sectional area: Rod diameter = _______mm Table 2: Comparison of Experimental and Theoretical Force when the Pin Jointed Truss is loaded at 500 N. Member Experimental Force (N) Theoretical Force (N) 1 2 3 4 5 6 7 Finally: ❖ For members 4 and 6, plot a graph of load applied to the truss (N), on the horizontal axis, against Strain (με) measured (vertical axis). ❖ For members 4 and 6, plot a graph of the load applied to the truss (horizontal axis), against the force calculated to be acting within these members (vertical axis); this can be plotted on the same graph as load vs strain, employing a secondary vertical axis. ❖ Comment on the relationships observed and any anomalies in your graph.
ECON6008 Homework #1 Due: Feb. 11, 2025, 2:00pm You are allowed to work in a group of no more than 5 (including 5) students and submit one copy of your assignments. You can also work alone. If you work in a group, you must state all the group members’ names clearly on the cover page. All group members will receive equal marks. You need to submit an electronic version of your assignment to tianxie@smu .edu .sg. You can use any software to complete the assignment. For the coding related questions, you must present your codes with necessary comments and put them in the assignment as appendix. 1. (10 marks) Consider the following regression model y = β0 · i + e, where y is a n × 1 response variable, i = [1, 1, ..., 1]T is the n × 1 constant term with β0 being the associate coefficient, and e is a vector of error terms. Prove that the OLS estimate of β0 is simply the mean of y. 2. (30 marks) Describe how we determine the predictor importance in regression tree and bag- ging tree. Discuss their similarities and differences carefully. Explain why one is more reli- able than the other one. 3. (60 marks) This question is about the larger VIX data set vixlarge.csv that contains the VIX data and the associated dates. (a) (10 marks) Plot the VIX data against date in line. Clearly label the horizontal and vertical axises. (b) (10 marks) Pick 5 nodes and fit the data using one of the regression splines. State the method you choose clearly and show the plot. (c) (20 marks) Let the dependent variable y be the VIX and the first and the second columns of the independent variable X be the intercept term and the lag of VIX (set x0 = 0). Conduct a one-step-ahead rolling window exercise. i. Set the window length at 3000 and make forecast on the next period y t+1 . ii. Start from the beginning and roll until the end. iii. For each roll, we make forecast using ridge and lasso methods with tuning param- eter λ = 1, 10 for each method. In total, we compare 4 methods. iv. Comparing the forecasts with the actual true values of y t+1 . Compute the mean squared forecast errors and the mean absolute forecast errors for the four methods and report them in a table. v. Which method has the best performance and which one has the worst? Provide your understanding and explanation of the results. vi. Come up with an algorithm that can beat the best performing method stated in question v. Clearly describe your motivation, the details of the algorithm, and the results. (d) (20 marks) We now consider a more general forecasting exercise with model yt+h = f (xt) + ut+h, for t = 1, ..., n — h where his the forecasting horizon. Note that Q3(c) is the special case with h = 1 and f (·) being the ridge or LASSO estimator. We now replicate Q3(c) with h = [1, 5, 10, 22] using LASSO and the regression tree. Choose your own tuning parameters this time, state them clearly, and report your forecasting results in a table. What do you observe?