125.250, Assessment #2 Risk and Return Project Due: May 30 (Friday) 5 pm, New Zealand Time Background The project counts for 20% of your final grade (20 marks in total). It is not something that you can do in the last week before it is due, so I suggest that you start working on it well before the due date. Requirements You are an analyst working for a major stock broking firm. Your boss has asked you to prepare excel spreadsheets to analyse the risk and return characteristics of two S&P/NZX 50 Gross Index (^NZ50) companies. The S&P/NZX 50 Gross Index is designed to measure the performance of the 50 largest, eligible stocks listed on the Main Board (NZSX) of the NZX by float‐adjusted market capitalization. The index is widely considered as New Zealand's preeminent benchmark index. The index is covering approximately 90% of New Zealand equity market capitalization (https://www.nzx.com/markets/nzsx/indices/NZ50). The components for the NXZ50 index are shown in the Appendix of the document. You can select two NZ50 companies that you want to evaluate for any reasons. You can download the historical trading data of the two companies at https://nz.finance.yahoo.com/ (as shown in the figure below) or follow the steps in Appendix 2. 1) Type in the symbol of the selected company at the “Search” box to access the data of the selected company (for example, “ATM.NZ” forA2 Milk Company). 2) Click on “Historical Data”. 3) Set the “Time period” and “Frequency” of “Historical prices” and click “Apply”. 4) Click “Download” to download the historical prices ofthe selected company. “Historical prices” to download: Daily data for the period from 2019 to 2024” is required to perform the calculations. This is a compulsory requirement of this assignment. Your manager points out that although the past is not always a good predictor of the future, the clients want to know the information on the historical return and risk characteristics of the selected NZX50 stocks. Please perform. the following estimations. 1. Weekly returns, using “Adj Close” prices to calculate the returns (3 marks) 1) Calculate the arithmetic daily returns ofthe two companies (1 mark) 2) Calculate the continuously compounded daily returns ofthe two companies (1 mark) 3) Create scatter plots using compounded daily returns ofthe two companies, and briefly discuss the results (1 marks) 2. Descriptive statistics (2 marks) 1) Obtain the descriptive statistics of the daily returns ofthe two companies. (1 mark) 2) Briefly discuss the results (return and risk). Which stock is a better choice based on the mean-variance criteria? (1 mark) 3. Histogram (3 marks) 1) Create the Histogram using compounded daily returns for the two companies. (2 marks) 2) Briefly discuss the results (skewness, kurtosis, normal distribution) (1 mark) 4. t‐test (4 marks) 1) Perform. “t-test: Paired Two Sample for Means” to examine whether the mean difference of the two companies’ compounded daily returns is statistically significant (2 marks) 2) Briefly discuss the results (2 marks) 5. Estimating Beta (4 marks) 1) Estimating Beta (measurement of systematic risk) of the two companies, based on the data from 2019 to 2024. The data of NZX50 index prices (to proxy the market return) is provided in the Excel temperate (2 mark) 2) Briefly discuss the results (which one is riskier based on systematic risk) (2 marks) 6. Portfolio Investment (4 marks) Your company considers investing $100,000 in a portfolio that consists of two stocks that you analysed in the previous sections. Which proportion of each stock in the portfolio that you recommend your manager to invest? Justify your choice. What needs to be handed? Please submit the electronic copy of your Excel workbook via the “125250 project submission drop-box”. • Please use separate workbooks to perform the calculations and name each workbook properly (the template is available on Stream). • Please briefly discuss the results in the relevant excel spreadsheet if it is required. There is no need to submit a separate Word document to discuss the results.
MSIN0041 Marketing Science Online Controlled Examination Paper 2023/24 Copyright Note to students: Copyright of this assessment brief is with UCL and the module leader(s). If this brief draws upon work by third parties (e.g. Case Study publishers) such third parties also hold copyright. It must not be copied, reproduced, transferred, distributed, leased, licensed or shared with any other individual(s) and/or organisations, including web-based organisations, without permission of the copyright holder(s) at any point in time. Academic Misconduct: Academic Misconduct is defined as any action or attempted action that may result in a student obtaining an unfair academic advantage. Academic misconduct includes plagiarism, obtaining help from/sharing work with others be they individuals and/or organisations or any other form. of cheating. Definitions and penalties for Academic Misconduct are outlined in the Academic Manual. • It is forbidden to: o Communicate or collaborate with other students or any other third parties in relation to this assessment. o Discuss or share assessment content with other students or third parties. o Copy or attempt to copy the work of another student(s). • Such actions will be referred to the Academic Misconduct Panel, the penalties of which may include exclusion from UCL. Referencing: In an exam no external research would normally take place and you would demonstrate your learning from the module and communicate your learning in your own words and, where appropriate, through calculations. This applies to this online assessment. If you were to make direct use of somebody else’s work, including making direct use of information generated by an artificial intelligent (AI) tool, either by memorising it or copying it word for word, you must reference and provide full citation for ALL sources used. This includes any direct quotes and paraphrased text. If in doubt, reference it. Further guidance on referencing is to be found here: https://library-guides.ucl.ac.uk/referencing-plagiarism Failure to cite references correctly may result in your work being referred to the Academic Misconduct Panel. Use of Artificial Intelligence (AI) Tools in your Assessment: Your module leader will explain to you if and how AI tools can be used to support your assessments. In some assessments, the use of generative AI is not permitted at all. In others, AI may be used in an assistive role which means students are permitted to use AI tools to support the development of specific skills required for the assessment as specified by the module leader. In others, the use of AI tools may be an integral component of the assessment; in these cases the assessment will provide an opportunity to demonstrate effective and responsible use of AI. See the introductory table on pages 2 and 3 of this brief to check which category use of AI falls into for this assessment. Students should refer to the UCL guidance on acknowledging use of AI and referencing AI. Failure to correctly reference use of AI in assessments may result in students being reported via the Academic Misconduct procedure. Refer to the section of the UCL Assessment success guide on Engaging with AI in your education and assessment. Exam Length TWO (2) hours Upload window 20-minute upload window is available at the end of the standard exam duration. The Upload Window is not additional writing time. You must use the full 20-minute Upload Window for uploading files, completing the Cover Sheet (if applicable) and correcting any minor mistakes such as uploading the wrong file or clicking the wrong button. Do not assume that this will not happen to you. Collation time where applicable (only for exams that have particularly extensive upload requirements) NA Reasonable adjustments If you have a Summary of Reasonable Adjustments or Special Assessment Arrangements in place which include additional writing time or rest breaks, the additional time will be added to the standard exam duration at the top of page 2. SORA students are also entitled to the 20-minute upload window. Number of Sections There are ONE (1) section to the examination paper. Question/Mark Distribution There are FIVE (5) questions with a total of ONE HUNDRED (100) marks. Each question is worth TWENTY (20) marks. You should attempt all questions. You are advised to allocate your time between the sections of this exam in proportion to the marks available. Additional Materials None Artificial Intelligence (AI) category Not permitted Handwritten answers permitted? Yes If yes, where are handwritten answers permitted Hand-written answers are permitted for calculations only. Other notes If you are unclear on any part of the question, state your assumptions in your answers IMPORTANT: Write the question number and your chosen response on your exam answer document. There are FIVE (5) compulsory questions in total. Each question is worth TWENTY (20) marks. Candidates should attempt all questions. Please keep your answers concise by keeping your answers at most 250–300 words per question, and often significantly less than the limit. Question 1 Explain in words why two firms that produce a homogenous product at the same unit cost end up selling at the unit cost in Bertrand competition. Provide two ways/reasoning the Bertrand outcome can be avoided. Remember to explain each reasoning with real-world examples. [20 MARKS] Question 2 Uniqlo would like to determine who among its customer base should receive a 10%- off coupon. Recommend a data-driven approach to this question. In doing so, make sure that you identify both the type of data and the statistical methods used, as well as how the data analysis would identify the right customers to target. [20 MARKS] Question 3 List one advantage and disadvantage of A/B testing. For the disadvantage you list, show its practical relevance by giving a marketing question/scenario with actual firm/industry where the use of A/B testing is not ideal. [20 MARKS] Question 4 There is a local gym charging a monthly membership fee of £30. The gym hired a marketing consultant to help it make more informed strategic decisions about its customers. Through customer survey, the consultant reported that there are segments that make up the gym’s customer base: casual goers and enthusiasts. The consultant estimated that enthusiasts made up around 30% of the customer base, whereas casual goers made up the remaining 70%. Through a longitudinal analysis on a sample of customers, it was found that, on average, an enthusiast member renewed the subscription with probability 80%, whereas a casual goer member renewed the subscriptions with probability 50%. Suppose the membership is pre-paid, that is, a gym goer needs to pay the (non-refundable) membership fee at the beginning of each month of membership. Assume the cost of acquiring a new customer is £65, which is incurred through marketing expense such as targeted advertising. Assuming the gym has a required return of 20%, can the gym afford its current customer acquisition strategy? You may find the following mathematical fact covered in the lectures useful: for r > 0. Without any calculations, do you expected any temporal trend in the aggregate monthly retention of a cohort of customers acquired at the same time? [20 MARKS] Question 5 Suppose you are a cereal product manufacturer that sells your products through partnered supermarkets all over the country. Each week, you are given the volume data, which include weekly transacted quantities and average prices from each supermarket. You wish to understand the price elasticity of demand by running the following regression with your volume data: log Priceit = α + βQuantityit + ϵit, where i is the index for supermarket and t is the index for weeks. Assume you obtain an estimate of β = −0.5. Explain why the estimate must be wrong. Provide one reason why it could go wrong. Propose one solution to correct your estimate based on the one possible reason you identified. [20 MARKS]
FINC611 Fintech, Blockchain and Cryptoassets FINAL PROJECT Fintech Product Design Semester 1, 2025 1. PROJECT OVERVIEW The COVID-19 pandemic has significantly accelerated the adoption of digital financial services. As a result, the demand for innovative and user-friendly fintech products has grown, reflecting the needs of a rapidly changing world. The fintech industry is in a constant state of evolution, with many unmet needs and opportunities for innovation. Therefore, there is great potential for new products and services that can offer better solutions than what is currently available. Given the highly competitive nature of the industry, both established players and newcomers are continuously vying for market shares. Developing a new fintech product can provide a competitive edge and attract customers who are looking for innovative solutions to their financial needs. Moreover, fintech products have the potential to reach a large and diverse audience, including those who are underserved or excluded by traditional financial services. By creating a new fintech product, an innovator can help to address this issue and improve financial inclusion for a wider range of people. This project requires you to create a new fintech product that can leverage emerging technologies like blockchain or distributed ledger technology (DLT). Your fintech product should solve a real-world problem in a specific sector (e.g., finance, investment, education, agriculture, real estate, etc.), enhance user experience, and promote financial inclusion. The goal is to design a product that could reasonably compete in the fintech space and appeal to underserved populations or improve existing financial processes. 2. PROJECT LEARNING OBJECTIVES By completing this project, you will: • Apply your understanding of fintech innovation to a real-world scenario. • Use the Lean Startup Canvas to plan your startup’s structure and strategy. • Learn how to pitch a fintech product to investors using compelling communication and clear value propositions. • Explore the impact of digital technologies (e.g., blockchain) on specific sectors. 3. PROJECT GUIDELINES 1- Industry Selection and Product Design Choose a specific industry or sector and design an innovative fintech product that can/may leverage current technologies such as Distributed Ledger Technologies (DLTs) or blockchain. Your product should aim to solve an existing problem or address significant pain points within the selected industry. 2- Investment Pitch and Business Model Develop a compelling investment pitch targeting a range of investors (such as, venture capitalists, angel investors, corporate backers). In addition, create a Lean Startup Canvas for your product and submit an analysis report analyzing each component of the canvas in detail. 3- Presentation Present your investment pitch to a panel of simulated investors (e.g., peers, instructors, guest professionals) in a formal environment. Your goal is to persuade them of your product’s viability and investment potential. 4. PROJECT INSTRUCTIONS 1- You develop your product idea by applying the knowledge gained in FINC611. This process began at the start of the semester and has continued through the midterm break to the present. You are encouraged to discuss your ideas with the lecturer at any time. 2- You must follow the pitch and Lean Startup Canvas instructions provided in the FINC611 course materials. 3- Prepare your pitch as a PowerPoint presentation and record yourself delivering it, ensuring both your screen and webcam are visible. The maximum presentation length is 12 minutes. 4- You may use any software to record your presentation, but the final video must be in MP4 format. Recommended free tools include Zoom, Microsoft Teams, Panopto, Screencast-o-matic, or EaseUS RecExperts. There is no requirement or expectation for students to purchase or subscribe to any paid video editing software. 5. PROJECT DUE DATE - Due Date for report: 14 June 2025 at 5:00 pm - Extensions and Late Submission of Assessment: please refer to the course outline. 6. SUBMISSION GUIDELINES 1. Canvas Analysis Report • The report is a maximum of 8 (eight) pages, excluding references and appendices. • Use double spacing, standard 1-inch margins, and a 12-point font such as Times New Roman. 2. Lean Startup Canvas and Pitch • You must follow the template learned in FINC611 (provided on the course LEARN page). 3. Pitch Presentation • The format must be in MP4 and maximum 12 minutes. 4. General Requirements • Handwritten reports will NOT be accepted or marked. • A cover page is not required, but your name and student ID must be clearly included in the submission. 5. Referencing • All references must be properly cited within the body of the assignment and included in a reference list formatted using APA style (7th edition). 6. Tables and Figures • All tables and figures (including graphs and screenshots) must be clearly labelled (e.g., Table 1, Figure 1, etc.). • Figures, if any, must be of high quality. 7. SUBMISSION CHECKLIST Students must submit the following to the Assignment Dropbox on the course LEARN page: - 01: + File Name: “Canvas-Report-StudentID.docx” - 02: + File Name: “Lean Startup Canvas.docx” (The sample file is on LEARN) - 03: + File Name: “Pitch-Presentation.mp4” The guidance for video clip submission is on LEARN. - Submit ALL FILES via the Final Project Dropbox on the course LEARN page
PHYS 231 FINAL WRITE_UP Abstract and Background My friend is continuing to have speed tickets, he is annoyed, and he knows that he could not have any more tickets. The main issue he had is that he is always not aware of what speed he is driving, and he needs some device to read the speed out aloud continuously in real time. The aim of the final project is to produce such a device that could combine a speed sensing part and speed-reading voice part in one entity. As long as it is charged and attached to an object in motion, it would sense the moving speed, read it aloud constantly from a certain frequency that could be adjusted. Ideally, we have sensor, voice module, and a speaker as main components. (The above is still in testing, not working yet) If this is too simple for a final project, we could attach a screen (3.2 TFT SPI 240x320 v1.0) on which a real-time status of the moving object would be graphically updated. By real-time status, we hope to achieve an effect of orientation view (video link: 5:25-5:40). Furthermore, it is also doable to have multi-mode, that is once we switched mode, it would become a usual music player. Or to have proximity sensor always on, if something approaches, all other functions stop, and the speaker would alarm. (3.2 TFT SPI 240x320 v1.0) ---- (2 x MPU6500) ----------- (JQ6500-16P v2.1) Goals and Objectives Goals: - Have the speed-sensing part senses the speed relative accurately - Successfully made voice module and speaker working so reading of speed could be outputted, which fully realize the aimed function Objectives - Use sensor fusion and Kalman filter with multiple sensor inputs, with additional MPU6500 Modules, to give an accurate measurement. - Instrumentation Amplifier Circuit could also reduce the noise effectively but also requires two or above sensor inputs (below). - Make MP3-TF-16P successfully respond to sensor reading data, and output as pronunciation of the speed from voice library saved to the SIM card. (JQ6500-16P might serve as an alternative, but unknown) - Have the speaker, player, and microcontroller in the right position of the circuit, so that the voice could actually come out as a result. Measure of Success - By using position as integrated velocity, we would firstly test whether we have an accurate reading of velocity. We choose certain position change, like 10m, 100m, or 1km or larger, if possible, to make sure the sensing result has no obvious difference with the actual predetermined result. - No matter what the accuracy of the sensing part is, the voice pronunciation must be aligned with the sensed data. That is, for example if the data is 23km/hr, then the speaker actually say “twenty- three”. - We could indeed use certain components, such as potentiometers, to adjust for how long one voice reading comes after another, more frequently voice reminding or less frequently.
Friday 21 August 2020 DEGREES of MSc in Information Technology, Software Development and IT Cyber Security Advanced Programming (IT) COMPSCI 5002 1. (a) The wait and notify methods provided with all Java Objects allow Threads to be placed in a waiting state until notified by another Thread. With reference to the Thread states runnable, blocked, waiting, describe the process by which a Thread acquires an object’s monitor (via e.g. entering a synchronized block), waits and is awaken via notification by another Thread. [5 marks] (b) The following three classes define a system including an Object (SendReceive) that permits the Sender object to send messages (in the form. of a String) to the Receiver object. The Sender should be able to send a message only when there isn’t one waiting to be received. If there is one waiting, it should wait until it has gone. The receiver should wait until a message appears to be received. The SendReceive object is missing the implementation of the send and receive methods. public class Sender extends Thread { private SendReceive sr; public Sender(SendReceive sr) { this.sr = sr; } public void run() { String[] messages = {"Hi","How’re you?","Bye!"}; for(String message: messages) { sr.send(message); } } public static void main(String[] args) { SendReceive sr = new SendReceive(); new Sender(sr).start(); new Receiver(sr).start(); } } public class Receiver extends Thread { private SendReceive sr; public Receiver(SendReceive sr) { this.sr = sr; } public void run() { while(true) { System.out.println(sr.receive()); } } } public class SendReceive { /* hasMessage should be set to true when there is a message waiting to be received, false otherwise */ private boolean hasMessage = false; private String message; public void send(String message) { // YOUR CODE HERE } public String receive() { // YOUR CODE HERE } } Using wait and notify, write code for the send and receive methods. You may change the method decorators if you wish. [10 marks] (c) Using an example, describe what is meant by the term Race condition. For your example, describe how it could be avoided. [5 marks] 2. (a) The composite design pattern consists of three classes: i) component ii) leaf iii) composite Describe the role of each including what type of component it is (class, abstract class, interface etc) and the relationships between them. [6 marks] (b) The diagram below represents a hierarchy of objects, each represented by an integer. Leaf objects have an integer attribute. The integer corresponding to a composite object is the maximum value of its components. Using the composite design pattern, write the code for the three objects (minor syntactical errors will not be penalised): i) component [2 marks] ii) leaf [4 marks] iii) composite [5 marks] (c) Write a main method that uses your classes to create the data shown in the figure. The last line in your main should display the value of the top node. [3 marks] 3. (a) Describe two situations (with justification) in which multi-threaded programming would be beneficial. [4 marks] (b) Thread.join() and Thread.sleep() are two examples of blocking methods. What is a blocking method, and what, programmatically, does they necessitate? [4 marks] (c) Assuming that Thready is a class that extends Thread, the following code snippet has an error that stops it actually running concurrently. What is it? public class ExamClass { public static void main(String[] args) { Thready[] t = new Thready[100]; for(int i=0;i
Coursework II for 2024-2025-S2 MTH419 Scientific Computing Due on 26th May (Monday) 23:59 Notice: Your report in a single PDF file does not only include description of the problems, methods and results, but also the process of finding the solutions. That means, you need to record your input to AI (if used), output from AI, what you think, your input to Python, output from Python, what you think, and all that loop over and again. It is recommended to use figures and tables wherever suitable. The examiner will call for oral defense of your report. So you must establish your own understanding. 1 Part I. Viscous Burgers’ Equation in 1-dimensional space We want to solve numerically the Burger’s equation where ν > 0 is the physical constant corresponding to the viscousity. To this end, we discretise the space domain at the points xi = ih, i = 0, . . . , N with Nh = 1. We approximate u(xi , t) by Ui(t) that satisfies for i = 1, . . . , N − 1, and U0(t) = UN (t) ≡ 0. These correspond to a system of differential equations. Our goal is to use the 1 stage Gauss-Kuntzmann method with the Butcher table to solve the system of differential equations. Question 1 (10 marks) Write down the time discretised system corresponding to the 1 stage Gauss-Kuntzmann method aforementioned. The time discretisation is implicit, and a nonlinear system of equations need to be solved at each time step. Question 2 (10 marks) Write down the Newton iteration formula for the nonlinear system of equations aforementioned. A linear system of equations will be solved in each Newton iteration. Write down the linear system of equations. Question 3 (10 marks) For the linear system of equations, choose an appropriate Krylov subspace method e.g. Conjugate Gradient or GMRES to solve. Describe your choice. Question 4 (40 marks) Combining the linear solver (Krylov method), nonlinear solver (Newton iteration) and the time stepping (1 stage Gauss-Kuntzmann), implement a numerical solver for the system of differential equations aforementioned. The parameter ν can be taken as 0.1, 0.01, 0.001, ..., and u0(x) = sin(πx). Plot the time dependent solution as an animation (e.g. using matplotlib.animation.FuncAnimation). That is, at time tk, plot the solution U k = [U0 k , . . . , UN k ] as a function of the space points [x0, . . . , xN ]. Is the numerical solution correct? Qualitatively, the solution as a function of the space x should start from the initial profile u0(x) and move to the right while the amplitude decays, as time grows; see e.g. https://visualpde.com/sim/?preset=BurgersEquation Quantitatively, as ∆t → 0 and h → 0 simultaneously, does the solution converge? Does small value of ν require small h and ∆t? How many iterations are used for the linear solver (Krylov subspace method) / nonlinar solver (Newtion itera-tion)? 2 Part II. Spectral Graph Drawing Read the two slides about the spectral graph drawing. Question 5 (30 marks) Now there is a graph adjacency matrix stored as the sparse matrix ’a’ in the MATLAB file ‘yaleShield.mat’. Read in the sparse matrix using Python. Use Lanczos algorithm to carry out the spectral drawing of the graph.
MSIN0041 Marketing Science Practice Exam 2024/25 Copyright Note to students: Copyright of this assessment brief is with UCL and the module leader(s). If this brief draws upon work by third parties (e.g. Case Study publishers) such third parties also hold copyright. It must not be copied, reproduced, transferred, distributed, leased, licensed or shared with any other individual(s) and/or organisations, including web-based organisations, without permission of the copyright holder(s) at any point in time. Academic Misconduct: Academic Misconduct is defined as any action or attempted action that may result in a student obtaining an unfair academic advantage. Academic misconduct includes plagiarism, self-plagiarsim, obtaining help from/sharing work with others be they individuals and/or organisations or any other form. of cheating. Definitions and penalties forAcademic Misconduct are outlined in the Academic Manual. • It is forbidden to: o Communicate or collaborate with other students or any other third parties in relation to this assessment. o Discuss or share assessment content with other students or third parties. o Copy or attempt to copy the work of another student(s). • Such actions will be referred to the Academic Misconduct Panel, the penalties of which may include exclusion from UCL. Referencing: In an exam no external research would normally take place and you would demonstrate your learning from the module and communicate your learning in your own words and, where appropriate, through calculations. This applies to this online assessment. If you were to make direct use of somebody else’s work, including making direct use of information generated by an artificial intelligent (AI) tool, either by memorising it or copying it word for word, you must reference and provide full citation for ALL sources used. This includes any direct quotes and paraphrased text. If in doubt, reference it. Further guidance on referencing is to be found here: https://library-guides.ucl.ac.uk/referencing-plagiarismFailure to cite references correctly may result in your work being referred to the Academic Misconduct Panel. Use of Artificial Intelligence (AI) Tools in your Assessment: Your module leader will explain to you if and how AI tools can be used to support your assessments. In some assessments, the use of generative AI is not permitted at all. In others, AI may be used in an assistive role which means students are permitted to use AI tools to support the development of specific skills required for the assessment as specified by the module leader. In others, the use of AI tools may be an integral component of the assessment; in these cases the assessment will provide an opportunity to demonstrate effective and responsible use of AI. See the introductory table on pages 2 and 3 of this brief to check which category use of AI falls into for this assessment. Students should refer to theUCL guidance on acknowledging use of AI and referencing AI. Failure to correctly reference use of AI in assessments may result in students being reported via the Academic Misconduct procedure. Refer to the section of the UCL Assessment success guide onEngaging with AI in your education and assessment. Exam Length TWO (2) hours Upload window 20-minute upload window is available at the end of the standard exam duration. The Upload Window is not additional writing time. You must use the full 20-minute Upload Window for uploading files, completing the Cover Sheet (if applicable) and correcting any minor mistakes such as uploading the wrong file or clicking the wrong button. Do not assume that this will not happen to you. Collation time (this is in addition to the upload time and only applies if an examination has particularly extensive upload requirements such as a requirement to upload multiple large file, or a requirement to convert hand-written answers to pdfs). Reasonable adjustments If you have a Summary of Reasonable Adjustments or Special Assessment Arrangements in place which include additional writing time or rest breaks, the additional time will be added to the standard exam duration at the top of page 2. SORA students are also entitled to the 20-minute upload window. Number of Sections There is ONE (1) section to the examination paper. Question/Mark Distribution You are advised to allocate your time between the questions of this exam paper in proportion to the marks available. This paper consists of FIVE (5) compulsory questions. Additional Materials Artificial Intelligence (AI) category Not permitted Handwritten answers permitted? Yes If yes, where are handwritten answers permitted Handwritten answers are only permitted for showing arithmetic calculations. Calculators Calculators are not required to complete this exam Other notes If you are unclear on any part of the question, state your assumptions in your answers IMPORTANT: Write the question number and your chosen response on your exam answer document. There are FIVE (5) compulsory questions in total. Candidates should attempt all questions. Please keep your answers concise by keeping your answers at most 250 words per question. Be aware that a higher mark allocation does not necessarily mean a longer answer. Marks will be awarded for accuracy and relevance. Inclusion of irrelevant or incorrect information, even alongside the correct answer, may result in a deduction. Question 1 Discuss how the choice between second-degree and third-degree price discrimination could affect a company’s product line design. What is the profit comparison between the two types of price discrimination? Do you always observe a company choose the type of price discrimination with superior predicted profits in the models learned in the lectures? If not, explain why the observation could differ from some theoretical predictions in the lectures. [20 MARKS] Question 2 An online streaming company is trying to improve its customer retention. The company’s analytics department recently developed a new recommendation system that purportedly improves viewer engagement. To test the effectiveness of this new system, the company applied the system to a cohort of new subscribers and monitors each user’s engagement. To benchmark the new system and improve the statistical power, the company also collected the relevant metric from a larger pool of existing subscribers with a tenure of at least 6 months. What individual metric would you measure for engagement? How would you evaluate the new system based on the available data? Discuss the pros and cons of the approach taken by the company. [20 MARKS] Question 3 There is a local gym charging a monthly membership fee of £30. The gym hired a marketing consultant to help it make more informed strategic decisions about its customers. Through customer survey, the consultant reported that there are segments that make up the gym’s customer base: casual goers and enthusiasts. The consultant estimated that enthusiasts made up around 30% of the customer base, whereas casual goers made up the remaining 70%. Through a longitudinal analysis on a sample of customers, it was found that, on average, an enthusiast member renewed the subscription with probability 80%, whereas a casual goer member renewed the subscriptions with probability 50%. Suppose the membership is pre-paid, that is, a gym goer needs to pay the (non-refundable) membership fee at the beginning of each month of membership. Assume the cost of acquiring a new customer is £65, which is incurred through marketing expense such as targeted advertising. (a) Assuming the gym has a required return of 20%, can the gym afford its current customer acquisition strategy? [12 MARKS] (b) Without any calculations, do you expected any temporal trend in the aggregate monthly retention of a cohort of customers acquired at the same time? [8 MARKS] Question 4 Uniqlo would like to determine who among its customer base should receive a 10%- off coupon. Recommend a data-driven approach to this question. In doing so, make sure that you identify both the type of data and the statistical methods used, as well as how the data analysis would identify the right customers to target. [15 MARKS] Question 5 An airline has a frequent flyer programme with two tiers of memberships: basic and premier tiers. A registered customer becomes a premier-tier member if the customer has completed at least 20 trips with the airline during the previous calendar year. The company keeps a revenue system that keeps track of every customer’s trips with the airline. Registered members get perks with the airline. Between the two tiers of members, the only difference between their perks is that those in the premier tier receive complimentary seat upgrades (subject to availability). The airline would like to know the effect of the seat-upgrade perk on a customer’s number of trips with the airline. (a) Suppose the airline evaluates the effect of complimentary seat upgrades by computing the difference in the average number of booked trips between customers that have the perks and those that do not. Discuss whether this measure is biased or not. If it is biased, does it underestimate or overestimate the effect of complimentary seat upgrades? Explain your answer in the context of the question. [10 MARKS] (b) If you are to evaluate the effect of complimentary seat upgrades, how would you measure it using existing data? Explain why your chosen estimate could provide a good measure. List and explain one limitation of your estimation strategy. [15 MARKS]
Project 2: Ship search The objective of this project is to practice and assess your understanding of functional programming and Haskell. You will write code to implement both the guessing and answering parts of a logical guessing game. The Game Proj2 is a simple two-player logical guessing game created for this project. You will not find any information about the game anywhere else, but it is a simple game and this specification will tell you all you need to know. The game is somewhat akin to the game of Battleship™, but somewhat simplified. The game is played on a 4×8 grid, and involves one player, the searcher trying to find the locations of three battleships hidden by the other player, the hider. The searcher continues to guess until they find all the hidden ships. Unlike Battleship™, a guess consists of three different locations, and the game continues until the exact locations of the three hidden ships are guessed in a single guess. After each guess, the hider responds with three numbers: the number of ships exactly located; the number of guesses that were exactly one space away from a ship; and the number of guesses that were exactly two spaces away from a ship. Each guess is only counted as its closest distance to any ship. For example if a guessed location is exactly the location of one ship and is one square away from another, it counts as exactly locating a ship, and not as one away from a ship. The eight squares adjacent to a square, including diagonally adjacent, are counted as distance 1 away. The sixteen squares adjacent to those squares are considered to be distance 2 away, as illustrated in this diagram of distances from the center square: 2 2 2 2 2 2 1 1 1 2 2 1 0 1 2 2 1 1 1 2 2 2 2 2 2 Of course, depending on the location of the center square, some of these locations will actually be outside the board. Note that this feedback does not tell you which of the guessed locations is close to a ship. Your program will have to work that out; that is the challenge of this project. We use a chess-like notation for describing locations: a letter A–H denoting the column of the guess and a digit 1–4 denoting the row, in that order. The upper left location is A1 and the lower right is H4. A few caveats: The three ships will be at three different locations. Your guess must consist of exactly three different locations. Your list of locations may be written in any order, but the order is not significant; the guess A3, D1, H1 is exactly the same as H1, A3, D1 or any other permutation. Here are some example ship locations, guesses, and the feedback provided by the hider: Locations | Guess | Feedback H1, B2, D3 | B3, C3, H3 | 0, 2, 1 H1, B2, D3 | B1, A2, H3 | 0, 2, 1 H1, B2, D3 | B2, H2, H1 | 2, 1, 0 A1, D2, B3 | A3, D2, H1 | 1, 1, 0 A1, D2, B3 | H4, G3, H2 | 0, 0, 0 A1, D2, B3 | D2, B3, A1 | 3, 0, 0 Here is a graphical depiction of the first example above, where ships are shown as S and guessed locations are shown as G: A B C D E F G H +---------------- 1 | . . . . . . . S 2 | . S . . . . . . 3 | . G G S . . . G 4 | . . . . . . . . The game finishes once the searcher guesses all three ship locations in a single guess (in any order), such as in the last example above. The object of the game for the searcher is to find the target with the fewest possible guesses. The Program You will write Haskell code to implement both the hider and searcher parts of the game. This will require you to write a function to return your initial guess, and another to use the feedback from the previous guess(es) to determine the next guess. The former function will be called once, and then the latter function will be called repeatedly until it produces the correct guess. You must also implement a function to determine the feedback to give to the searcher, given his guess and a target. You will find it useful to keep information between guesses; since Haskell is a purely functional language, you cannot use a global or static variable to store this. Therefore, your initial guess function must return this game state information, and your next guess function must take the game state as input and return the new game state as output. You may put any information you like in the game state, but you must define a type GameState to hold this information. If you do not need to maintain any game state, you may simply define type GameState = () You must also define a type Location to represent grid locations in the game, and you must represent your guesses as lists of Locations ([Location]. Your Location type must be an instance of the Eq type class. Of course, two Locations must be considered equal if and only if they are identical. You must also define a function to convert a Location into a two-character string of the upper-case column letter and row numeral, as shown throughout this document. What you must define In summary, in addition to defining the GameState and Location types, you must define following functions: toLocation :: String -> Maybe Location gives Just the Location named by the string, or Nothing if the string is not a valid location name. fromLocation :: Location -> String gives back the two-character string version of the specified location; for any location loc, toLocation (fromLocation loc) should return Just loc. feedback :: [Location] -> [Location] -> (Int,Int,Int) takes a target and a guess, respectively, and returns the appropriate feedback, as specified above. initialGuess :: ([Location],GameState) takes no input arguments, and returns a pair of an initial guess and a game state. nextGuess :: ([Location],GameState) -> (Int,Int,Int) -> ([Location],GameState) takes as input a pair of the previous guess and game state, and the feedback to this guess as a triple of the number of correct locations, the number of guesses exactly one square away from a ship, and the number exactly two squares away, and returns a pair of the next guess and new game state. You must call your source file Proj2.hs, and it must have the following module declaration as the first line of code: module Proj2 (Location, toLocation, fromLocation, feedback, GameState, initialGuess, nextGuess) where In the interests of simplicity, please put all your code in the single Proj2.hs file. Assessment Your project will be assessed on the following criteria: 10% Correctness of your toLocation, fromLocation, and feedback functions; 60% Quality and correctness of your guessing code; 30% Quality of your code and documentation The correctness of your toLocation, fromLocation, and feedback functions will be assessed through a number of calls to toLocation to construct a target and guess, calls to fromLocation to ensure it returns the correct string, and a number of calls to feedback to see if the correct feedback is produced. The correctness of your guessing code will be assessed based on whether it succeeds in guessing the targets it is given in the available time. Quality will be assessed based on the number of guesses needed to find the given targets. Full marks will be given for an average of 6 guesses per target, with marks falling as the number of guesses rises, and marks rising above 100% when the target is guessed in fewer than 6 guesses. This means that you will receive 100% for quality of your guessing code as long as the average is no more than 6. Note that timeouts will be imposed on all tests. You will have at least 5 seconds to guess each target, regardless of how many guesses are needed. Executions taking longer than that may be unceremoniously terminated, leading to that test being assessed as failing. Your programs will be compiled with ghc -O2 before testing, so 5 seconds per test is a very reasonable limit, if you code carefully. See the Project Coding Guidelines on the LMS for detailed suggestions about coding style. These guidelines will form. the basis of the quality assessment of your code and documentation. Submission You must submit your code through Ed, similarly to the previous assignment, and like previous exercises. This project will require more code, so you may find the Ed interface less convenient than your usual preferred editor. Feel free to use whatever tools you like to develop the code, but when you are finished, you must copy your code into the Ed window. Make sure you hit the Mark button to submit your code once it’s ready. You may submit your code as often as you like, with no penalty for repeated submissions. Testing your code The Run button in Ed will run your submission with the target F1 D2 G4, printing all the guesses and feedback, until it guesses correctly. You can edit the Main.hs file to change this target if you want to. This Main.hs program won't be used to test your code. Of course, can also test your code on your own computer using ghci, or in Ed by using the Terminal button. Normally once you click Terminal in Ed, you’ll automatically have access to the functions you’ve defined and be able to test them, however since your code file for this project is Proj2.hs, Ed doesn’t automatically load the file for you. You can load the file in Ed using the following ghci command: :load Proj2.hs (actually, you can abbreviate that to :l Proj2 and you can get help on the valid ghci commands with the :help command). This is how you must use ghci when it is installed on your own computer, as well. When you are ready to submit your code through Ed, hit the Mark button. This will perform. a few tests and show you the feedback. But for this project, it will only run some sanity checks. Passing these sanity checks does not guarantee that your code will pass all tests. You must thoroughly test your own code. The first sanity check will check the correctness of your feedback function. Following checks will check your guessing code (yourinitialGuess and nextGuess functions) with decreasing limits on the number of guesses. If your code passes all of these checks (with no failed checks), it is likely your code will achieve a fairly low average number of guesses when the final testing is performed (so it is likely to receive most of the points for average number of guesses). If your code fails a sanity check, you should check the message to determine the cause. It may simply be that your code took too many guesses for a particular test case; that does not mean you code is wrong, just that it may not receive a high mark for the quality of its guessing. Late Penalties Late submissions will incur a penalty of 0.5% of the possible value of that submission per hour late, including evening and weekend hours. Late submissions will incur a penalty of 0.5% per hour late, including evening and weekend hours. This means that a perfect project that is much more than 4 days late will receive less than half the marks for the project. If you have a medical or similar compelling reason for being late, you should contact the lecturer as early as possible to ask for an extension (preferably before the due date). Hints Start by defining your Location type. Take care to design an appropriate type. Then write your toLocation and fromLocation functions to convert between a Location to a two-character String. Next write your feedback function and test it very carefully. If your feedback function is erroneous, correct guessing code can easily go wrong. Finally, write your initialGuess and nextGuess functions. I suggest starting with a simple implementation, and get it working, before trying to reduce the number of guesses. Below are several hints for that. A very simple approach to this program is to simply guess every possible combination of locations until you guess right. There are only 4960 possible targets, so on average it should only take about 2480 guesses, making it perfectly feasible to do in 5 seconds. However, this will give a very poor score for guess quality. A better approach would be to only make guesses that are consistent with the answers you have received for previous guesses. You can do this by computing the list of possible targets, and removing elements that are inconsistent with any answers you have received to previous guesses. A possible target is inconsistent with an answer you have received for a previous guess if the answer you would receive for that guess and that (possible) target is different from the answer you actually received for that guess. You can use your GameState type to store your previous guesses and the corresponding answers. Or, more efficient and just as easy, store the list of remaining possible targets in your GameState, and pare it down each time you receive feedback for a guess. That way you don’t need to remember past guesses or feedback. The best results can be had by carefully choosing each guess so that it is most likely to leave a small remaining list of possible targets. You can do this by computing for each remaining possible target the average number of possible targets that will remain after each guess, giving the expected number of remaining possible targets for each guess, and choose the guess with the smallest expected number of remaining possible targets. Unfortunately, this is much more expensive to compute, and you will need to be careful to make it efficient enough to use. One thing you can do to speed it up is to laboriously (somehow) find the best first guess and hard code that into your program. After the first guess, there are much fewer possible targets remaining, and your implementation may be fast enough then. The choice of a good first guess is quite important, and the best first guess might not be what you’d intuitively expect. It turns out you get more information from feedback like (0,0,0) (which tells you there are no ships within 2 spaces of any of the guessed locations) than from feedback like (1,1,1), which says there are ships near all your guesses, but not where they are. You can also remove symmetry in the problem space. The key insight needed for this is that given any guess and an answer returned for it, the set of remaining possibilities after receiving that answer for that guess will be the same regardless of which target yielded that answer. In other words, all the guesses that yield the same feedback will leave you with the same set of remaining possibilities — specifically, the set of guesses that yield that feedback. For example, suppose there are ten remaining candidate targets, and one guess gives the answer (3,0,0), three others give (1,0,2), and the remaining six give the answer (2,0,1). In this case, if you make that guess, there is a 1 in 10 chance of that being the right answer (so you are left with that as the only remaining candidate), 3 in 10 of being left with three candidates, and a 6 in 10 chance of being left with six candidates. This means on average you would expect this answer to leave you with remaining candidates. In general, the formula is: where F F is the set of all distinct feedbacks ((3,0,0), (1,0,2), and (2,0,1) in the example above), count(f) count(f) is the number of occurrences of the feedback f (1 for (3,0,0), 3 for (1,0,2), and 6 for (2,0,1) in the example), and T is the total number of tests (10 in the example). Once you’ve computed this for each possible guess, you can just pick one that gives the minimum expected number of remaining candidates. Also note that if you do this incorrectly, the worst consequence is that your program takes more guesses than necessary to find the target. As long as you only ever guess a possible target, every guess other than the right one removes at least one possible target, so you will eventually guess the right target. Note that these are just hints; you are welcome to use any approach you like to solve this, as long as it is correct and runs within the allowed time. Note Well: This project is part of your final assessment, so cheating is not acceptable. Any form. of material exchange between teams, whether written, electronic or any other medium, is considered cheating, and so is the soliciting of help from electronic newsgroups. Providing undue assistance is considered as serious as receiving it, and in the case of similarities that indicate exchange of more than basic ideas, formal disciplinary action will be taken for all involved parties. If you have questions regarding these rules, please ask the lecturer. Rubric 30% of the project's weighting is dedicated to the quality of your code and documentation, as detailed below, with the remaining 70% weighting on correctness, as determined by test cases. Signature (1) 1 - Author clearly identified with name and id near the top of the file. 0.5 - Some identification, but missing name or id, or too far from the top of the file. 0 - No author identification. 1 or 2 line summary of file purpose (1) 1 - Good, clear, helpful one line summary near the top of the file explaining what the program does (not just what subject or project it's for). 0.5 - Unclear or not very helpful summary near top of file. 0 - No brief summary near top of file. Quality of file-level documentation (3) 3 - Clear, comprehensive but not overwhelming description of the purpose of the file and the approach taken, without assuming the reader knows the project. 2 - Clear description of the purpose of the file and the approach taken, but incomplete or too much irrelevant information. 1 - Brief description of the purpose of the file and the approach taken, but significant detail omitted or assumes knowledge of the project. 0 - Little or no file-level documentation. Quality of function/predicate/type level documentation (5) 5 - Outstanding documentation of every function/predicate/type explaining purpose, meaning of arguments and output, and any implementation subtleties. No unhelpful comments (eg, saying "increment i" next to a statement that increments i). 4 - Excellent documentation of almost every function/predicate/type explaining purpose and meaning of arguments and output. Subtleties explained, but no unhelpful comments. 3 - Good, clear documentation of important functions/predicates/types explaining meaning of arguments and output. No unexplained mysterious code, nor excessive comments about self-explanatory code. 2 - Some documentation for many functions/predicates/types explaining key arguments and output, but some missing documentation or excessive comments. 1 - Some documentation of some functions/predicates/types, but not particularly helpful or too distracting. 0 - Little or no useful documentation of functions/predicates/types or purposes, or excessive unhelpful comments making the code harder to understand. Readability (5) 5 - Beautifully readable, with neat, consistent layout. A pleasure to read. 4 - Very readable and tidy, with good code layout. Easy to navigate. 3 - Well presented, neat, mostly consistent layout. 2 - Mostly readable, but with some messy parts. Layout inconsistent in places or some long lines. 1 - Hard to read, with inconsistent or poor layout or many long lines. 0 - Little evidence of effort to layout the code. Illegible. Understandability (5) 5 - A clear approach, well organised, with any subtleties clearly explained. Names well chosen and clear but not too long. 4 - Cleanly organised structure, with subtleties explained. Names are understandable. 3 - Functions/predicates are pretty understandable. Names are mostly clear enough. Some effort to organise the presentation. 2 - Some of the code is unclear without explanation. Some names are a bit cryptic. Not much organisation of the code. 1 - Much of the code and/or many of the names are hard to understand. Little effort to group related things together. 0 - Code is completely cryptic. Names give little hint of purpose. Abstraction (5) 5 - Well structured code, each part with a single purpose, no code repetition, no divided responsibilities, succinct definitions. Simple, elegant code. 4 - Well thought-out structure, no code repetition, no long definitions, simple code. 3 - Good structure, no code repetition, reasonable length definitions, code could be a bit simpler. 2 - Some apparent structure, not a lot of redundant code, but code could have been simpler with a bit more abstraction. 1 - Not much evident structure; could could be substantially improved with some abstraction. 0 - Spaghetti code. Use of Language and Libraries (5) 5 - Elegant use of language and library facilities; no wheels reinvented; code reflects mastery of the language and libraries. 4 - Excellent use of language and library facilities; not much could be improved with better language or library use; code reflects good understanding of the language and libraries. 3 - Program demonstrates good use of language and library facilities in many places, although some some opportunities for more sophisticated usage were missed. 2 - Program makes good use of language and library facilities in a few places, but misses many opportunities for better usage. 1 - Program mostly uses the most basic language and library facilities, but misses many opportunities for better usage. 0 - Program hardly uses any language and library facilities, reflecting little understanding of the language or library.
Comprehension Questions Directions: Answer the following questions as you watch the film. 1. Similar to North by Northwest, how is tension established in the opening credits of Psycho? 2. Using a motif similar to Rear Window, how does Hitchcock take us into Marion and Sam’s world? 3. What does Tom, the homebuyer, say to Marion about how to alleviate unhappiness? 4. Hitchcock uses voice-over narration in a way that we haven’t seen before in other films. What does he tell the viewer with this technique? Some of the scenes include when Marion sees her boss after leaving Phoenix and after she buys a new car. What sound effects are applied to the voices? 5. Marion overhears a fight between Norman and his mother from the house. Characterize the relationship between Norman and his mother that viewers can infer from their verbal spat. 6. What is Norman’s hobby? How is this information important to the story and establishing his character? 7. What does Norman say about people and traps? He says he’s born into his trap. What is Norman’s trap? 8. Briefly analyze the following shot in terms of its content, its framing, its angle, etc. What is the significance of the owl in the background? 9. What does Norman’s advice about traps inspire Marion to do? What does she plan to do? 10. How is voyeurism apparent in Psycho? What happens to Norman when he becomes a voyeur? 11. In the shower scene, explain the metaphor Hitchcock makes when he cuts from an extreme close-up of the drain to an extreme close-up of Marion’s eye. 12. When Arbogast begins to suspect that Norman may be lying, Hitchcock switches from medium shots to medium close-up shots. Why does he do so? 13. In Arbogast’s murder scene, why is a bird’s-eye-view shot so necessary? 14. When Sam and Lyla visit the sheriff, what do they learn happened ten years ago? How were Norman’s mother and her lover found and by who? Why might this be important? 15. Besides Marion and Arbogast, what other people has Bates killed? What justification does the psychiatrist give for the reason that Norman killed other Bates motel patrons? 16. As briefly as you can, paraphrase what happened to Norman and why he is who is he is according to the psychiatrist. Photography Review Directions: To review the types of shots, angles, and lighting concepts we learned in chapter one, briefly explain the type of shot and angle for each shot. Afterwards, briefly explain why you think that Hitchcock chose that particular shot and angle for that shot. Why is the shot effective? :_______________________________ :_________________________________________ Why did Hitchcock choose t :_______________________________ :_________________________________________ Why did Hitchcock choose th :_______________________________ :_________________________________________ Why did Hitchcock choose t
Drs. J. Senk & P. Wijeratne: Applied Machine Learning @ University of Sussex – Spring 2025 Coursework Assignment1 Assignment OverviewThis assignment will involve you designing, building, testing and critiquing systems for two applied machine learning tasks.1. Task 1 (50%): A system for performing spam detection, aka. classifying spam from non- spam in text.2. Task 2 (50%): A system for performing face alignment, aka. locating facial landmarks in images of people.This assignment is worth 100% of the grade for this module. It is designed to ensure you can demonstrate achieving the learning outcomes for this module, which are to:• • • •21.Determine the applicability of different machine learning models to data found in real- world applications.Propose designs for simple systems, including appropriate pre-processing, to solve practical problems using machine learning.Implement and document a computer program that learns and applies machine learning models to realistic data.Critically evaluate the efficacy of proposed systems and appropriately communicate this analysis.What to hand in?A report that comprises a maximum of 10 pages and 3000 words, including captions but excluding references. We expect several pictures, diagrams and flowcharts to be included. Please only use the .zip archive format for your submission.The report should be written in two sections, one for each task. For each task, you should cover the following points. More detail is provided in Sections 3 and 4 below.• A summary and justification for all the steps in your system, including preprocessing, choice of features and prediction model. Explaining the system diagrammatically is very welcome.• Results of your experiments. This should include some discussion of qualitative (ex- ample based) and quantitative (number based) comparisons between different ap- proaches that you have experimented with.Drs. J. Senk & P. Wijeratne: Applied Machine Learning @ University of Sussex – Spring 2025 • Examples of failure cases in your system and a critical analysis of these, identifying potential biases of your approach.2. Either .ipynb files or .py files containing annotated code for all data preprocessing, model training and testing.3. For Task 1: A csv file that contains the predicted labels on the test set of text, found in the csv file (spam detection test data.csv) here. You must use the provided “save as csv” function in the Colab worksheet to process an array of shape (number test data, 1) to a csv file. Please make sure you run this on the right data and submit in the correct format to avoid losing marks.4. For Task 2: A csv file that contains the face landmark positions on the test set of images, found in the compressed numpy file (face alignment test images.npz) here. You must use the provided “save as csv” function in the Colab worksheet to process an array of shape (number test image, number points, 2) to a csv file. Please make sure you run this on the right data and submit in the correct format to avoid losing marks.Note! Do not reorder the test data or it will not match up with the test labels / points!3 Task 1: Spam Detection3.1 Mark allocation25 marks will be awarded for writing and presentation and 25 for coding and data analysis. 10 Marks25 MarksAccuracy and robustness of spam detectionThese marks are allocated based on the performance of the spam detection method. This will be evaluated on the held out test set. The test data (without labels) are provided in the csv file (spam detection test data.csv) here and the error on the predicted labels will be calculated after submission. Marks will be awarded for average accuracy and robustness (based on the confusion matrix of your predictions). Note that only we have the test labels!Outline of methods employedJustifying and explaining design decisions for the spam detection. This does not have to be in depth, and we do not expect you to regurgitate the contents of the lecture notes/papers. You should state clearly:• any text pre-processing steps you have used, and why.• what text features/representation you have used, briefly describe how they were cal-culated, and why you chose them.• what predictions methods you have use; what ML task this corresponds to, the type of model that you have used, and the loss function that your system is trained with.• design/parameter decisions should be explained and justified.For top marks, you should clearly demonstrate a creative and methodical approach for designing your system, drawing ideas from different sources and critically evaluating your choices. Explaining using diagrams and/or flowcharts is very welcome.Drs. J. Senk & P. Wijeratne: Applied Machine Learning @ University of Sussex – Spring 2025 15 Marks Analysing results and failure casesCritically evaluate the results produced by your system on validation data. You should include quantitative (number based) and qualitative (example based) comparisons between different approaches that you have tried (on a held-out validation set).3.2Most important linksQuantitative measures include calculating the confusion matrix of your predictions. Please note that we are interested in your final prediction results, rather than how the cost function changes during training. Please explicitly define any evaluation metrics and ensure they are appropriate for the task. ContentsTraining text and label dataTest text data (without labels)Colab worksheet with some useful functions3.3 Where to start?filetype linkscsv file (spam detection training data.csv) link csv file (spam detection test data.csv) link Colab worksheet link Text classiciation is covered in lecture 14, so that’s a good place to look for information. Other lectures (e.g., lecture 15) are also helpful.We have included a very basic Colab worksheet illustrating how to load the data and print random text examples based on their labels. An example print-out is shown in Figure 1.The simplest approach would be to treat this as a classification problem, where given text data you want to predict the whether or not it is spam.To follow this approach you will need to consider what natural language pre-processing steps are necessary to obtain suitable features for your predictive model.Figure 1: Example of non-spam text (label == 0) in the training dataset (spam detection training data.csv). Drs. J. Senk & P. Wijeratne: Applied Machine Learning @ University of Sussex – Spring 2025 4 Task 2: Face Alignment4.1 Mark allocation25 marks will be awarded for writing and presentation and 25 for coding and data analysis.10 Marks Accuracy and robustness of face alignmentThese marks are allocated based on the performance of the face alignment method. This will be evaluated on the held out test set. The test images, without annotations are provided in the compressed numpy file (face alignment test images.npz) here and the error on the predicted points will be calculated after submission. Marks will be awarded for average accuracy and robustness (% of images with error below a certain threshold). Note that only we have the test points!25 Marks Outline of methods employedJustifying and explaining design decisions for the landmark finding. This does not have to be in depth, and we do not expect you to regurgitate the contents of the lecture notes/- papers. You should state clearly:• any image pre-processing steps you have used, and why.• what image features/representation you have used, briefly describe how they werecalculated, and why you chose them.• what predictions methods you have use; what ML task this corresponds to, the loss function that your system is trained with, and a description of any regularisation that you may have used.• design/parameter decisions should be explained and justified.For top marks, you should clearly demonstrate a creative and methodical approach for designing your system, drawing ideas from different sources and critically evaluating your choices. Explaining using diagrams and/or flowcharts is very welcome.15 Marks Analysing results and failure casesCritically evaluate the results produced by your system on validation data. You should include quantitative (number based) and qualitative (example based) comparisons between different approaches that you have tried (on a held-out validation set).Quantitative measures include measuring the cumulative error distribution (see lecture slides) or using boxplots or other plots to compare methods. Please note that we are interested in your final prediction results, rather than how the cost function changes during training. Please explicitly define any evaluation metrics and ensure they are appropriate for the task.4.2Contents filetype linksMost important links Training images and pointscompressed numpy array (face alignment training images.npz) link Test images (without points)compressed numpy file (face alignment test images.npz) link Colab worksheet with some useful functions Colab worksheet link Drs. J. Senk & P. Wijeratne: Applied Machine Learning @ University of Sussex – Spring 2025 4.3 Where to start?Face alignment is covered in lecture 8, so that’s a good place to look for information. Other lectures (e.g., lecture 7) are also helpful.We have included a very basic Colab worksheet illustrating how to load the data and visualise the points on the face. A visualisation of the average face and points across all training images is given in Figure 2.The simplest approach would be to treat this as either a regular or a cascaded regression problem, where given an image you want to predict the set of continuous landmark coordinate locations.To follow this approach you will need to consider what image features are helpful to predict the landmarks and what pre-processing is required on the data. Although you could directly use the flattened image as input, this will not be the optimal data representation for this task.A better representation would be to describe a set of locations, either evenly spaced across the image, or in some more useful pattern (think about where in the image you might want to calculate more information) using a feature descriptor, such as Scale-Invariant Feature Transform (SIFT). These descriptions can then be concatenated together and used as input into a linear regression model. Note that you do not need to use the keypoint detection process for this task - rather the descriptors should be computed at defined locations (hint: look at sift.compute() or similar) to create a representation of the image that is comparable across the dataset.Figure 2: Illustration of the 0-indexed (counting from 0 as you would in Python) locations of the points on the average face. For example, if we wanted to find the nose, that’s index 2 so we would look up points[2,:], which would give you the x and y coordinates. Drs. J. Senk & P. Wijeratne: Applied Machine Learning @ University of Sussex – Spring 2025 5General Points on the reportRead things! Provide references to anything you find useful. You can take figures from other works as long as you reference them appropriately.Diagrams, flowcharts and pictures are very welcome! Make sure you label them properly and refer to them from the text.All plots should have correctly labelled axis and the font sizes must be readable in A4 page format.All figures (including plots) should have descriptive captions.Notes on using Colab6• • • •Either you can complete this project using Google Colab, which gives you a few hours of comput- ing time completely free of charge, or you can use your personal/lab machine. The lab machines are fairly powerful, so if you need more computing resource then try those!If you are using Google Colab, try and familiarise yourself with some of its useful features.To keep your saved models, preprocessed data etc. you can save it to Google drive following the instructions here. You can also directly download a file you make in Colab using the code below:from google.colab import files files.download(filename)If you refactor code into extra .py files, these should be stored in your google drive as well, or on Box such that they are easy to load into your Colab worksheet.7 What software functionality can I use?You are not allowed to use generative AI tools (e.g., ChatGPT, Deepseek, etc.) to solve these tasks or write your report.You are not allowed to use library functions that have been written to directly solve the tasks you have been given, i.e. text classification and face alignment. You cannot use the dlib or mediapipe face alignment tools or anything that provides similar functionality. Also, face detection is not required on this data.You are free to use fundamental components and functions from libraries such as NLTK, OpenCV, numpy, scipy, scikitlearn to solve this assignment, although you don’t have to. Here, fundamental components refers to things like regression / classification models and pre-processing / feature extraction steps and other basic functionality.In terms of tools and frameworks, it’s absolutely fine to use convolutional neural networks (CNNs) or recurrent neural networks (RNNs) if you want to. The best packages would be either TensorFlow (probably with Keras) or PyTorch. If you use such an approach you should be sure to document how you chose the architecture and loss functions. A well justified and high performing deep learning approach will receive equivalently high marks as if you had built it any other way.In terms of sourcing additional labelled data, this is not allowed for this assignment. This is because in real-world commercial projects you will typically have a finite dataset, and even ifDrs. J. Senk & P. Wijeratne: Applied Machine Learning @ University of Sussex – Spring 2025 there are possibly useful public datasets available, their license normally prohibits commercial use. On the other hand data augmentation, which effectively synthesises additional training examples from the labelled data that you have, is highly encouraged. If you use this, please try and add some text or a flow-chart of this process in your report.8• •• • ••Top Tips for SuccessRefer to lecture slides and labs - all the information is in there to complete these tasks!Remember Occam’s razor: complexity should not be added unnecessarily. The more complicated your system the more things to explain/justify etc.Start with a simple achievable goal and use that as a baseline to test against. Keep track of early models/results to use as points of comparison.Remember that even if it doesn’t work well, having a go at both tasks is worthwhile. We’re only looking for simple solutions and your explanation of your system design.Think about things that you have learned about in Applied Machine Learning. Dimen- sionality reduction could be helpful. Overfitting and outliers may be an issue, and you should consider using methods to minimise this.For Task 2: You don’t need to work at very high resolution to get accurate results. Partic- ularly when doing initial tests, resize your images to a lower resolution images. Make sure you also transform your training points so they are in the same geometry as the image (i.e., if you half the size of the image along both axes, then make sure to half the (x,y) position of the training points too). For your predicted points, make sure these are all at the same resolution as the original images.
MANG6134W1 SEMESTER 2 EXAMINATIONS 2016-17 RISK TAKING AND DECISION MAKING 1. Risks ‘R’ Us Ltd decide that it is advisable to make all future strategic decisions based on the Board’s utility function. Explain, how the utility curve of the Board can be derived, how it could be used to help make decisions and discuss the value of utility analysis, particularly in situations where monetary values are not available. In explaining how the utility curve is derived for the Board you should give an example of the sorts of questions that the Board members would need to be asked. [100 marks] 2. Emma Wang is trying to decide on her future career path. Discuss how she might tackle this problem with the aid of the normative, structured approach offered by decision analysis. Your answer should: (a) Outline the various stages Emma should go through in reaching her decision. Discuss the purpose of each of these stages and the manner in which these stages are connected. Where possible, illustrate your answer with examples related to this career decision. [40 marks] (b) Identify the advantages which such an approach might offer. [40 marks] (c) Describe the difficulties which Emma might experience when applying this approach in practice. [20 marks] 3. Following the election of a new president, the USA is attempting to negotiate a free trade deal with the UK. Both the US and the UK are attempting to maximise their financial gain arising from the deal. Both US and UK realise that they can each employ one of three negotiating strategies, and the financial gain they will secure (all measured in $ billions) will depend upon the strategy employed by both US and UK. In particular, if US adopt U1 then the financial gains the US will secure are 8, 12 and 4 if the UK adopt K1, K2 and K3, respectively. If US adopt U2 then the financial gains the US will secure are 10, 12 and 4 if the UK adopt K1, K2 and K3, respectively. If US adopt U3 then the financial gains the US will secure are 10, 14 and 6 if the UK adopt K1, K2 and K3, respectively. Similarly, if the UK adopts K1, then the financial gains the UK will secure are 12, 6 and 6 if US adopts U1, U2 and U3, respectively. If the UK adopts K2, then the financial gains the UK will secure are 8, 4 and 6 if US adopts U1, U2 and U3, respectively. If the UK adopts K3, then the financial gains the UK will secure are 6, 10 and 6 if US adopts U1, U2 and U3, respectively. (a) Draw the gain matrix to capture the information given above related to the free trade negotiations. [10 marks] (b) Determine the likely outcome of these negotiations and explain how a more optimal outcome for both the US and UK might be achieved. [30 marks] The US is also attempting to renegotiate a deal for the cost a rare mineral from Russia. The price that US will pay per gram ($) and hence the amount that Russia will receive depends upon the strategies they both adopt as follows: (If Russia employs R1 and the US employs U4 then Russia will receive $2 per gram for the rare mineral and the US will pay $2 per gram for the rare mineral). (c) Discuss why R3, U4 might appear to be a ‘solution’ to these negotiations and explain why it is unlikely to be achieved in practice. [20 marks] (c) Determine the optimal strategy for the USA in these negotiations and the amount they can expect to pay for the rare mineral. [40 marks] 4. A politician is deciding on the approach they should adopt in their election campaign in order to maximise the number of votes they will secure. She commissions some opinion polls and collects a variety of data from focus groups regarding voters’ preferences. She also consults a political analyst who provides her with their views on the chances of success using a variety of different election campaign approaches. (a) Explain what Prospect Theory would predict about the biased manner in which the politician might make this decision. In particular, discuss the possible shape of the politician’s probability weighting function and value weighting function. Also, discuss what Prospect Theory predicts about the manner in which the politician might combine these when making her decision. [40 marks] (b) Explain to the politician why she should employ System 2, rather than System 1 thinking when making this decision. [20 marks] (c) The politician assesses the subjective probabilities of the votes she might achieve if adopting a number of different election campaign approaches. Discuss why and in what way the anchoring and adjustment heuristic might influence her subjective probability assessments and how she might minimise the impact of this heuristic on her decision making. [40 marks] 5. Following BREXIT an investment management firm, 8UR, is in the process of determining which of three alternative corporate strategies it should adopt (X, Y, Z) in order to maximise the additional clients’ funds they will attract over the next 5 years. 8UR’s economist estimates that the clients’ funds (£billions) they will attract over the next 5 years depends on whether interest rates in that period are low, medium or high. In particular, if they adopt strategy X, then she expects 8UR to secure clients’ funds (£billions) of 3, 6 and 10 if interest rates are low, medium and high, respectively. If 8UR adopt strategy Y, then she expects 8UR to secure clients’ funds (£billions) of 4, 7 and 9 if interest rates are low, medium and high, respectively. If 8UR adopt strategy Z, then she expects 8UR to secure (£billions) of 1, 5 and 14 if interest rates are low, medium and high, respectively. (a) Discuss the relative strengths and weaknesses of the insufficient reason and maximin criteria for helping to decide which strategy 8UR should adopt (NO CALCULATION REQUIRED). [20 marks] (b) Which strategy would 8UR adopt if they used the regret selection criterion? Outline the circumstances under which the application of this technique would be appropriate. [20 marks] (c) The economist now decides that the probability of interest rates being ‘medium’ is zero. If the board of 8UR are risk neutral, what must be the economist’s minimum estimate of the probability of low economic activity in order for 8UR to select strategy Y? [20 marks] (c) The economist now estimates that the probabilities of interest rates being low and high over the next 5 years are 0.3 and 0.7 respectively. Draw a risk/return diagram for this problem. [15 marks] (e) Suggest alternative techniques to those indicated above which 8UR might employ to help select an appropriate strategy. [25 marks] 6. The consultancy organisation for which you work, Uncertainty plc, has asked you to advise one of their clients. Prepare a report for the client which explains why subjective probabilities are often needed when making management decisions and outline a systematic approach they can use for probability assessment. You should also discuss the strengths and weaknesses of alternative means that they might use for quantifying subjective probabilities. [100 marks]
Programming Project TK3163 April 2025This assignment has 6 activities:1. Upload and install Jflex and read the manual of JFLex.I. URL for JFLex installation: https://jflex.de/download.htmlII. Once you have downloaded JFlex, unzip the file. Then, open the bin folder and right- click on the jflex.bat file, which is the batch script used on Windows to automate the execution of JFlex. Then press OK. Now JFlex has been successfully installed and the two environment variables are properly set.The next step is to understand the lexical structure of the Java programming language. To do this, refer to the manual or documentation related to Java's lexical elements using the following link: https://jflex.de/manual.html.Specifically, you need to understand how Java code is broken down into tokens such as keywords, identifiers, operators, and literals. From this, choose at least five components of Java's syntax to implement using Jflex (Refer to Question2).2. Read manual program of JAVA programming language and understand the lexical description by choosing at least 5 components from the lexical JAVA Programming Language, such as statements or expressions,a. Variable Declaration.b. Assignment.c. Selection (if-else)d. Looping (For)e. PrintFor each of the above-stated components, you must define the lexical rules in a .flex fileusing JFlex syntax.This file should be written in a simple text editor, such as Notepad, and saved with one of the following extensions: .jflex, .jlex, .lex, or .flex. The rules inside the file will define patterns using regular expressions to recognize these components in Java code.After saving the file, you need to compile it using JFlex via the command prompt. Navigate to the directory where your file is saved (using the cd command in the command prompt).Then, run your file. This will generate a Java lexer class capable of tokenizing input based on the rules you've defined. 3. Prepare JFlex specification to show regular definition for token described in activity 2.For this step, you need to prepare the JFlex specification to show the regular definitions for the tokens described in section 2.Specifically, you need to define regular expressions for Java components like variable declarations, assignments, if-else statements, for loops, and print statements in the .flex file. Each regular expression then will be corresponded to a token in Java code.After defining these patterns, you must compile the .flex file with JFlex to generate a lexer that can tokenize Java code according to the rules you've defined.4. Generate a JAVA program using JFlex and show the result of running the program.After that in this stage you need to generate a Java program using JFlex. To do this, run JFlex from the command prompt to convert the .flex file into a Java lexer. This will generate a .java file, which contains the lexer class.Once the Java lexer is generated, you can compile and run the Java program to see the results of your lexer in action.The lexer will process the input based on the regular expressions you've defined in the .flex file and produce the corresponding tokens.5. Running 4 example programs generated through JFlex generation, 2 example for no error report program and 2 examples with a few errors report and highlight the error.For this step, you need to create four sample input files. The first two files should contain valid Java code with no lexical errors.These files will be processed by the lexer, which should correctly tokenize all the valid components, such as keywords, identifiers, operators, and symbols.The remaining two files should intentionally include lexical errors. These errors can be things like misspelled keywords (e.g., using whle instead of while), invalid symbols (such as @ instead of a valid operator), or incorrect identifiers (like starting an identifier with a number).After creating these files, you will run the lexer on both the valid and invalid input files. The lexer should successfully tokenize the valid code and highlight the lexical errors in the files with mistakes, providing appropriate error messages for unknown tokens or invalid syntax.6. For every example, you need to produce a list of lexemes, token types and token.For each of the example in section 5 you must come out with Lexical Analysis Table.
ECON30290 - AUCTIONS AND MECHANISM DESIGN ASSIGNMENT 2 Deadline: Noon, 28 April 2025 First Published: 13 March 2025 Online Answer Sheet Available: Noon, 21 April 2025 1. Instructions a. No extensions will be given! Please set aside some time in advance to solve this assignment. You have been given over a month to do so. b. Carefully read every problem. c. Do not round answers while solving a problem. Only do so when you submit your answer. d. To submit your answers, go to Blackboard and initiate the online assignment. There, you will receive an answer sheet, where you can supply your answers. e. When you submit your final answer include up to 3 digits after the decimal point and round down. Furthermore, do not include redundant zeros. For example 1/3 should be 0.333, √7 = 2.645, and 1/4 should be 0.25 (not 0.250). 2. Mechanism Design 1. There are 2 buyers i = 1, 2. The valuations are given by the CDFs F1(x) = 2/x in [0, 1] and F2(x) = x 2 in [0, 2]. The seller wishes to find the optimal selling mechanism. 1.1 The function ψi is given by ψi(x) = Aix+Bi . Find A1, B1, A2, B2. (30 marks) 1.2 The optimal allocation can be described as follows: • x1 < C1 and x2 < C2 ⇒ item isn’t sold. • x1 ≥ D1 and x1 − x2 > D2 ⇒ buyer 1 wins. • x2 > E1 and x2 − x1 > E2 ⇒ buyer 2 wins. Find C1, C2, D1, D2, E1, E2. (45 marks) 1.3 The optimal payment functions are Find F, G, H, I, J, K. (25 marks)
ECON20532 Macroeconomic Analysis 4 Spring 2019 1 Tutorial 5 1.1 Question 1 Consider an overlapping generations economy in which capital pays a 25 percent net rate of return. The population of a generation grows by 10 percent each period. In the initial period (period 1), there are 100 people and a preexisting fiat money stock of M0 = $1 million. Because of a political impasse, government expenditures exceed (nonseigniorage) tax revenues by 50 goods per young person in every period. Each young person wishes to hold real money balances worth 200 goods regardless of the rate of infiation. a. Use the government budget constraint to find the rate of fiat money creation that is required to finance the excess of government expenditures over taxes. Find also the fiat money stock and the price level in periods 1 and 2. b. Suppose that in the initial period, the monetary authority hesitates to print new money, forcing the government to issue debt at the market rate of interest. In the second period, the monetary authority relents, printing enough new money to pay off the debt as well as to pay for the second period's excess of government expenditures over taxes. Find the fiat money stock in period 2 and compare it with your answers in part a. Explain the difference. 1.2 Question 2 Suppose the government must borrow 1,000 goods in period 1. Let the gross real marginal product of capital equal 1.07. Assume that people always want to hold fiat money balances worth a total of 100 goods and that the fiat money stock in period 1 is $10,000. Suppose people expect the government to increase the fiat money stock by 100 percent and that the population is constant. a. What will the nominal net interest rate be? b. What will the real value of the debt in period 2 be? c. What will it be if the fiat money stock rises by 10 percent but this rise is unexpected (and people still expect an increase of fiat money by 100%)?
ECON30290 MATHEMATICAL ECONOMICS IIA Question 1. (a) Define and interpret the notion of a correlated strategy in a two-player two-strategy game. (b) For the game describe the set of all payo§ allocations (u(γ); v(γ)), where γ ranges over the set of all correlated strategies (u and v denote the payo§ functions of players 1 and 2, respectively). Draw a diagram depicting the set of all such payo§ allocations represented by points in the plane. (c) Define the notion of an implementable payoff allocation. Explain what an individual rationality constraint is. Find the set of all imple- mentable payoff allocations for the game specified in (b). By using the diagram constructed in (b) show what points in the plane belong to the set of implementable payoff allocations. [20 marks] Question 2. Consider the game: (a) Find best responses p = BR1(q) of player 1 to mixed strategies q of player 2 and best responses q = BR2(p) of player 2 to mixed strategies p of player 1. Draw a diagram depicting the graphs ofthe best response mappings (reaction curves) in the plane. By using this diagram find pure strategy and mixed strategy Nash equilibria in the game under consideration. (b) By using the diagram constructed in (a), find out what will be the limiting behaviour (as t → ∞) of the fictitious play dynamics in the following three cases: if the fictitious play starts from the initial state (p(0); q(0)) = (0.2; 0.4), if it starts from (p(0); q(0)) = (0.5; 0.8), and if it starts from (p(0); q(0)) = (0.9; 0.8). Draw the trajectories of fictitious play starting from the above initial states. [20 marks] Question 3. (a) Let G be a two player game with strategy sets A and B and payo§ functions u(a; b) and v(a; b). Consider the infinitely repeated game with the stage game G and a discount factor 0 < δ
STAT3600 Statistical Analysis Assignment 4 (submit Q4, Q5, Q7) Deadline: 2 May, 2025 Note: (1) Numeric values should be presented in 4 decimal places. (2) Show the intermediate steps for Q4 – Q10. 1. A rehabilitation center researcher was interested in examining the relationship between physical prior to surgery of persons undergoing corrective knee surgery and time required in physical therapy until successful rehabilitation. Patient records in the rehabilitation center were examined, and 24 male subjects ranging in age from 18 to 30 years who had undergone similar corrective knee surgery during the past year were selected for the study. The number of days (Y) required for successful completion of physical therapy and the prior physical fitness status (A: 1 = below average, 2 = average, 3 = above average) of each patient are recorded. The rehabilitation researcher wishes to use age of patient (X) as a concomitant variable. The data file is ‘rehabit.csv’. (a) Read the data into ‘mydata’. Run and explain the following codes. ove'))mydata$Amydatafactormydatalevelslabelshumanities'','',''))mydatarelevelmydatarefhumanities (c) Report the least squares estimates for the regression coefficient in the regression model in (a). (d) Find the treatment means obtained, yij. by the model. Plot the treatment means. Does it appear that any factor effects are present? Explain. (e) What is the reduced model for testing for interaction effects? Fit the reduced model and thus, test whether or not interaction effects are present by fitting the full and reduced models; use a = 0.01. State the alternatives, decision rule and conclusion. What is the p-value of the test? (f) State the reduced regression models for testing for subject matter and highest degree main effects, respectively, and conduct each of the tests. Use α = .01 each time and state the alternatives, decision rule, and conclusion. What is the p-value of each test? (g) Based on the full model, make all pairwise comparisons between the subject matter means. Use a 95 percent (individual) confidence coefficient. (h) Based on the full model, make all pairwise comparisons between the highest degree matter means. Use a 95 percent (individual) confidence coefficient. 3. A consumer organization studied the effect of age and gender of automobile owner on size of cash offer (Y: in hundred dollars) for a used car by utilizing 12 persons in each of three age groups (A: 1 = young, 2 = middle, 3 = elderly) who acted as the owner of a used car. Six male (B = 1) and six female (B = 2) volunteers were used in each age group. An analyst wishes to use each dealer’s sales volume (X: in hundred thousand dollars) as a concomitant variable. The data are stored in ‘cash.txt’. Assume that covariance model is applicable. (a) State the regression model equivalent to covariance model. Fit this full model. (b) State the reduced regression models for testing for interaction and factor A and factor B main effects, respectively. Fit these reduced regression models. (c) Test for interaction effects; use α = .05. State the alternatives, decision rule, and conclusion. What is the p-value of the test? (d) Test for factor A main effects; use α= .05. State the alternatives, decision rule, and conclusion. What is the p-value of the test? (e) Test for factor B main effects; use α= .05. State the alternatives, decision rule, and conclusion. What is the P-value of the test? (f) For each factor, make all pairwise comparisons between the factor level main effects. Use a 90% confidence level for each comparison. 4. Five observations of a response variable Y and a treatment A are given as follows. (a) Use level 3 of A as the reference level. Using the zero constraint (ii) in 7.2.1, state the regression model equivalent to an ANOVA model. State the data matrix, X, of the regression model. (b) Calculate XTX, X TY and YTY. (c) It is given that Calculate the LSE of the regression coefficients. (d) Compile the ANOVA table. Test the effects of A at the 5% level of significance. State the hypotheses, decision rule and conclusion. (e) Conduct a T test for each of the coefficients at the 5% level of significance. Interpret the results. (f) Express mean Y for each level of A in terms of the parameters in (a). (g) Express the pairwise comparisons of mean Y for the 3 levels of A in terms of the parameters in (a). Thus, make all pairwise comparisons between the treatment effects; use a 90% confidence level by the Bonferroni’s method. Thus, comment of the comparisons of the treatment effects. 5. Six observations of Y are given for four treatments defined by two factors A and B. (a) Use levels 2 of A and B, respectively, as the reference levels. Using the zero constraint (ii) in 7.2.1, state the regression model equivalent to a 2-way ANOVA model with interaction. State the data matrix, X, of the regression model. (b) Calculate XTX, X TY and YTY. (c) It is given that Calculate the LSE of the regression coefficients. (d) Test whether there is a regression of Y on the main effects ofA, B and their interaction at the 5% level of significance. Compile the ANOVA table, state the hypotheses, decision rule and conclusion. (e) Express mean Y for each of the four treatments in terms of the parameters in (a). (f) Express the pairwise comparisons among the means for Y of the four treatments in terms of the parameters in (a). Thus, make all pairwise comparisons between among the treatments; use a 90% confidence level by the Bonferroni’s method. Thus, comment of the comparisons of the treatment effects. 6. Refer to Q5. (a) State the reduced model to test for the interaction effect. State the data matrix, Xr, of the regression model. (b) It is given that Calculate SSE for the reduced model. (c) Test the interaction effect at the 5% level of significance by an F test. state the hypotheses, decision rule and conclusion. State the hypotheses, decision rule and conclusion. (d) Consider a model without interaction. Test the main effects ofA and B, respectively, by an F test at the 5% level of significance. State the hypotheses, decision rule and conclusion. 7. A randomized block design is considered. There are 4 levels of factor A and two blocks. The observations of Y are given as follows. (a) Use level 3 of A as the reference level. Using the zero constraint (ii) in 7.2.1. State the regression model equivalent to the block design. State the data matrix X. (b) Calculate the LSE for the regression coefficients. It is given that (c) Compile the ANOVA table. (d) Test at the 5% level of significance the effect of factor A. State the hypotheses, decision rule and conclusion. (e) Use the Bonferroni’s method at 95% confidence level, conduct a pairwise comparison ofmean Y among the three levels ofA. 8. Five observations of a response variable Y, a treatment A and a covariate X are given as follows. It is given that (a) Use level 2 of A as the reference level. Using the zero constraint (ii) in 7.2.1. State the regression model equivalent to an ANCOVA model. State the data matrix X. (b) Calculate the LSE for the regression coefficients and SSE in (a). (c) State the reduced model for testing the effects ofA and calculate SSE for the reduced model. (d) Test the effects ofA; use α = 0.05. State the hypotheses, decision rule and conclusion. (e) Use the Bonferroni’s method at 90% confidence level, conduct a pairwise comparison ofmean Y among the three levels ofA. 9. Refer to Q8. Construct a 95% confidence interval for the average of the means of Y for the values given as follows. 10. Seven observations ofa response variable Y, two treatments A and B, and a covariate X are given as follows. (a) State the regression model equivalent to ANCOVA model with interaction between A and B. Calculate least squares estimates of the regression coefficients and SSE. It is given that Calculate the standard errors of the regression coefficients. (b) Test for interaction effects; use α = .05. State the alternatives, decision rule, and conclusion. What is the p-value of the test? (c) Construct the Bonferroni 95% confidence intervals for the pairwise comparisons among all four treatments defined by A and B. Comment on the differences.
STAT3600 Assignment 3 (submit Q7c, Q10, Q11) Deadline: 11 Apr, 2025 Note: (1) Numeric values should be presented in 4 decimal places. (2) Show the intermediate steps for Q4 — Q11. 1. A personal officer in a governmental agency administered four newly developed aptitude tests to each of 25 applicants for entry-level clerical positions in the agency. For purposes of the study, all 25 applicants were accepted for positions irrespective of their test scores. After a probationary period, each applicant was rated for proficiency on the job. In order, the job proficiency score (y) and the scores on the four tests (x1, x2, x3, x4) for the 25 employees were stored in ‘job.txt’. a. Fit a regression model for 4 predictor variables to the data. Write down the fitted regression model. State clearly the assumptions. b. Construct the ANOVA table and hence test whether there is a regression relation. Use α = 0.05. c. Find the 99% confidence interval for each of the regression coefficients. d. Test whether x2 can be dropped from the regression model given that x1, x3 and x4 are retained. Use the F test statistic and α = 0.05. State the hypotheses and conclusion. e. Determine the subset of variables that is selected by the forward selection method, based on the entry level α = 5%. Show your steps. Report the fitted final selected model. f. Determine the subset of variables that is selected by the backward elimination method, based on the removal level α = 5%. Show your steps. g. Find the values of R2 and Cp for the full model and the selected model in (e). Comment on the results. 2. A research laboratory was developing a new compound for the relief of severe cases of hay fever. In an experiment with 36 volunteers, the amounts of the two active ingredients (factor A and B) in the compound were varied at three levels each (1 = low, 2 = medium, 3 = high). Randomizations was used in assigning four volunteers to each of the nine treatments. The data on hours of relief are stored in ‘hayfever.txt ’. Assume that a two-way classification model is appropriate for the above data. a. Compile a two-way ANOVA table to test whether the effects of the two factors are additive or not, using a 5% significance level. b. Test whether or not main effect for each ingredient is present, using a 5% significance level. c. Given your answer to (a), is it meaningful to test for main factor effects? Explain. d. Construct a 95% confidence interval for the pairwise comparison in hours of relief between the low and the medium levels of ingredient A. When setting up the contrast, you may average over the three levels offactor B using equal weights. 3. The staff of a service center for electronic equipment includes three technicians who specialize in repairing three widely used makes of disk drives for desktop computers. It was desired to study the effects of technician (factor A) and make (factor B) on the service time. ‘diskdrive.txt’ stores the data showing the number of minutes required to complete the repair job in a study where each technician was randomly assigned to five jobs on each make of disk drive. a. Formulate a two-way classification model for the above observed data. b. Test at the 5% level whether there are significant interactions between “technician” and“make” c. According to your findings in (b), will it be meaningful to compare the difference among the technician WITHOUT specifying the “make" of the disk drives? d. Calculate the sample mean of the 10 observations for each technician. e. Show that the variance of the difference between the any two sample means considered in (d) is 2σ2/15, where σ2 is the common variance assumed for the number of minutes for each repair job. f. Calculate an estimate of σ based on the two-way classification model specified in (a). g. Derive from (d), (e) and (f) a 95% confidence interval for a contrast in number of minutes for repair jobs between the technicians 1 and 3. 4. For the cell means model, show that the least squares estimators ofthe parameters μi are maximum likelihood estimators for the normal error, Eij~N(0, σ2). 5. For a 1-way ANOVA model show that 6. For a 1-way ANOVA model, show that 7. Consider a regression analysis of Y on X1 – X4 for 25 observations. The SSE for various sub- models are given below. a. Apply simple linear regression model with one regressor at a time. Select regressors whose effects are significant at the 10% level of significance. Report SSR, MSR, MSE, F-value and conclusion. b. Apply multiple regression model using all the selected regressors in (a). Test the significance of the regression coefficients at the 5% level of significance. Report the ANOVA table, F-values and conclusions. c. Determine the subset of variables that is selected by the backward elimination method, based on the removal level F = 4. Show your steps. Report SSR, MSE and F-value at each step. Report the selected regressors. d. Determine the subset of variables that is selected by the forward selection method, based on the entry level F = 4. Show your steps. Report SSR, MSE and F-value at each step. Report the selected regressors. e. Determine the subset of variables that is selected by the stepwise method, based on the entry level F = 4 and removal level F = 3. Show your steps. Report SSR, MSE and F-value at each step. Report the selected regressors. f. Determine the subset of variables that is selected by adjusted R2. Show your steps. Report the fitted final selected model. g. Determine the subset of variables that is selected by Cp. Show your steps. Report the fitted final selected model. h. Determine the subset of variables that is selected by AIC. Show your steps. Report the fitted final selected model. i. Determine the subset of variables that is selected by BIC. Show your steps. Report the fitted final selected model. 8. You are given the following matrices computed for a polynomial regression analysis Y = β0 + β1X + β2X2 +ε . The matrices are properly ordered according to the regression function given above. a. Calculate the LSE of the regression coefficients. b. Construct an ANOVA table and thus test at the 5% level of significance whether there is a regression of Y on X and X2. c. Test at the 5% level of significance whether the quadratic term is necessary. d. Estimate the mean for Y when X = 1.5. Construct a 95% confidence interval for the estimation. 9. You are given the following matrices computed for a regression analysis with interaction Y = β0 + β1X1 + β2X2 + β3X1X2 + ε . The matrices are properly ordered according to the regression function given above. a. Calculate the LSE of the regression coefficients. b. Construct an ANOVA table and thus test at the 5% level of significance whether there is a regression of Y on X1, X2 and the interaction term. c. Construct a 95% confidence interval for each of the regression coefficients. d. Test at the 5% level of significance whether there is an interaction effect. e. Predict the value of Y for an individual whose X1 = 1.5 and X2 = -0.5 Construct a 95% prediction interval for the individual. 10. Seven observations of a dependent variable X and a factor A are given as follows. Consider a one-way classification model. a. Write down a cell-means model for the analysis. b. Estimate the parameters in (a). c. Obtain the fitted values for X. d. Compile the ANOVA table. e. Conduct a size 0.05 test to determine whether or not the means for X for the three levels of A differ. f. Construct a 95% confidence interval for the mean for X for each level of A. g. By the Bonferroni’s method, construct the simultaneous 95% confidence intervals for the pairwise comparisons among the three levels. Comment on the comparison. h. Estimate the difference between the mean average for X of Levels 1 and 2 and the mean of X of Level 3. Constructure a 95% confidence interval and hence, comment on the difference. 11. The following data of X are given for three levels offactor A and 2 levels offactor B. There are two observations for each treatment. a. Calculate and plot the means for X for the six treatments. Does it appear interaction effects between factors A and B? Explain. b. Write down a factor-effects model for the 2-way classification model with interaction. c. Estimate the main effects of factors A and B and the effects of interaction, respectively. d. Compile the ANOVA table. e. Test the treatment effects at the 5% level of significance. State null and alterative hypothesis, decision rule and conclusion. f. Test whether or not main effects for factor A, using a 5% significance level. Write down the null and alterative hypothesis, decision rule and conclusion. g. Given your answer to (e), is it meaningful to test for main factor effects? Explain. h. Construct Bonferroni’s simultaneous 95% confidence intervals for the total six pairwise comparisons among the three levels offactor A among level 1 offactor B and among the three levels offactor A among level 2 offactor B. Comment on the comparisons. i. Assume there is no interaction between the two factors. Compile the ANOVA table. Test whether or not main effects for factor A and B, respectively, using a 5% significance level. 12. This study is to establish the suitable correlation model for describing the relationship between strain and hardness during cold rolling forming process of complex profiles. The hardness and the strain data are stored in ‘material’. a. Consider a simple linear regression model where hardness is the response variable and strain as the independent variable. i. Report the fitted model. ii. Test at the 5% level of significance where strain has an effect on hardness. iii. Report the R2 and thus, comment on the fitness. b. Produce a scatter plot hardness against strain. Is there a linear relationship? c. Consider a 4-th order polynomial regression. i. Report the LSE of the regression coefficients. ii. Test at the 5% level of significance for each of the regression coefficients. iii. Test at the 5% level of significance where the non-linear terms of strain have some effects on hardness or not. State the null and alternative hypothesis, decision rule and conclusion. iv. Estimate the mean of hardness when strain = 0.8. Construct a 95% confidence interval for the estimate. 13. This study aims to verify the additive role of lung CT-Volumetry in testing the efficacy of three widely distributed COVID-19 vaccinations; namely the "Sinopharm", "Oxford-AstraZeneca", and "Pfizer-BioNTech" vaccinations. The CT-Severity scores and the vaccinations used for a number of patients are stored in ‘vaccine.csv’. The variables are given as follows. Consider a one-way classification model. a. Compile the ANOVA table. b. Conduct a size 0.05 test to determine whether or not the mean CT-scores are difference among the four vaccinations. State the null and alternative hypothesis, decision rule and conclusion. c. Calculate the mean CT-score for each vaccination. Construct a 95% confidence interval for each of the means. d. By the Bonferroni’s method, construct the simultaneous 95% confidence intervals for the pairwise comparisons among the four vaccinations. Comment on the comparisons. e. Estimate the difference between the mean CT-score of non-immunized patients and the the average of the mean CT-scores ofthe three vaccinations. Constructure a 95% confidence interval and hence, comment on the difference.
OPERATIONS STRATEGY AND MANAGEMENT NBS-5118B-24 UG Coursework 2024–25 Title: “Operations strategies and management coursework (3,000 words)” This coursework counts for 100% of the assessment in this module. Assessment #1 Answer Q1(a) and Q1(b). Provide at least four relevant journal articles as references in the answers to Questions #1(b)(i) and #1(b)(ii) in addition to referencing your chosen YouTube video: 1. The following two YouTube videos depict manufacturing operations of two products. Select one video and answer the following two questions based on your chosen product’s operations (1000 words). · Frosted cereal manufacturing process: https://www.youtube.com/watch?v=a0Y5J_pgiFY&t=230s · Skin Cream manufacturing process (only focus on body cream) https://www.youtube.com/watch?v=CjL_dQ5HAAg (a). Using the standard shapes, develop a process flow diagram and illustrate the step-by-step transformation process of your chosen product. (25% marks) (b). (i). Recommend two feasible process improvements that could be made to the manufacturing process by investigating two relevant steps of the transformation process. Justify the recommended process improvements with appropriate arguments and analyses. (15% marks) (ii). With appropriate analysis, demonstrate a clear link between the recommendations and relevant ‘Muda’ (i.e. waste categories) and performance objective(s). (10% marks) Assessment #2 Choose any ONE case study and answer all questions. Provide at least four relevant journal articles as references in your answer (2000 words): 2. A leading UK producer currently has a high demand for an essential product ‘X’ globally. They are actively assessing a series of sustainability initiatives in their supply network and have outsourced some of their production activities to Asia. Due to the post-pandemic situation and current cost of living crisis, the company is experiencing many challenges across their production facilities and supply networks. In view of this disruption, they plan to (1) re-design how they manufacture product ‘X’ and (2) reconfigure their supply network based on a number of strategies and principles. Further, the producer believes that quality is the most important single factor affecting performance relative to their competitors. Here, they consider the ‘sand cone’ model, along with total quality management (TQM), as the key elements of their quality management programme. Due to the increasingly high demand for their product, the company ramps up their production in the UK to avoid any disruption. (a) Considering their assessment of sustainability initiatives and the challenges they face due to the post-pandemic situation and current cost of living crisis, outline and explain two strategies that the producer could implement and why. (25% marks) (b) Justify the company’s use of the ‘sand cone’ model, considering the model’s associated performance measures, and use examples to support your arguments. (15% marks) (c) Outline how they might use quality characteristics and TQM principles to meet the needs and expectations of UK customers during the post-pandemic situation and current cost of living crisis and use an example to support your arguments. (10% marks) 3. The UK plants of Company X suffered as a significant number of Company X’s suppliers in China were not able to supply enough parts due to the outbreak of the pandemic. Some of their suppliers based in China remained closed, while others were working at reduced capacity. Due to the pandemic, the organisation’s product mix was also varying significantly. As a result, Company X are assessing its traditional capacity management strategies and its different inventory strategies during this post-pandemic situation and current cost of living crisis. Although the pandemic situation created major disruptions across their supply networks, Company X are certain about future supplies. (a) Considering Company X’s experience and situation, discuss strategies and planning outlooks with appropriate rationale and examples, that they could follow to produce at a capacity that satisfies their customer base. (25% marks) (b) Considering the various types of inventory that exist and their objectives, explain and analyse the actions Company X and their suppliers could take to respond to the major disruptions e.g., having different inventory strategies at its manufacturing facilities and at their suppliers’ base. (15% marks) (c) Analyse and reflect on your understanding of how Company X’s operations strategies could minimise uncertainty in terms of inventory and underutilised resources. (10% marks) General Guidance 1. This is an individual report, and it must be exclusively your own work. 2. The maximum word limit is 3,000 words ±10% allowance. 3. Use Arial, 12pt font, with 1.5 line spacing. 4. A detailed marking scheme, based on the Senate Scale, is available on Blackboard. 5. Please refer to Blackboard’s “Frequently Asked Questions” for more details. 6. Please refer to the extract (provided below) from the Student Handbook and Student Performance Accelerator for more general guidance and information about referencing, citations and penalties for exceeding the word limit. Submission deadline: 3:00 pm, 19 May 2025