CPT405 Interactive Systems 1st SEMESTER 2024/2025 Individual Coursework CPT405 Interactive Systems Individual coursework: Novel Interaction Project Release date [when the moderation is completed] Due date Demonstration: December 13 (Friday) Report, summary, final application, and source code: 11:59PM December 15 (Sunday) Deliverables D1. Demonstration D2. A written report D3. A short summary of the project (abstract, one or two pictures/videos, the final application, as well as a users’ manual for using your interface) to be added to the Project Gallery. D4. Source code Format - A written report, no more than 20 pages (including the reference list). o Font: 12pt Times New Roman o Spacing: Double spacing o Margins: Normal (1 inch margin on all sides) o Reference style. APA - Naming: CPT405_StudentID_StudentName_IndividualCoursework.zip o CPT405_StudentID_StudentName_Report.pdf o CPT405_StudentID_StudentName_Summary (folder) o CPT405_StudentID_StudentName_Sourcecode (folder) Submission Box (link will be given) Mark 70% of the final marks. Total marks available are 100. Learning outcomes assessed A. Demonstrate in-depth knowledge of the current research issues in the development of interactive systems, the capabilities and limitations of users, and effective methodologies for the design of useful and usable human-computer interfaces. B. Demonstrate systematic understanding of the key techniques and methods for interface design, evaluation, and analysis. C. Demonstrate an ability to critically analyse and evaluate real- world interactive systems. D. Undertake requirements analysis as well as to complete the design, development, and evaluation of an interactive system. Coursework specification In this coursework, you need to design, implement, and evaluate an interactive system for presenting and delving into data within a certain area. So far, what you have done – the Group project In the group project, you made an initial plan for the interactive system. You have already: 1. listed motivation, research issues 2. made the physicalization / low fidelity prototypes 3. tested the prototypes with end users What you will do next You need to design, implement, and evaluate an interactive system based on the previous group project. You are highly encouraged to choose a topic that aligns with your interests. Below are some example topics: Example Topics: 1. An interactive system to assist Master's applicants in submitting their applications, allowing the university's Master Admission team to review and manage them effectively. 2. An interactive system for managing calendars and scheduling daily events. 3. An interactive system to help new students navigate the campus. 4. An interactive system for recording and sharing experiences in museums. . Design First, you should consider the design principles and revise the design if necessary. . Implementation You can choose any appropriate IDE and programming language according to the specific case, such as Unity, HTML, JavaScript, WebGL, etc. . Evaluation According to your specific case, you need to: 1. setup study goal and research questions (what you are going to find in the user evaluation) 2. design a user study plan (quantitative or qualitative) 3. decide hypothesis, dependent / independent variables based on the research questions 4. choose participants, apparatus, and tasks 5. conduct the user study 6. collect user performance data 7. analyze the data 8. discuss the conclusion Marking Criteria D1. Demonstration – 30 marks You need to present your work by doing a 10-minute demo. D2: Report (50 marks) Marking criteria Description Marks Introduction introduce the whole interactive system, motivation, the representative users and tasks. 8 Design discuss the design principles, considerations, and heuristics in the design (why they are used), show and discuss how they are applied in the design. 4 Physicalization, Prototypes and walk-through study 1. show screenshots of the physicalization or prototypes and explain them 2. explain how the walk-through evaluation was conducted 3. explain how you used prototypes to make or improve your design, what have been improved 4. explain why prototypes are important / how physicalization helps you to think in this step 6 System show and explain the interactive system (the interface, interaction techniques, etc), how it was implemented. 11 Evaluation present the usability study (goal, participants, apparatus, evaluation methods and procedures), and discuss the results. 17 Results and Discussion conclude what have been done in the interactive system, discuss what can be improved in future 4 D3: Summary (10 marks) A short summary of the project (abstract, one or two pictures/videos, the final application, as well as a users’ manual for using your interface) to be added to the Project Gallery. D4: Source code (10 marks) You will hand in the source code, as well as the instructions for compiling the program.
ELEE 8240 Fall 2024 Laboratory 9: External Libraries (Due 11/4/2024) In this lab we will compile a library and use 3 functions to process a png image to detect the edges. 1. Create a vi that opens a png image file using the read png vi. The extract the byte data using the uncluster by name tool. Find a png image (online, on your phone, etc.) that you can use to test your code. a. For fun, figure out how to display the color image using the picture vi or the Intensity Graph. 2. In Visual Studio, create a c++ dll. To create the project you can choose the console, windows, and library options. Place the code in the attached .cpp and .h files into the correct files in the project and compile the project. 3. If your png file is an 8-bit RGB file there should be 3 bytes per pixel. (Some png files have an additional byte for transparency. Make sure to choose a file with 3 bytes per pixel.) The Function in the dll, png_to_array() will sum the colors for each pixel and put the data into a two-dimensional array, creating a grayscale version of the image. Display the grayscale version of the vi using the Intensity Graph. Manipulate your image so that it appears upright. 4. Use the Sobelx() and Sobely() functions in the dll to create the x and y gradients. 5. The edges of an image g can be detected by creating the image |▽g|. Create this image and display it in a separate Intensity Graph. a. If you have previous c++ experience and/or are feeling cocky, you can try adding your own image processing function to the dll. For example a Laplacian filter replaces every pixel with the weighted sum of adjacent pixels, A smoothing filter might use 6. Upload the vi and dll (just the .dll) file to ELC.
ECON30008 Topics in Applied Economics B (Coursework 2) Choose one out of the following three assignments to submit. The essay should include at least two graphs or tables. Tables should be reproduced, and graphs should be screenshots of the original paper. 1- Discuss the respective influences of economic factors and social norms on gender roles within the family. 2- Compare fertility drivers between Sweden and Japan. 3- Can policy alter households’ fertility and labour supply choices? Discuss. Penalties for late work Assignments handed in after the deadline, without a pre-arranged extension will be subject to the following penalty: • A fixed absolute penalty of 10 marks is applied for each 24-hour period work is submitted after the agreed deadline. Please note, weekend days count towards the calculation of late penalties. Public holidays in England, and University closure days do not. • A mark of zero is automatically applied to work submitted late such that at least four such 24-hour periods have elapsed. Penalties for work over the maximum word count You are expected to include a word-count on the first page of the assignment. Footnotes should be avoided. • Direct quotations will count towards the word-count • Reference lists/bibliographies will not count within the word-count • Coversheets will not count within the word counts • Tables and figures (i.e. diagrams) will not count within the word counts. If you are found to have put an inaccurate word-count on your submission, a penalty of 5 marks may be imposed, over and above the penalties below: Assessment exceeds word limit by up to (percentage of maximum) Penalty deducted from intellectual mark 5% 5 marks 10% 10 marks 15% 15 marks 20% 20 marks 25% 30 marks More than 25% Mark of zero applied For example, for a 2,000 word assignment, if a student handed in a piece of work consisting of 2,050 words, your mark would be reduced by 5 marks. This is because the piece of work is between 0% and 5% over the maximum limit.
MATH2040/6131 Financial Mathematics Assignment 2024/25 This Assignment counts as 20% of your overall mark for this module. Completed work should be submitted on Blackboard before 23:59 on Monday 16 December 2024. This deadline is strict and the standard University penalty for late submission of work will apply. To submit your work, go to the Assignments tab in the MATH2040 Blackboard page, where you will find an assignment called Coursework submission 2024/25. [This applies to MATH2040 and MATH6131 students.] Please submit the following two files: 1. A report in a file named report-ID.pdf, where ID is your student ID number; 2. An Excel spreadsheet in a file named spreadsheet-ID.xls, where ID is your student ID number. Note that all your results, explanations, and discussion must be presented in your report, so that it is coherent and self-contained, and all calculations and simulations must be done in your Excel spreadsheet, without use of Macros/VBA. Therefore please avoid using expressions such as “Please see the spreadsheet” in the report. The strict page limit of the report is 4 A4 pages, and a font size of no smaller than 11pt should be used. The report should be written in a coherent manner, with careful explanation, and should be well presented. The spreadsheet should be clearly set out, with the calculations and simulations relating to different parts of the questions clearly identified. 1. A local government authority is considering how to finance a project to build a road bridge that will connect a large Scottish island to the mainland. It is expected that construction of the bridge will take two years, at a cost of £5 million per year, payable quarterly in advance. Once constructed, the bridge will incur operating and maintenance costs totalling £0.75 million per year, payable continuously, and will generate revenue from atoll (charge) of £T per vehicle for each single crossing of the bridge. It is estimated that there will be 1.5 million single crossings of the bridge in each year of operation, uniformly distributed during the year. The toll is expected to be reduced to £U after the first ten years of operation of the bridge, a level that will generate revenue equal to twice the continuing operating and maintenance costs each year. (a) One possible method of financing the project is to borrow the construction costs from a bank. The bank will charge interest at a rate of 4% per annum effective and will allow full or partial repayment of the loan at any time. (i) Obtain the present value of the construction costs at the start of the project, using the bank borrowing rate. [4] (ii) Find the value of T such that the discounted payback period (DPP) of the project is twelve years. [5] (iii) Obtain the value of U. [1] (iv) Obtain the present value of the profit (revenue less costs) at the start of the project, using the bank borrowing rate, assuming that the DPP is indeed twelve years and that the term of the project is infinite. [5] (b) An alternative method of financing the project has been proposed: form a special purpose company to issue ten million ordinary shares, each of price £P, to raise capital equal to the present value of the construction costs in part (a)(i). Dividends on these shares are expected to be paid annually in arrear and to grow at a compound annual rate of 2% in perpetuity. (i) Obtain the value of P. [2] (ii) If shareholders are to achieve an expected annual yield of 8% per annum effective, obtain the amount of the first dividend per share. [3] (c) The above model for the project, and the suggested methods of financing, involve various assump- tions, expectations, and limitations. Identify, discuss, and investigate these, using a spreadsheet to explore the impact of changing these aspects in order to make the model and financing more realistic, and take note of the corresponding risks. [30] [Total 50] Note: Parts (a) and (b) of this question are based on Q5 of the 2021/22 final exam. For part (c), think about how the stated assumptions or expectations may change, think about what is missing and may be included, and think about how appropriate the suggested financing methods may be. 2. An equity investment fund manager models the future performance of the fund, as follows: in each year, t, the corresponding annual effective yield, it, is independent of that in any other year, and is such that the corresponding accumulation factor, 1 + it, is lognormally distributed, with (constant) parameters µ and σ2 , so that log(1 + it) ~ N(µ,σ2 ). The mean and variance of it are j = 0.10 and s2 = (0.08)2 , respectively. [Here, log means the natural logarithm.] The fund offers investors a choice of two five-year investment products, with the following cashflows: • A single investment of £1 million made at the start of the five-year period. The accumulated value of this single investment, X, is returned to the investor at the end of the five-year period. • An annual investment of £1 million made at the start of each of the five years. The accumulated value of this total investment, Y , is returned to the investor at the end of the five-year period. (a) Calculate the mean and standard deviation of X . [2] (b) Calculate the mean and standard deviation of Y. [4] (c) Calculate the values of µ and σ 2 . [2] (d) Calculate the probability that X will be (i) less than £1.5 million, and (ii) more than £2 million. [8] (e) Using simulation, estimate the probability that X will be (i) less than £1.5 million, and (ii) more than £2 million. Also, give 95% confidence limits for these probabilities. [Use 10,000 simulations of X, and use the confidence interval for a proportion.] Compare with your exact results obtained in part (d). [12] (f) Using simulation, estimate the probability that Y will be (i) less than £6 million, and (ii) more than £8 million. Also, give 95% confidence limits for these probabilities. [Use 10,000 simulations of Y , and use the confidence interval for a proportion.] Explain why, unlike in part (d) for X , these probabilities cannot be calculated exactly, but must be estimated by using simulation. [12] (g) In return for payment of an initial fee by any investor who chooses the annual investment product, the fund offers a guarantee that the value of the investment returned to the investor at the end of the five-year period will be at least equal to the value of the annual investments of £1 million accumulated at the (constant) effective annual risk-free interest rate of 2%. Using simulation, estimate the fair value of this fee. [Use 10,000 simulations of Y.] [5] (h) Discuss your results. [5] [Total 50] Note: For parts (a) and (b), see the statements of Theorems 10.1 and 10.2 of the lecture notes (not the corresponding proofs). For parts (c) and (d), see Examples 10.2 and 10.3 of the lecture notes. For the confidence intervals in parts (e) and (f), you may find Example 12.4.4 of Garrett useful. For the simulations in parts (e), (f), and (g) you may wish to use the Excel Data Analysis add-in. Use a fixed seed for your simulations, and state the seed you used, so that the random numbers generated are reproducible.
ECON 425: INTERNATIONAL TRADE THEORY AND POLICY ASSIGNMENT FOUR Fall 2024 DUE TUESDAY, NOVEMBER 26, 2024, 11:59pm COMPLETED ASSIGNMENTS MUST BE SUBMITTED THROUGH THE ASSIGNMENTS TAB ON THE COURSE WEBSITE. PLEASE SUBMIT YOUR ASSIGNMENT IN A PDF FILE. Justify your answers for full credit. Question One Consider a Heckscher-Ohlin-Samuelson model of trade with two large countries: Home (H) and Foreign (F); two goods: electronics (E) and textiles (T) and two factors of production: high- skilled labour (S) and low-skilled labour (L). Country F is relatively abundant in low-skilled labour. Textile production uses low-skilled labour relatively intensively. Let VE denote the ratio of low-skilled labour to high-skilled labour in electronics; VT denote the ratio of low-skilled labour to high-skilled labour in textiles; pE denote the price of electronics; pT denote the price of textiles; wS denote the high-skilled labour wage; and wL denote the low-skilled labour wage. (1.A.) (15 points) For this economy we can use the analog of the relative labour (to capital) demand and supply diagrams we used in class which here would be relative low-skilled labour (to high-skilled labour) demand and supply diagrams. Use this type of diagram to demonstrate that this model is capable of predicting that moving from autarky to trade will increase the skill wage gap (wS /wL ) and, therefore, increase inequality, in some countries but will decrease the skill wage gap and, therefore, decrease inequality, in other countries. Provide economic intuition to explain why the skill wage gap increases in one of the countries. (1.B.) (15 points) Suppose that large Country H imposes a unilateral ad-valorem tariff on its imports and fully distributes the tariff revenue to households in Country H. Assume that we have the “normal case” with regard to the effects of the tariff on goods’ price ratios. Assume that the imposition of the tariff has the same qualitative impact on aggregate welfare in Country H as it would if Country H were small. Draw a single PPF diagram for Country H which depicts the equilibrium output point, the equilibrium aggregate consumption point, and the aggregate indifference curve for three different scenarios: (i.) autarky, (ii.) free trade, and (iii.) tariff restricted trade. In your diagram, put electronics on the horizontal axis and textiles on the vertical axis. Question Two This question concerns the monopolistic competition model of trade with increasing returns to scale that we have studied. The question is partially designed to help students better understand the importance of increasing returns in production (through fixed costs) in affecting equilibrium variables and the gains from trade. There are 3 identical large countries. In each country there is a single industry which produces different varieties of a good. The varieties are indexed by j and the total number of varieties produced in each country is denoted by N which is endogenous. Note that N does not need to be an integer. It is the same industry in all countries. Each country has 490 households. All households have the same utility function is given by: where dj is consumption of variety j and Nc is the number of varieties available to a household. Each household has one unit of labour to supply and labour in the only factor of production The production technology is the same for every variety in every country and is given by: where Qj is output of variety j , ℓj is labour input into the production of variety j, and α > 0 is the fixed cost parameter. There is free entry into production and every variety is produced by only one firm. We know that equilibria will be characterized by symmetry across varieties so henceforth, we drop the j subscript. (2.A.) (25 points) Complete Table 1 for the different autarky and trading scenarios and for the different values of α indicated in the table. (2.B.) (15 points) For this question, use the results in Columns 1 and 2 of Table 1. Explain Table 1: Monopolistic Competition Model: Autarky and Trade how an increase in the fixed costs of production qualitatively affects d, Q, and Household Level Utility in autarky. Provide economic intuition for your findings. (2.C.) (15 points) For this question, assume that α = 4 and use the results in Columns 1 and 3 of Table 1. Explain how your results demonstrate that there is a scale effect, an exit effect, and a pro-competitive effect of trade. Let us define a measure of the gains from trade as the percentage difference in a household’s utility between autarky and trade: (2.D.) (15 points) For this question, use the results from the last row of all of the columns of Table 1. Calculate the GFT in a country when α = 4 and when α = 16. Provide economic intuition to explain why the gains from trade are higher in one case than in the other.
Coursework 3 This is Coursework 3, which accounts for 30% of the final grade. This task is an individual assignment where students must submit a Java project, along with a report explaining their code and coding logic. In this assignment, the code is worth 70 marks, and the report is worth 30 marks. INSTRUCTIONS TO STUDENTS 1. This is coursework 3. Please complete the assessment independently and honestly. 2. This is the final coursework component of the course this semester. This coursework will contribute 30% to your final grade for this module. 3. You will use object-oriented techniques, file processing, data types and structures you have learned throughout the semester to solve problems. 4. This coursework consists of 1 section. The section is worth 100 marks. The section consists of 5 sub-questions. Each question is worth 20 marks. Answer all questions. There is NO penalty for providing a wrong answer. 5. The total marks available are 100. In this assignment, the code is worth 70 marks, and the report is worth 30 marks. 6. Submission requirements: a. You should only submit one zip-folder with your Java project code. Only English solutions and comments are accepted. Answers need to be zipped as a java project. b. Please name your Java project code in ONE zip folder as ‘Coursework3_YourID.’ c. You also need to submit a report in PDF format that explains the task, how you understood the question, and why you believe your solution is the best approach. 7. Submission due is xxx.xxx..2024, 23:59 pm Beijing Time. You submit your answers to the LMO in one zip file with your name and student ID. If there are any significant problems preventing you from offering your answers in time, please do not hesitate to email the Module Leader ([email protected]). The student has 5 working days to complete this task individually. Late submission will impose a penalty. 5% of the total marks available for the assessment should be deducted from the assessment mark for each working day (or part thereof) after the submission date, up to a maximum of five working days (e.g., for work marked out of 100, five makrs per day will be deducted; for work marked out of 20, one mark per day will be deducted). Late submission of less than one working day will be counted as one working day. Work received more than five working days after the submission deadline will receive a mark of zero. The next pages are the task sheets. Matrix Operations (100 marks account 70% of the CW3 grade) This year, you are required to complete a class that implements matrix operations. The tasks involve creating a Matrix class with various methods to handle operations such as addition, subtraction, multiplication, transposition, and determinant calculation. Please download the provided code template from the Learning Mall before starting the assignment. The template will give you a structured starting point for your implementation. Once you have completed writing your code, paste the code for each method into the respective submission boxes on the Learning Mall. The following is a detailed description of the task. Important Note: Pay close attention to edge cases and ensure that your methods handle invalid inputs gracefully. Failure to do so will result in significant point deductions. Task 1: Matrix Class Implementation (10 marks) Implement the constructor for the class Matrix that will handle basic matrix operations. l A constructor public Matrix(double[][] data) to initialize the matrix. If the input data is null or not a proper 2D array (rows with different lengths), throw an IllegalArgumentException. Task 2: Accessor Method (10 marks) Implement a method to retrieve the matrix data: l public double[][] getData(): This method should return a deep copy of the data field to prevent external modification. Task 3: Matrix Addition (15 marks) Implement a method to add two matrices: l public Matrix add(Matrix other): This method should add the corresponding elements of the matrices and return a new Matrix object with the result. If the matrices are not of the same size, throw an IllegalArgumentException. Task 4: Matrix Subtraction (15 marks) Implement a method to subtract another matrix from the current matrix: l public Matrix subtract(Matrix other): This method should subtract the corresponding elements of the other matrix from the current matrix and return a new Matrix object with the result. If the matrices are not of the same size, throw an IllegalArgumentException. Task 5: Matrix Multiplication (20 marks) Implement a method to multiply the current matrix with another matrix: l public Matrix multiply(Matrix other): This method should perform. matrix multiplication and return a new Matrix object with the result. If the number of columns in the current matrix does not match the number of rows in the other matrix, throw an IllegalArgumentException. Task 6: Matrix Transposition (10 marks) Implement a method to transpose the current matrix: l public Matrix transpose(): This method should return a new Matrix object with the transposed matrix. Task 7: Matrix Determinant (20 marks) Implement a method to calculate the determinant of the matrix: l public double determinant(): This method should return the determinant of the matrix. For non-square matrices, throw an IllegalArgumentException. Implement determinant calculation for 2x2 and 3x3 matrices. For matrices larger than 3x3, return Double.NaN. Example Usage and Output This section does not need to be submitted. public static void main(String[] args) { double[][] data1 = {{1, 2}, {3, 4}}; double[][] data2 = {{5, 6}, {7, 8}}; Matrix matrix1 = new Matrix(data1); Matrix matrix2 = new Matrix(data2); Matrix sum = matrix1.add(matrix2); Matrix difference = matrix1.subtract(matrix2); Matrix product = matrix1.multiply(matrix2); Matrix transpose = matrix1.transpose(); double determinant = matrix1.determinant(); // Print results System.out.println("Sum:"); printMatrix(sum.getData()); System.out.println("Difference:"); printMatrix(difference.getData()); System.out.println("Product:"); printMatrix(product.getData()); System.out.println("Transpose:"); printMatrix(transpose.getData()); System.out.println("Determinant:"); System.out.println(determinant); } private static void printMatrix(double[][] matrix) { for (double[] row : matrix) { for (double val : row) { System.out.print(val + " "); } System.out.println(); } } The output should be: Sum: 6.0 8.0 10.0 12.0 Difference: -4.0 -4.0 -4.0 -4.0 Product: 19.0 22.0 43.0 50.0 Transpose: 1.0 3.0 2.0 4.0 Determinant: -2.0 Report (100 marks account 30% of the CW3 grade) In this report, you should document your understanding of the task and provide a justification for your solution. You should also explain why you believe your code structure is well-designed and clear. Additionally, you need to test edge cases and provide a technically sound report on how your code handles these cases.. The marking is distrubuted as follows: l Understanding of the Task: 30 marks l Justification of Solution: 30 marks l Clarity and Structure: 20 marks l Handling of Edge Cases: 10 marks l Technical Accuracy: 10 marks Below is the marking details of report: Criteria Excellent (90-100 marks) Good (75-89 marks) Satisfactory (60-74 marks) Needs Improvement (40-59 marks) Poor (0-39 marks) Understanding of the Task (30 marks) Demonstrates a deep and comprehensive understanding of the task; accurately identifies all key requirements and constraints. Demonstrates a good understanding of the task; identifies most key requirements and constraints. Demonstrates a basic understanding of the task; identifies some key requirements and constraints, but with minor misunderstandings or omissions. Demonstrates a limited understanding of the task; identifies few key requirements and constraints with significant misunderstandings or omissions. Shows little to no understanding of the task; fails to identify key requirements and constraints. Justification of Solution (30 marks) Provides a well-reasoned and convincing argument for why the solution is optimal, considering multiple factors such as efficiency, scalability, and edge case handling. Provides a solid argument for the solution, considering important factors like efficiency and scalability, though some reasoning may be less developed. Provides a basic argument for the solution, with some consideration of factors like efficiency, but lacks depth or fails to address key aspects. Provides a weak or unconvincing argument for the solution, with little consideration of important factors or only superficial reasoning. Provides no clear justification for the solution, or the justification is irrelevant or flawed. Clarity and Structure (20 marks) Report is well-organized, with clear, logical progression; explanations are concise, precise, and easy to follow. Report is well-organized, with minor lapses in clarity or structure; explanations are generally clear, but may occasionally be wordy or unclear. Report is somewhat organized but may have several unclear sections or lack of logical flow; explanations are adequate but may be verbose or confusing. Report is poorly organized, with significant lapses in clarity or structure; explanations are often unclear or confusing. Report is disorganized, with little to no clear structure; explanations are unclear, incomplete, or difficult to follow. Handling of Edge Cases (10 marks) Thoroughly addresses all potential edge cases, with clear and correct reasoning for how they are handled in the code. Addresses most edge cases, with generally correct reasoning for how they are handled, though some cases may be overlooked or inadequately explained. Addresses some edge cases, but may overlook important ones or provide insufficient explanations for how they are handled in the code. Addresses few edge cases, with minimal or flawed reasoning for how they are handled in the code. Fails to address edge cases or provides incorrect or incomplete explanations. Technical Accuracy (10 marks) The technical explanation is accurate and demonstrates a strong understanding of matrix operations, including correct terminology and implementation details. The technical explanation is mostly accurate, with minor errors or omissions; demonstrates a good understanding of matrix operations, though some details may be slightly off. The technical explanation has some inaccuracies or misunderstandings; demonstrates a basic understanding of matrix operations, but may misuse terminology or overlook important details. The technical explanation has significant inaccuracies or misunderstandings; demonstrates limited understanding of matrix operations and often misuses terminology or omits important details. The technical explanation is largely inaccurate, with frequent misunderstandings and misuse of terminology; shows little to no understanding of matrix operations.
INTERNATIONAL A-LEVEL CHEMISTRY (9620) Unit 4: Organic 2 and Physical 2 This question is about three isomers of C4H8O Give the IUPAC name for isomer B and for isomer C. [2 marks] B C Isomers A and B both react with KCN followed by dilute acid. Name the mechanism for this reaction. Draw the two enantiomers formed by isomer A in this reaction and show how the two enantiomers are related to each other. [3 marks] Mechanism Enantiomer 1 Enantiomer 2 Describe a test-tube reaction to distinguish isomer C from isomer A. State the observations. [2 marks] Test Observation(s) with isomer A Observation(s) with isomer C Aspirin can be produced by the acylation of 2-hydroxybenzoic acid (salicylic acid), as shown in Figure 1. In this reaction, ethanoyl chloride is a powerful acylating agent. Figure 1 In the industrial manufacture of aspirin, ethanoic anhydride is used instead of ethanoyl chloride as the acylating agent. Give two reasons why ethanoic anhydride is used instead of ethanoyl chloride. [2 marks] Reason 1 Reason 2 In the laboratory, the aspirin produced is impure. It is purified by recrystallisation using water as the solvent. Complete the steps carried out in a recrystallisation practical. [3 marks] Step 1 Step 2 Filter whilst hot Step 3 Step 4 Vacuum filter Step 5 Step 6 Dry in a desiccator Outline how you could confirm that a sample of aspirin is pure. [2 marks] Ethanoyl chloride reacts with amines to produce amides. Name and outline the mechanism for the reaction between ethanoyl chloride and methylamine. [5 marks] Name of mechanism Amines can be prepared from different compounds. Propylamine (CH3CH2CH2NH2) can be prepared in two different one-step reactions. For each reaction, identify: • the organic starting material, and • the reagent and condition(s). [4 marks] Reaction 1 Organic starting material Reagent and condition(s) Reaction 2 Organic starting material Reagent and condition(s) Gas chromatography (GC) was used to separate a mixture of five compounds, D, E, F, G and H. Table 1 shows the names and formulae of these compounds. Table 1 Figure 2 shows the output from the detector in this separation. Figure 2 State the meaning of the term retention time. [1 mark] Two of the compounds are present in the mixture in equal amounts. Explain how Figure 2 shows this. [1 mark] Give a reason why nitrogen is used rather than oxygen as the carrier gas. [1 mark] Polyethane-1,2-diol (PEG) is a liquid and is part of the stationary phase. Identify what else is needed to complete the stationary phase. Tick () one box. [1 mark] Aluminium oxide Argon Carbon dioxide Epoxyethane Polyethane-1,2-diol (PEG) can be represented as H – [O – CH2 – CH2]n – O – H Explain why PEG is polar. [2 marks] Deduce the compound in the mixture with retention time 4.9 minutes. Give a reason for your choice. [2 marks] Compound Reason Some modifications to the GC apparatus were considered to improve the separation of the same mixture of components. Predict the effect, if any, of each modification on the retention times of the components. [3 marks] Increasing the column temperature Decreasing the column length Decreasing the carrier gas flow rate Clothes are often made from polyesters such as Terylene. Two repeating units of the polymer Terylene are shown. Draw the skeletal formulas of the two monomers that react to form. Terylene. [2 marks] Monomer 1 Monomer 2 Explain why Terylene is biodegradable but polychloroethene is not. [3 marks] Proteins are chains of amino acids linked together. The structure of a tripeptide is Draw a circle around one peptide link on the diagram. [1 mark] Draw the displayed formula of the zwitterion formed by the amino acid which makes up the central section of the tripeptide in Question 04.3. [1 mark] Name the type of structure where protein chains form. α-helixes and β-pleated sheets. [1 mark] Name the interactions that hold protein chains in a β-pleated sheet. Explain how these interactions are formed. [3 marks] Cisplatin is used as an anticancer drug. Cisplatin bonds with DNA by ligand replacement. Figure 3 shows part of a DNA strand. Complete Figure 3 to show the complex formed when one molecule of cisplatin binds with the part of DNA shown. [1 mark] Figure 3 State how cisplatin affects cancer cells. [2 marks] The molecule cyclohexa-1,3,5-triene does not exist and is described as theoretical. State and explain the stability of benzene compared with the theoretical cyclohexa-1,3,5-triene. Use the following data. [4 marks] Benzene can be converted into phenylamine by a two-step synthesis as shown. The mechanism of Reaction 1 involves attack by an electrophile. Give the reagents used to produce the electrophile needed in Reaction 1. [2 marks] The percentage yield of the two-step synthesis where benzene is converted into phenylamine was found to be 68%. State the two measurements that need to be recorded to calculate the percentage yield. [2 marks] Measurement 1 Measurement 2 Explain why phenylamine is a weaker base than hexylamine. [2 marks]
Econometrics assignment -ASB3707 2. The word limit for this assignment is 2000 which does not include referencing, tables, figures and equations. Where an assignment exceeds the stated word limit, the following rules will apply: a. Award a mark that reflects deficiencies in the work as submitted, that is in line with explicit marking criteria and is proportionate to the extent to which the word limit is exceeded or b. The work will not be marked above the word limit. 6. This assignment contributes to 40% of the overall module grade. 7. Before submitting your assignment, please ensure that it is properly referenced, to guard against accusations of malpractice. Guidance on referencing can be found by clicking on the link below and choosing “Harvard Referencing Guide” http://www.bangor.ac.uk/library/help/guides.php.en 8. The pdf has to be entitled with the Student ID number of each student of the group. The front/first page of the assignment has to highlight the name and ID of the student. 9. The data provided on the blackboard. Students need to reply the questions demanded in their report depending on the number of group is even or odd ( Like Group 1 is odd) Additional information on avoiding allegations of malpractice can be found in the Student Handbook. The copying of material extends to the use of essay mills and AI technology such as ChatGPT. You are reminded that the use of such services to generate work in substitute of your own original contributions contravenes Bangor’s Academic Integrity policy. Finally, you cannot submit the assignment by yourself if you are assigned with group there is penalty of 50%. To the end, each leader has to submit it with the name of the Group. Like group 1, 2 etc. You are expected to write the report (aim for 2000 words +-10%) to read, look and feel like a FT article (20% of the marks). The do-file of STATA has to be in the appendix of the report. Groups that numbered with odd number, they are focusing on developing countries. The number of groups with even number are focusing on developed countries. For instance Group 1 is focusing on developing countries. ( To help: (https://datahelpdesk.worldbank.org/knowledgebase/articles/906519). The variables are taken from https://www.rug.nl/ggdc/productivity/pwt/?lang=en. The report has to answer the following questions and data provided in Blackboard: The Solow model predicts that growth rates depend on the starting level of GDP, the population In the following equation that: growthi = α + β1popi + εi Obtain estimates of the OLS estimators α and β for the regression only for the developed (developing) countries if your ID number is odd (even) for the year 2010. The growth rate is calculated as the average growth rate of real GDP ratio between 1970- 2015. All variables are in natural logs. See the variables definition below. 2) Add the variable investment and the GDP per capita of the year 1970 in your model and estimate it again. Comment on the sign and significance of all the coefficient estimates. Outline the economic intuition underlying your results. Are they consistent with empirical literature? Explain. 3) For each of the following questions formulate a null hypothesis and test your equation: . • population is the only determinant of growth • The relationship between the investment and economic growth is equal to 0.3 • GDP in 1970 and population have the same effect on economic growth. 4) After investigating the related empirical literature, add an extra variable from the dataset that you have not used in your model. What are the estimates? Are they line in it? 5) Test for Heteroskedastisity. If it is present, correct it. 6) Divide the countries of your sample in regions/continents. Estimate your model adding the continents’ variable in the model. Do you find any differences? Explain. 7) Interact the continent dummies with the variable investment. Comment and Interpret the coefficients. 8) Discuss whether endogeneity issues are present. If yes, how you can solve them, discuss using the existing literature. 9) Run your model including all the years from 1970 to 2019. Illustrate and discuss the model and the suitable estimation method you used. Do you find any different estimates from the question (2)? Explain. 10) Generate a dummy for capturing COVID-19 for the period 1970-2022. Then run regressions with Pooled OLS, Fixed effects model and random effect model. Discuss the results and which is the most appropriate model? variable name ------------------------------------------------------------------------------- countrycode 3-letter ISO country code country Country name year Year emp Number of persons engaged (imillions) hc Human capital index, see note hc ccon Real consumption of households and government, at current PPPs (in mil. 2017US$) cgdpe Expenditure-side real GDP at current PPPs (in mil. 2017US$) cn Capital stock at current PPPs (in mil. 2017US$) rgdpna Real GDP at constant national prices (in mil. 2017US$) labsh Share of labour compensation in GDP at current national prices csh_c Share of household consumption current PPPs csh_i Share of gross capital formation at current PPPs csh_g Share of government consumption at current PPPs csh_m Share of merchandise imports at current PPPs isocode POP Population (in thousands), unit:thousands XRAT Exchange Rate to US$,unit national currency units per US dollar GDP PPP Converted GDP Per Capita method, at current prices (in I$), unit: Inter consumption_share Consumption Share of PPP Converted GDP Per Capita at current prices [cgdp], (%), Government_co~o Government Consumption Share of PPP Converted GDP Per Capita at current prices [ openc Openness at Current Prices (%), unit: % investment Investment Share of PPP Converted GDP Per Capita at 2005 constant prices [rgdpl] logGDP Logarithm of GDP growth growth rate 1970-2020 logpop Logarithm population popgrowth population growth popgrowth1970 average population logGDP1970 logarithm GDP 1970
Spring 2024 ECE 303: Real-Time Digital Signal Processing Lab Lab Attendance: Required. Lab Time: Lab 001: T/R: 1:00-2:15 PM; Lab 002: M/W/F: 12:05-12:55PM (1) This is when the lab is guaranteed to be open with either Mark, Mingcong, or Yu there to assist with the assignments. The weekly workload is expected to be about 2.5 hours of work. (2) The introduction to each lab will be given every Monday/Tuesday. Organization: Every two students in each group. Prerequisites: ECE 203 or ECE 330. Experience with MATLAB and C. Software: MATLAB, Code Composer Studio (CCS), WinDSK8 Hardware: DSP kit : DSP board *1 (OMAP-138LCDK), Power cable *1, USB cable *1, J-TAG emulator *1, 3.5mm audio cable *1 Instructor: Mark Allie, 1538 Engineering Hall, Email: [email protected], Phone: 265-9007 Teaching Assistants: (1) Mingcong Cao, Email: [email protected] (2) Yu Huang, Email: [email protected] Text: Real-Time Digital Signal Processing from MATLAB® to C with the TMS320C6x DSPs, Second Edition ISBN: 978-1439883037. Each group of two students should have at least one copy of the textbook. Course Website: https://canvas.wisc.edu/courses/425185 The videos linked on the course website are background information on the assignments that may help you complete them. Goals: This course focuses on implementing Digital Signal Processing ideas and techniques on real-time hardware. At the end of the course, it is expected that you will be able to implement signal-processing tasks on real-time hardware. Grading: All based on Weekly Assignments and a Final Project, No Midterm/Final exams Weekly assignments: 10% for each one, totally 80%. Final Project: 20% Weekly Assignments: Each week has an associated programming assignment. Each assignment is due by 11:59pm Friday the following week. Assignments will be graded based on the correctness of output and the clarity of your code. Most of the assignments are available at the start of the semester and if you are ambitious, you could have all of the work for the class done early in the semester. Final Project: TBD
Course: AD 678 Financial Regulation and Ethics (Section A5) Semester: Fall 2024 Table of Contents 1. Course Overview 2. Instructor 3. Text & Materials 4. Learning Goals and Objectives 5. Course Expectations 6. Current Event Research Paper 7. Group Project 8. Exams 9. Course Grading 10. Class Schedule: Lecture Topics 11. Requirements, Policies and Standards 12. Academic Conduct Policy 1. Course Overview . AD678 is a comprehensive inancial regulation course. · We focus on the key federal statutes that regulate securities and participants in the securities markets. These include o The Securities Act of 1933, o The Securities Exchange Act of 1934, o Sarbanes-Oxley Act of 2002, o The Dodd-Frank Act of 2010, o The Foreign Corrupt Practices Act, and 。Several criminal statutes applicable to securities fraud and related offenses. · We will read statutes and case law and use examples to understand the practical application of the law in real life. . Federal law governs the issuance of securities (“going public”), regulates companies whose shares are being traded (known as “ issuers”), and makes rules for everyone working in the securities industry, including investment bankers, brokers, dealers, and investment advisors. · Issuers and investment irms (and their employees or directors) who violate federal securities laws and regulations face civil litigation from shareholders, enforcement actions by the Securities and Exchange Commission, and criminal prosecution by the U.S. Department of Justice. · After successfully completing the course requirements, students should be familiar with the complex system laws, government agencies, self-regulatory organizations (“SROs”) and courts governing the securities industry to “protect investors, maintain fair, orderly, and eficient markets, and facilitate capital formation.” http://www.sec.gov/about/whatwedo.shtml · Students should also have a basic understanding of the separate system of federal laws and regulations governing the commercial banking and insurance sectors of the U.S. inancial services industry. A schedule of reading assignments and assigned problems is given in the course schedule. Students are expected to prepare for the lectures as well as to do reading and research on their own. The objective of the lectures will be to guide and clarify student learning. Students are expected to read the required chapters and other assigned readings and come to class prepared to participate in a group learning experience. Class attendance is mandatory. · There are two exams in this course. The irst exam will cover the readings, lectures, and assigned case studies within the irst half of the course. The second exam will focus on the material from the second half of the course. Reviewing notes of classroom lectures and discussions and reading the key statutes regulating the securities industry, and the case law that interprets these statutes will be of paramount importance for preparing for the exams. · In class we will discuss cases, identify issues, analyze and discuss questions, using current events and news stories as well as hypothetical examples to better understand the application of securities regulations in the real world. Students need to come to class prepared to ask questions and offer their viewpoints on the assigned readings and case studies. 2. Instructor . Course Instructor: Prof. Christopher Athaide · Contact Information: [email protected] · Classroom: 100 Cummington Mall, SOC B57 · Office Location: 1010 Commonwealth Ave, Room 426 . Office Hours: Wednesday 12 noon – 2:00 pm and by appointment. 3. Text & Materials 1. Required Text, Course material, and Case studies: 。 Palmiter, Alan, Securities Regulation: Examples and Explanations, 8th ed. ISBN-13: 978-1454833925, ISBN-10: 1454833920 The SEC website https://www.sec.gov/ is a useful source of information. 2. Optional Readings: The Wall Street Journal: http://www.wsj.com/ 3. Blackboard Site: You will need a BU Id to logon. http://learn.bu.edu 4. Learning Goals and Objectives · Understand the role of the Securities and Exchange Commission in regulating securities markets and their participants . Understand how federal securities laws and regulations protect investors in the issuance of securities through disclosures by issuers · Understand how issuers are regulated by the federal government, including through anti-fraud provisions, disclosure requirements, corporate governance regulations, and anti-bribery laws · Understand how securities laws and regulations apply to the accountants, lawyers, and bankers for securities issuers . Learn what constitutes insider trading · Consider the line between what is legal and what is ethical in the securities industry · Be introduced to the regulations that govern those who work in the securities industry, including brokers, dealers, and investment advisors . Understand how federal law criminalizes bad behavior in the securities industry · Be acquainted with the separate structure of federal laws and regulations governing the commercial banking and insurance sectors 5. Course Expectations 1. The course will be conducted through a sequence of weekly classroom lectures. A learning partnership and the development of a class community are essential to a meaningful experience in this course. Students learn from students. As a member of the class learning community, each student is responsible for contributing to the educational experience of the entire class. The class participation grade will reflect the quality and quantity of contributions to class discussions and teams as well as other voluntary activities inside and outside the classroom that enhance the course experience for everyone. The best way to judge your performance in this area is to ask yourself after every class: “what value did I provide in class today”? 2. Learning in this class requires signiicant preparation before class and deep immersion in the material. Skimming the materials will not sufice. The workload in and out of class will vary from week to week. Because much ofyour grade is based on class participation, you must prepare for class. Although every student is different, you should be spending at least two hours preparing for most of our class sessions. This estimate includes time to read the assigned materials, think, read them again, and take careful notes. You should also be asking me (or your classmates) questions and doing additional background research if you have questions or curiosities. 6. Current Event Research Paper · One of the best things about studying securities regulation is that the topic is in the news daily. Every day a new company chooses to go public, another executive at a public company is charged with violating anti-fraud provisions, or another public company is investigated for attempting to bribe foreign government oficials. The current event research paper assignment asks that you choose one current event relevant to any of the topics we will study this semester, and write a research paper describing what happened, the relevant law, and the signiicance of the story for the industry, the company, the law, and/or you. · How to choose your current event: The current event must have been in the news within the last six months. To ind a topic of interest, start reading the inancial and business news now. You might also visit the SEC’s website for press releases, or some of the many blogs on securities regulation, white-collar crime, or corruption. You can also follow the SEC on Twitter. Once you ind a news story, you will research it more deeply, including the relevant law. Your story does not have to be a case that has gone to court already. It can be an investigation, a proposed new rule or regulation, or any other story that implicates the legal issues we discuss in class. · What to include in your paper: o a detailed description of the current event o a detailed discussion of the relevant law – explain the law from the very beginning as if your reader knows nothing about the topic; this is how you demonstrate your understanding of the law o an analysis of the current event – Why is it important to the industry? What companies will care about this news story? What will its impact be? Who will win? Why? You can answer any or all of these questions (or any other question). The goal is to demonstratea meaningful application of law to facts, and deep thinking about the issues presented by the news story Logistics: o 7-8 pages, double spaced o Citation required anytime what you just wrote down did not originate in your brain o The paper should be prepared using the APA writing style. and guideline for references’ format. You must provide a bibliography, and all direct quotations and data sources must be properly cited. o The Department uses the APA style. to facilitate reading the paper and understanding references without being as cumbersome as some other citation styles (such as Chicago or MLA). 。Students can download the student style. guide from the American Psychological Association website or you can purchase the APA style. guide from the book store. There is even a help disk that can be purchased for about $ 40 (https://apastyle.apa.org/) that will walk you through the process as you write the paper if you desire more “personal assistance”. 。 Papers are to be RESEARCH PAPERS. Remember that work that you use from other authors MUST be referenced. Since it is assumed that you are not an authority on the topic that you are writing, it is expected that this paper is an overview of many different sources of information. Each of these must be attributed to the author using the APA format. o This is your paper and not the cut and paste of someone else's work. The internet has led to a false sense of what research is all about. Those new to research tend to think that it means spending an afternoon suring the internet and then an afternoon cutting from material available. 。 Keep in mind that the Internet: (1) is not quality oriented as it has good materials and not so good materials and does not know the difference; (2) is NOT a sole source location. In particular, sources such as Wikipedia are the works of individual submitters which are not reviewed. Thus, while many entries provide excellent information, some are fundamentally flawed or just plain wrong. 。 Keep in mind that the Boston University Library as well as your local, state and the national US Library of Congress have extensive online services. USE THEM.t plain wrong. 7. Group Project · Historic Financial Scams o Much of the law regulating the inancial industry is reactive: Congress passes laws after things go badly. Thus, to truly understand securities regulation and white-collar criminal laws, one must know the historical context in which the laws were passed. For better or worse, inancial scams usually involve larger-than-life characters and creative schemes. o I hope you have fun learning about the “bad guys” of the inance world. In teams, you will be asked to research one of the historic inancial scams that connect to our laws today. You will present your learning to the class. Each presentation should explain: Who are the key players? What was the inancial scam or scheme? What laws were violated? Or, if you were assigned a old scam, what current laws would have been violated? What was the regulatory response to the scam? Did it lead to any changes in the law? o The Scams (by Team #) 1. Charles Ponzi - The Original Ponzi Scheme 2. Enron 3. Eddie Antar – Crazy Eddie 4. WorldCom 5. ZZZZ Best Cleaners (1986) 6. Ivan Boesky 7. Samuel Israel III 8. Bernie Madoff 8. Exams · You will have one midterm exam and one inal exam in this course. · The date of the inal exam is set by the registrar's ofice. It is usually announced by the end of September. The course material is dense, so we will divide it in half with each half being tested on separate exams. , The exams are NOT cumulative. · In most cases, the exams will ask students to answer a series of questions by applying the law they have learned to a hypothetical fact scenario. 9. Course Grading · You can expect to be challenged in this course, and excellent, research quality work will be rewarded with an ‘A’. Grades for this course will be curved. · This is a Boston University course; that means something. One thing it means is that we recognize and reward excellence. Excellence is uncommon, even rare. Your grade, then, will reflect the standards of excellence set by Boston University, in which only truly distinguished work will receive the highest grade. · Student participation is essential for a successful class. Contributing to the discussion in each class will give you an opportunity to be heard, and to experience a rewarding learning environment. Each student is required to add value during class discussions. Use this opportunity, it’s yours. Course grades will be determined as follows: 1. Weight 10% Two Exams 3. 20% Historic financial scam presentation 5. 10%
Assessment (non-exam) Brief Module code/name MSIN0154 Statistics for Business Research Academic year 2024/25 Term 1 Assessment title Individual Coursework 2 Individual/group assessment Individual Submission deadlines: Students should submit all work by the published deadline date and time. Students experiencing sudden or unexpected events beyond your control which impact your ability to complete assessed work by the set deadlines may request mitigation via theextenuating circumstances procedure. Students with disabilities or ongoing, long-term conditions should explore aSummary of Reasonable Adjustments. Students may use thedelayed assessment schemefor pre-determined mitigation on a limited number of assessments in a year. Check the Delayed Assessment Scheme area on Portico to see if this assessment is eligible. Return and status of marked assessments: Students should expect to receive feedback within 20 working days of the submission deadline, as per UCL guidelines. The module team will update you if there are delays through unforeseen circumstances (e.g. ill health). All results when first published are provisional until confirmed by the Examination Board. Copyright Note to students: Copyright of this assessment brief is with UCL and the module leader(s) named above. 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-plagiarism, obtaining help from/sharing work with others be they individuals and/or organisations or any other form of cheating that may result in a student obtaining an unfair academic advantage. Refer toAcademic Manual Chapter 6, Section 9: Student Academic Misconduct Procedure - 9.2 Definitions. Referencing: You must reference and provide full citation for ALL sources used, including AI sources, articles, text books, lecture slides and module materials. This includes any direct quotes and paraphrased text. If in doubt, reference it. If you need further guidance on referencing please seeUCL’s referencing tutorial for students. 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 assessment. In some assessments, the use of generative AI is not permitted at all. In others, AI maybe 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 maybe an integral component of the assessment; in these cases the assessment will provide an opportunity to demonstrate effective and responsible use of AI. See page 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. Content of this assessment brief Section Content A Core information B Coursework brief and requirements C Module learning outcomes covered in this assessment D Groupwork instructions (if applicable) E How your work is assessed F Additional information Section A: Core information Submission date 04/12/2024 Submission time 10am Assessment is marked out of: 100 % weighting of this assessment within total module mark 70% Maximum word count/page length/duration 25 pages Section B: Assessment Brief and Requirements MSIN0154 Individual Coursework 2 This individual assignment is a data analysis project. You are given a data set to demonstrate the skills you have learnt from the class, including hypothesis testing, t-tests and/or regression. This dataset contains sales transaction records for an electronics company over a one-year period, spanning from September 2023 to September 2024. It includes detailed information about customer demographics, product types, and purchase behaviours. This dataset is publicly available and is adapted from the Customer purchase behavior. - Electronic Sales Data. For more information, please visit: https://www.kaggle.com/datasets/cameronseamons/electronic-sales-sep2023-sep2024 Below is the information about the data set for this assignment, and the data set is available in Excel format on Moodle. Key Features: • Customer ID: Unique identifier for each customer. • Age: Age of the customer (numeric) • Gender: Gender of the customer (Male or Female) • Loyalty Member: (Yes/No) (Values change by time, so pay attention to who cancelled and who signed up) • Product Type: Type of electronic product sold (e.g., Smartphone, Laptop, Tablet) • SKU: a unique code for each product. • Rating: Customer rating of the product (1-5 stars) (Should have no Null Ratings) • Order Status: Status of the order (Completed, Cancelled) • Payment Method: Method used for payment (e.g., Cash, Credit Card, Paypal) • Total Price: Total price of the transaction (numeric) • Unit Price: Price per unit of the product (numeric) • Quantity: Number of units purchased (numeric) • Purchase Date: Date of the purchase (format: YYYY-MM-DD) • Shipping Type: Type of shipping chosen (e.g., Standard, Overnight, Express) • Add-ons Purchased: List of any additional items purchased (e.g., Accessories, Extended Warranty) • Add-on Total: Total price of add-ons purchased (numeric) As a business analyst, you can freely explore the data set and find insights through data analysis. You need to complete a report to summarize all insights supported by data analysis and discussions. In your report, you should study and answer up to three research questions, namely you can focus on one research question in detail, or study 2 or 3 different questions in your report. The page limit is 25 pages, including everything, i.e., figures, tables, references and appendix. It should be produced in a serif font, such as Times New Roman, size 12 and single line spacing. The assignment should be completed independently. A typical report should include the following key parts, and you are free to decide the structure of your own report: • Introduction: Briefly introduce the questions you are studying in the report with justifications, i.e., through a brief literature review or background introduction. • Analysis: Details of the analysis tools you use, new variables you generate, process for analysis and the results • Discussion/Conclusion: discuss the insights from your analysis and the limitations • Reference: list any reference you used in the report (using Harvard style) • Appendix (optional): anything else that you would like to include to support your analysis Submission is via Moodle. Please only submit one single pdf file including everything. Do not include name or student number, as the marking is anonymous. Section C: Module Learning Outcomes covered in this Assessment This assessment contributes towards the achievement of the following stated module Learning Outcomes as highlighted below: • Understand key concepts in statistics. • Interpret data from descriptive statistics, measures of central tendency and measures of dispersion. • Critically analyse datasets and sampling methods. • Apply statistical tests to verify significance of findings. • Identify appropriate methods to present data. • Recognise the benefits and limitations of statistical calculations and analysis.
Your final submission must be hand-written, either on paper or on a tablet. If you write on paper, scan your work into a PDF file using your camera or a native app. If you write on a tablet, you should be able to save your work as a PDF file directly. In both cases, make sure that the file consists of pages with size 8.5 x 11. Problem 1 [20 pts] Consider a function f:X→Yf:X→ Y defined as follows: f(x)={−2x,x≤02x−1,x>0f(x)={−2x,2x−1,x≤0x>0 1. Suppose that X=Y=RX=Y=R. Show that f is neither injective nor surjective. 2. Suppose that X=ZX=Z andY=Z0+Y=Z0+. Sketch this function on the 2D coordinate plane. Be sure to accurately reflect the domain and function range. 3. Prove that f, as defined in 2 above, is bijective. 4. For f as defined above, give complete descriptions (domain, codomain, and formulas) for the functions f−1f−1 and f。f。f. Show that f。f。f is not surjective. Problem 2 [16 pts] Suppose we have two functions f:X→Yf:X→ Y and g:Y→Zg:Y→Z. 1. Suppose that f is not injective. Prove that g。fg。f cannot be injective. 2. Suppose that gg is not surjective. Prove that g。fg。f cannot be surjective. 3. Suppose that f is injective and gg is not. Come up with two simple examples of sets X,Y,ZX,Y,Z and functions f,gf,g, one where g。fg。f is injective, and one where it is not. 4. Suppose that gg is surjective and f is not. Come up with two simple examples of sets X,Y,ZX,Y,Z and functions f,gf,g, one where g。fg。f is surjective, and one where it is not. Problem 3 (python coding) Implement the three Boolean functions in Python below. Each takes Python set arguments f and Y, and isFunction() also takes in a set X. In particular, f is a set containing tuples. See the examples in the code cells below containing print statements. A further description of each function is as follows: • isFunction() should return True if f is a valid mathematical function with domain equal to X and codomain equal to Y, and False otherwise. • isInjective() should return True if f is injective and False otherwise. You may assume that f is indeed a function with codomain equal to Y. • isSurjective() should return True if f is surjective and False otherwise. You may assume that f is indeed a function with codomain equal to Y. Each function should take no more than five or so lines of code. You may write solutions that use either loops or list comprehension. Once you have finished writing all functions below, run all code cells and show the outputs. Export this notebook as a PDF file and append it to your PDF file for submission. Problem 4 [24 pts] For each of the relations defined below, briefly explain whether it satisfies each of the six relation properties. Write no more than two or three sentences per property justification. 1. Let XX be the set of all logical propositions. Let RR be a relation on XXwhere p R qp R q iff p→q is truep→q is true. 2. Let XX be the set of all Columbia computer science courses. Let RR be a relation on XXwhere x R yx Ry iff x is a prerequisite for y.x is a prerequisite for y. Problem 5 [24 pts] Suppose we have two relations R1R1 andR2R2 on a set XX, with matrix representations M1M1 and M2M2, respectively. From these, we can construct three new relations using set operations. We say that a property is not preserved ifR1R1 andR2R2 both have that property, but the newly constructed relation does not. 1. Let R3=R1UR2R3=R1UR2. Concisely explain how we can construct its matrix representation M3M3 from the matrices M1M1 and M2M2. Which of the six relation properties are not preserved by R3R3? Briefly justify each one that you identify, e.g. by giving a simple example. (You do not have to explain the properties that are preserved.) 2. Repeat 1 for the relation R3=R1∩R2R3=R1∩R2. 3. Repeat 1 for the relation R3=R1−R2R3=R1−R2.
Assessment (non-exam) Brief Module code/name MSIN0154 Module leader name Academic year 2024/25 Term 1 Assessment title Individual Assignment 1 Individual/group assessment Individual Submission deadlines: Students should submit all work by the published deadline date and time. Students experiencing sudden or unexpected events beyond your control which impact your ability to complete assessed work by the set deadlines may request mitigation via the extenuating circumstances procedure. Students with disabilities or ongoing, long-term conditions should explore a Summary of Reasonable Adjustments. Return and status of marked assessments: Students should expect to receive feedback within one calendar month of the submission deadline, as per UCL guidelines. The module team will update you if there are delays through unforeseen circumstances (e.g. ill health). All results when first published are provisional until confirmed by the Examination Board. Copyright Note to students: Copyright of this assessment brief is with UCL and the module leader(s) named above. 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-plagiarism, obtaining help from/sharing work with others be they individuals and/or organisations or any other form. of cheating that may result in a student obtaining an unfair academic advantage. Refer to Academic Manual Chapter 6, Section 9: Student Academic Misconduct Procedure - 9.2 Definitions. Referencing: You must reference and provide full citation for ALL sources used, including AI sources, articles, text books, lecture slides and module materials. This includes any direct quotes and paraphrased text. If in doubt, reference it. If you need further guidance on referencing please see UCL’s referencing tutorial for students. 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 assessment. 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 page 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. For staff reference only: template version 1.0 September 2024 Content of this assessment brief Section Content A Core information B Coursework brief and requirements C Module learning outcomes covered in this assessment D Groupwork instructions (if applicable) E How your work is assessed F Additional information Section A Core information Submission date 26/11/2024 Submission time 10 am Assessment is marked out of: 100 % weighting of this assessment within total module mark 30% Section B Assessment Brief and Requirements The assignment includes five questions. The first question focuses on the normal distribution. The second explores the concept of the value of information through conditional probability. The third involves working with a dataset and performing a series of hypothesis tests. The fourth applies probabilistic models in a business context. The fifth discusses how concepts from the course can be applied to a realworld case study. Please refer to the attached assignment document at the end of this assessment brief for more details. Section C Module Learning Outcomes covered in this Assessment This assessment contributes towards the achievement of the following stated module Learning Outcomes as highlighted below: • Understand key concepts in statistics. • Interpret data using hypothesis testing. • Make decisions under uncertainty. • Apply statistical models to real-world business problems. Section D: Groupwork Instructions (where relevant/appropriate) N/A Section E: How your work is assessed Within each section of this assessment you may be assessed on the following aspects, as applicable and appropriate to this assessment, and should thus consider these aspects when fulfilling the requirements of each section: • The accuracy of any calculations required. • The strengths and quality of your overall analysis and evaluation; • Appropriate use of relevant theoretical models, concepts and frameworks; • The rationale and evidence that you provide in support of your arguments; • The credibility and viability of the evidenced conclusions/recommendations/plans of action you put forward; • Structure and coherence of your considerations and reports; • Appropriate and relevant use of, as and where relevant and appropriate, real world examples, academic materials and referenced sources. Any references should use either the Harvard OR Vancouver referencing system (see References, Citations and Avoiding Plagiarism) • Academic judgement regarding the blend of scope, thrust and communication of ideas, contentions, evidence, knowledge, arguments, conclusions. • Each assessment requirement(s) has allocated marks/weightings. Student submissions are reviewed/scrutinised by an internal assessor and are available to an External Examiner for further review/scrutiny before consideration by the relevant Examination Board. It is not uncommon for some students to feel that their submissions deserve higher marks (irrespective of whether they actually deserve higher marks). To help you assess the relative strengths and weaknesses of your submission please refer to SOM Assessment Criteria Guidelines, located on the Assessment tab of the SOM Student Information Centre Moodle site. The above is an important link as it specifies the criteria for attaining the pass/fail bandings shown below: At UG Levels 4, 5 and 6: 80% to 100%: Outstanding Pass - 1st; 70% to 79%: Excellent Pass - 1st; 60%-69%: Very Good Pass - 2.1; 50% to 59%: Good Pass - 2.2; 40% to 49%: Satisfactory Pass - 3rd; 20% to 39%: Insufficient to Pass - Fail; 0% to 19%: Poor and Insufficient to Pass - Fail. At PG Level 7: 86% to 100%: Outstanding Pass - Distinction; 70% to 85%: Excellent Pass - Distinction; 60%-69%: Good Pass - Merit; 50% to 59%: Satisfactory - Pass; 40% to 49%: Insufficient to Pass - Fail; 0% to 39%: Poor and Insufficient to Pass - Fail. You are strongly advised to review these criteria before you start your work and during your work, and before you submit. Upon receipt of your mark, you are strongly advised to not compare your mark with marks of other submissions from your student colleagues. Each submission has its own range of characteristics which differ from others in terms of breadth, scope, depth, insights, and subtleties and nuances. On the surface one submission may appear to be similar to another but invariably, digging beneath the surface reveals a range of differing characteristics. Students who wish to request a review of a decision made by the Board of Examiners should refer to the UCL Academic Appeals Procedure, taking note of the acceptable grounds for such appeals. Note that the purpose of this procedure is not to dispute academic judgement – it is to ensure correct application of UCL’s regulations and procedures. The appeals process is evidence-based and circumstancesmust be supported by independent evidence. Section F: Additional information from module leader (as appropriate) N/A Individual Assignment Instructions Deadline The deadline for this individual assignment is 10:00 am on 26/11/2024 (Tuesday). However, it is highly recommended that you start working on it well in advance. Problems 1 and 2 are fully covered by the material from Lectures 1 to 5, while Problem 3 is based on material from Lectures 6 to 8. Problem 4 includes questions of varying difficulty; for example, Problems 4.1 and 4.2 can be answered using knowledge from Lectures 1 to 3. Feel free to be creative in your answers to Problems 4 and 5. Format Please provide a detailed explanation of your thought process alongside your solutions. Submit your assignment as an individual PDF file on Moodle. Ensure that your answers are presented in the same order as the problems. For Problems 1 to 4, which may include mathematical expressions, you have the option to either type your solutions or write them by hand. If writing by hand, take clear photos of your work and compile the images into the PDF. For Problem 5, which focuses on your hypothetical business plan and ideas, you must type your response; hand-written solutions are not permitted for Problem 5. Make sure to submit a single PDF file, and ensure the file size is less than 10 MB. Problem 1: Simple Investment (15 points) Suppose that you have 400,000 pounds and you are contemplating the purchase of two investments, A and B. One year from now, Investment A can be sold at £X per £1 invested, and Investment B can be sold for £Y per £1 invested. You regard X and Y as statistically independent random variables. Assume that both X and Y are normally distributed with mean of 1.2 and standard deviation of 0.2. Problem 1.1: Investing in A (5 points) If you put all your money in Investment A, what is the probability that you will be able to sell it one year from now at a positive profit? Problem 1.2: Diversification (5 points) If you split your money between the two investments and invest £100,000 in Investment A and £300,000 in Investment B, what is the probability you will be able to sell your portfolio for a positive profit a year from now? Problem 1.3: Optimal Diversification (5 points) Based on Problems 1.1 and 1.2, discuss the optimal strategy for this investment. Please show the calculations if any to support your argument. Problem 2: Value of Information (10 points) A manager at an electric car manufacturer needs to make a sourcing decision regarding an electric battery. The manufacturer seeks to produce 100,000 units of its latest electric car model, and each unit will require a single battery. Supplier A can produce the batteries for the price of £4000 per unit. Supplier B can produce the batteries for the price of £2000 per unit. However, Suppliers A and B differ in the quality of the batteries they produce, especially in terms of defect rates. For Supplier A, the manager believes with complete certainty that all 100,000 batteries will be delivered with no defects. For Supplier B, the manager estimates a 60% probability of no defects, a 30% probability of minor defects being found in the battery shipment, requiring additional rework costs amounting to £250,000,000, and a 10% probability of major defects, requiring additional rework costs amounting to £400,000,000. The electric car manufacturer intends to sell the car at a unit price of £35,000. Besides the battery, each car has a production cost of £28,000, independent of the sourcing decision. Problem 2.1 (4 points): Sourcing without Additional Information. Based on the information given so far, please answer the following questions: • (1 points) Assume that the manager decides to source all 100,000 batteries from Supplier A. What will be the expected profit? • (2 points) Assume that the manager decides to source all 100,000 batteries from Supplier B. What will be the expected profit? • (1 point) Based on your answers to the two previous questions, which supplier should the manager reach out? Problem 2.2 (6 points): Sourcing with Additional Information. Suppose that Supplier B agrees to test its batteries and provide the manager with a detailed report before any sourcing decision is made. Based on this report, the manager can assess whether the batteries from Supplier B have major defects, minor defects, or no defects. • (1 points) Assume that the report shows that Supplier B’s batteries have no defects. Which supplier should the manager choose, and what will be the corresponding profit from selling these 100,000 cars? • (1 points) Assume that the report shows that Supplier B’s batteries all have minor defects. Which supplier should the manager choose and what will be the corresponding profit from selling these 100,000 cars? • (1 points) Assume that the report shows that Supplier B’s batteries all have major defects. Which supplier should the manager choose and what will be the corresponding profit from selling these 100,000 cars? • (2 points) Given that the manager receives the report, based on your answers to the previous questions, what will be expected profit from selling these 100,000 electric cars? • (1 points) What is the maximum the manager should pay for this information/report? (Hint: compare the results of Problems 2.1.3 and 2.2.3.) Problem 3: Hypothesis Testing (25 points) The coffee chain Universal Coffee Lovers (UCL) recently revised its subscription service, the “UCL Club.” Before the change, members were charged £20 per month for unlimited coffee. Under the new policy, members are charged £5 per month, plus £1 for each coffee consumed. To understand how this new subscription model impacts customer behavior, the two CEOs, Akchen and Huang, collected data from club members and asked you to conduct a series of hypothesis tests. The data file, coffee.csv, is available on Moodle. Please download it and open it by Excel or any other softwares. It contains information on the coffee consumption behavior. of 500 club members before and after the new subscription policy was implemented. The dataset has five columns: the first three columns provide details about each member’s ID, Gender, and Age. In the “Gender” column, the value “1” represents female and “0” represents male. The last two columns report each member’s average daily coffee consumption (in cups) before and after the new subscription took effect. If the consumption value is “-1” in the “After” column, it indicates that the customer has cancelled their subscription. For example, the first club member is a 38-year-old female who previously consumed 1.9 cups of coffee per day under the old subscription policy but has since cancelled her subscription. Please use the dataset coffee.csv to answer the following questions. Problem 3.1 (5 points): Gender and Coffee Consumption The CEOs believe that coffee consumption per customer is not influenced by gender, representing the null hypothesis (H0): there is no difference in coffee consumption between genders. The manager, however, believes that gender does influence coffee consumption, representing the alternative hypothesis (H1): there is a difference in coffee consumption between genders. Using the coffee.csv dataset and coffee consumption data under the old subscription model, do we have enough evidence to accept the alternative hypothesis and reject the null hypothesis? Problem 3.2 (5 points): Age and Coffee Consumption The CEOs believe that younger customers are more valuable, asserting that they consume more coffee than older customers. This represents the null hypothesis (H0). In contrast, the manager holds the opposite view, forming the alternative hypothesis (H1). Let µY represent the population mean of coffee consumption for customers aged 20-40, and µO represent the population mean for customers aged 41-60. Using the coffee.csv dataset and the coffee consumption data under the old subscription model, do we have enough evidence to accept the alternative hypothesis and reject the null hypothesis? Problem 3.3 (5 points): Subscription The CEOs acknowledge that the new policy may negatively impact customer visits to UCL coffee shops. However, they remain optimistic, believing that the reduction in coffee consumption is modest – less than 0.5 cups per day per customer. This represents the null hypothesis (H0). In contrast, the investors believe the impact is more significant, forming the alternative hypothesis (H1). Using the coffee.csv dataset and considering only the customers who remained in the club under the new subscription model, do we have enough evidence to accept the alternative hypothesis and reject the null hypothesis? Problem 3.4 (10 points): Policy Evaluation The investors believe that the new subscription model has led to a decrease in revenue from club members (H0). In contrast, the CEOs believe the opposite (H1), thinking that the new model is boosting the business. The CEOs have asked you to conduct a hypothesis test to support their position based on the existing dataset coffee.csv. How would you approach this analysis? Problem 4: Discrete Choice Modeling (25 points) In this problem, we explore an application of probability in a business context, specifically focusing on discrete choice modeling. Discrete choice models are essential tools used to understand product demand and predict consumer behavior. The development of these models earned Daniel McFadden the Nobel Prize in Economics in 2000. Consider a market with a set of n products. Let N = {1,2,...,n} represent the collection of these n products. Since some products may not be available due to stockouts or inventory limitations, we define an assortment S, which is a subset of N (denoted as S ⊆ N), to represent the set of available products. For instance, if there are five products, N = {1,2,3,4,5}, and a store decides not to sell products 3 and 5, the assortment S would be S = {1,2,4}. Additionally, we use 0 to denote the “no-purchase” option. In this context, i ∈ N refers to the action of “buying product i,” while 0 refers to “not buying anything.” We write N+ = {0} ∪ N = {0,1,2,...,n} and S+ = {0} ∪ S A choice model M specifies a mapping from any assortment S ⊆ N to a probability distribution PM(· | S) over the N+. Here, PM(i | S) represents the probability that a random customer from the market chooses to buy product i and PM(0 | S) represents the probability that the customer decides not to make any purchase. For example, consider S = {1,2,4}, then PM(1 | S) = 0.3 and PM(0 | S) = 0.2 imply that a customer will buy product 1 with probability 0.3 and will not buy anything from S with probability 0.2. One of the most fundamental choice models is the Multinomial-Logit (MNL) Model. In this model, each product i is associated with a parameter vi, which represents its expected utility to customers from an economics viewpoint. The no-purchase option is assumed to have an expected utility 0. Given an assortment S of available products, the MNL model calculates the probability that a customer will buy a particular product as follows: , if i ∈ S, PMNL(i | S) = 0, if i /∈ S, , if i = 0. Problem 4.1 (2 points): Probability Distribution Please verify that the MNL model results in a valid probability distribution over the set N+. Problem 4.2 (2 points): When Stockout Happens Assume that N = {1,2,3} and (v1,v2,v3) = (0.5,0.3,0.7). Please calculate the distribution PMNL(· | N) over N+. If product 2 is out of stock, how will this distribution change? Problem 4.3 (3 points): Product Demand Based on your answer to the previous problem, do you think products are substitutes or complements under the MNL model? Discuss this and the limitations of the MNL model. Problem 4.4 (5 points): Simple Logistic Regression Now, let’s try to estimate the utility parameter in a simplified scenario. Consider a store that sells a set of products, N = {1,2,...,n}, and assume that these products are always in stock so that S = N = {1,2,...,n}. Suppose m customers visited the store, with m1 customers purchasing product 1, m2 purchasing product 2, and so on, up to mn customers purchasing product n. How would you estimate the utilities (v1,...,vn) in this case? Problem 4.5 (4 points): Customers Have Their Tastes Products can be described by their features. Let xrepresent the d-dimensional feature vector of product i. For example, an iPhone 16 Pro priced at £1000, with a 6.7-inch screen and 512GB memory, can be represented by the vector (1000,1,6.7,512), where the features are “price,” “whether it is an iPhone,”“screen size”, and “memory in GB”. Here, a binary value is used to represent “yes” or “no”, with 1 indicating “yes” and 0 indicating “no”. Given product features x(i) of product i, we assume that the customer’s utility for product i takes the form. d ui = β0 + Xβk · x(ki), (1) k=1 where each βk is referred to as a partworth parameter. The ui in Equation (1) is known as partworth utility, a numerical score that measures how much each feature of a product influences the customer’s decision to select an alternative. Now, consider a market of two products, N = {1,2}. Each product is characterized by two features: x(1) = (2,1) for product 1 and x(2) = (1,3) for product 2. Suppose the customer’s partworth parameters are given by (β0,β1,β2) = (1,0.8,−0.2). Answer the following questions: A. (2 points) Under the MNL model, what is the probability that the customer chooses to buy product 1 when both products 1 and 2 are available? B. (2 points) Which feature, the first or the second, is more likely to be related to price? Explain your reasoning. Problem 4.6 (5 points): Learning Customers’ Tastes We aim to estimate the partworth parameters from data. Consider again the simplified version described in Problem 2.4, where assortment S = {1,2,...,n} includes all products, and out of a total of m customers, mi customers purchased product i, for i = 1,...,n. Additionally, each product i is characterized by a feature vector x. • (3 points) How would you estimate the partworth parameters (β0,β1,...,βd) in this context? (Note: you can be creative in answering this question) • (2 points) Will your suggested method still work if d > n? If not, how would you address this issue? Problem 4.7 (2 points): Non-linear Utility The assumption of a linear relationship between a product’s features and its utility has its limitations. For instance, consider a scenario where the partworth parameter for the “screen size” of a phone is positive. This would suggest that increasing the screen size makes customers more likely to buy the phone. However, this assumption breaks down if the screen size becomes excessively large – such as 20 inches, which is bigger than most laptops. Clearly, customers would not be interested in such a phone. How would you address the non-linear relationship between utility and product features in such cases? Problem 4.8 (2 points): Heterogeneity Finally, individual customers often have varying preferences. For example, younger customers might prefer smaller phones for convenience, while older customers may favor larger phones for easier readability. This illustrates the heterogeneity in customer preferences. How would you generalize the MNL model to account for such heterogeneity and incorporate diverse customer tastes? Again, you can be creative in answering this question. Problem 5: Data Collection and Modeling (25 points) Assume that you plan to open a pizza restaurant in Canary Wharf and would like to study the factors that may affect the restaurant’s revenue. Please briefly discuss your plan, i.e., which factors or variables that you are interested in, and the statistical tools and models that you will need and why. Please note that you need to discuss at least five factors that may affect the revenue. You should focus on the explanation and justification of your plan and do not need to actually collect the data or carry out the test.
N1569 Financial Risk Management Workshop Topic 1 The following is the output from the ChatGPT prompt: “ Describe the main types of financial assets and instruments (1000 words)” . Financial assets and instruments represent claims to future cash flows and play a critical role in the functioning of financial markets. They differ in terms of risk, liquidity, return potential, and the specific rights they confer. Here are the main types of financial assets and instruments: 1. Cash and Cash Equivalents • Description : Highly liquid assets that can be quickly converted into cash with little to no loss in value. • Examples: o Cash : Physical currency, bank deposits. o Treasury Bills (T-Bills): Short-term government debt securities that mature in a year or less. o Certificates of Deposit (CDs) : Fixed-term deposits with banks that pay interest. o Money Market Instruments : Short-term debt instruments like commercial paper and banker’sacceptances. • Characteristics: Low risk, low return, used primarily for managing short-term liquidity and emergency funds. 2. Fixed-Income Securities (Debt Instruments) • Description : Investments that provide regular, fixed returns (interest payments) over a specified period. The issuer promises to pay the face value (principal) upon maturity. • Examples: o Bonds: Debt securities issued by governments, municipalities, or corporations. They include: Government Bonds: Considered low-risk, issued by national governments (e.g., U.S. Treasuries). Corporate Bonds: Issued by companies, carrying higher risk and higher interest rates than government bonds. Municipal Bonds: Issued by local governments, often providing tax benefits. o Notes and Debentures: Unsecured debt instruments not backed by collateral, relying on the issuer's creditworthiness. o Mortgage-Backed Securities (MBS) : Bonds secured by a pool of mortgages. • Characteristics: Provide regular income (coupons), relatively lower risk than equities, subject to interest rate and credit risk. 3. Equities (Stocks) • Description : Securities that represent ownership in a company. Shareholders are entitled to a portion of the company's profits, typically in the form of dividends, and have voting rights. • Examples: o Common Stocks: Offer ownership in a company, voting rights, and potential dividends. Shareholders benefit from capital appreciation but assume higher risk. o Preferred Stocks: Provide fixed dividends and have priority over common stockholders for dividends and liquidation claims. Generally do not have voting rights. • Characteristics: Potential for high returns through capital gains and dividends, but come with higher risk due to market volatility and the company’s performance. 4. Derivatives • Description : Financial instruments that derive their value from an underlying asset, such as stocks, bonds, commodities, currencies, or interest rates. • Examples: o Options: Contracts that give the holder the right, but not the obligation, to buy (call) or sell (put) an asset at a predetermined price within a specific timeframe. o Futures: Agreements to buy or sell an asset at a future date at a predetermined price. Unlike options, both parties are obligated to fulfill the contract. o Forwards : Similar to futures but are privately negotiated and customized contracts between two parties. o Swaps: Contracts in which two parties exchange cash flows or other financial instruments, commonly used to manage interest rate or currency risk. • Characteristics: Used for hedging risks or speculating on price movements. They can be highly complex and carry the potential for significant gains or losses. 5. Commodities • Description : Physical assets that are traded in the market, including natural resources and agricultural products. • Examples: o Precious Metals: Gold, silver. o Energy: Crude oil, natural gas. o Agricultural Products: Wheat, corn, coffee. o Livestock: Cattle, hogs. • Characteristics: Prices are influenced by supply and demand dynamics, geopolitical events, and economic conditions. Commodities can be traded directly or via derivatives like futures contracts. 6. Real Estate and Real Estate Investment Trusts (REITs) • Description : Real estate includes physical properties, while REITs are companies that own, operate, or finance income-generating real estate. • Examples: o Real Estate Properties : Residential, commercial, industrial properties. o REITs: Publicly traded companies that allow investors to earn income from real estate investments without owning physical properties. • Characteristics: Real estate offers diversification, income through rent, and long-term capital appreciation. REITs provide a more liquid way to invest in real estate. 7. Mutual Funds and Exchange-Traded Funds (ETFs) • Description : Investment vehicles that pool funds from multiple investors to invest in a diversified portfolio of assets, including stocks, bonds, and other securities. • Examples: o Mutual Funds: Actively or passively managed funds traded at the end of the trading day at their net asset value (NAV). o ETFs: Traded on stock exchanges like individual stocks, offering liquidity and typically lower fees than mutual funds. • Characteristics: Provide diversification, professional management, and relatively lower investment minimums. They come in various forms, including index funds, sector-specific funds, and bond funds. 8. Alternative Investments • Description : Non-traditional assets outside the categories of stocks, bonds, or cash. • Examples: o Hedge Funds: Pooled investment funds that use complex strategies, such as leveraging, short selling, and derivatives, to generate high returns. o Private Equity: Investments in private companies, including venture capital, buyouts, and direct investments. o Cryptocurrencies: Digital assets like Bitcoin and Ethereum that use blockchain technology for secure transactions. o Collectibles: Tangible assets like fine art, rare wine, vintage cars, and precious metals. • Characteristics: Offer diversification and the potential for high returns but often come with higher risk, complexity, and lower liquidity. Typically accessible to accredited investors due to high minimum investment requirements. 9. Foreign Exchange (Forex) • Description: The global marketplace for trading national currencies against one another. • Examples: Currency pairs like EUR/USD, GBP/JPY, and USD/JPY. • Characteristics: The largest and most liquid financial market, with prices influenced by interest rates, economic indicators, and geopolitical events. Primarily used for hedging, speculation, and facilitating international trade. 10. Insurance Products • Description : Contracts that provide financial protection against specific risks (e.g., health, life, property) in exchange for regular premiums. • Examples: o Life Insurance: Provides a payout to beneficiaries upon the policyholder's death. o Annuities: Offer regular payments to the holder, often used for retirement planning. • Characteristics: Provide risk management and can also be used as investment tools, particularly in the case of whole life policies and annuities. These financial assets and instruments play a vital role in the global economy, facilitating investment, funding, risk management, and economic growth. Investors and institutions choose from these based on their risk tolerance, return objectives, time horizons, and market conditions. In your workshop you will discuss the answers toten questions based on the output above: 1. What are cash equivalents, and how do they differ from cash? 2. How do government bonds differ from corporate bonds in terms of risk and return? 3. What are the primary differences between common stocks and preferred stocks? 4. How do derivatives like options and futures help investors hedge risks? 5. What factors influence the prices of commodities in the market? 6. How do Real Estate Investment Trusts (REITs) provide a liquid way to invest in real estate? 7. What is the main difference between mutual funds and exchange-traded funds (ETFs)? 8. Why are alternative investments generally considered to have higher risk and lower liquidity? 9. What are the primary functions of the foreign exchange (Forex) market? 10. How can insurance products like annuities be used as investment tools?
Assignment 5 EMATM0061: Statistical Computing and Empirical Methods, TB1, 2024 Introduction This assignment is mainly based on Lectures 12, 13 and 14. It is recommended that you watch the video lectures before starting. Create an R Markdown for the assignment It is a good practice to use R Markdown to organise your code and results. For example, you can start with the template called Assignment02_TEMPLATE.Rmd which can be downloaded via Blackboard. If you try to write mathematical expressions in R Markdown, examples can be found in the document “Assignment_R MarkdownMathformulasandSymbolsExamples.rmd” (under the resource list tab on blackboard course webpage). You can optionally submit this assignment by 13:00 Monday 21st October, which will help us understand your work but will not count towards your final grade. The submission point can be found under the assignment tab at Blackboards (click the title “Assignment 05” and upload a pdf file). Load packages Some of the questions in this assignment require the following packages. 1. The tidyverse package: library(tidyverse) 2. The Stat2Data package and then the dataset Hawks: library(Stat2Data) data("Hawks") 1. Exploratory data analysis This section covers some of the concepts from Lecture 12 on Exploratory Data Analysis. We will use the Hawks dataset that you have loaded. head(Hawks) ## Month Day Year CaptureTime ReleaseTime BandNumber Species Age Sex Wing ## 1 9 19 1992 13:30 877-76317 RT I 385 ## 2 9 22 1992 10:30 877-76318 RT I 376 ## 3 9 23 1992 12:45 877-76319 RT I 381 ## 4 9 23 1992 10:50 745-49508 CH I F 265 ## 5 9 27 1992 11:15 1253-98801 SS I F 205 ## 6 9 28 1992 11:25 1207-55910 RT I 412 ## Weight Culmen Hallux Tail StandardTail Tarsus WingPitFat KeelFat Crop ## 1 920 25.7 30.1 219 NA NA NA NA NA ## 2 930 NA NA 221 NA NA NA NA NA ## 3 990 26.7 31.3 235 NA NA NA NA NA ## 4 470 18.7 23.5 220 NA NA NA NA NA ## 5 170 12.5 14.3 157 NA NA NA NA NA ## 6 1090 28.5 32.2 230 NA NA NA NA NA 1.1 Location estimators (Q1) Let’s start by computing some location estimators for Hawks’ “Tail” . First, create a vector called “HawksTail”, the elements of which are from the “Tail” column of Hawks data frame. The first part of the vector should look like: ## [1] 219 221 235 220 157 230 Second, use the “mean” and “median” functions to compute the sample mean and sample median from the vector “HawksTail” . (note that inputs of the “mean” function are vectors. Type ?mean for further details). 1.2 Combining location estimators with the summarise function (Q1) Use a combination of the “summarise()”, “mean()” and “median()” to compute the sample mean, sample median and trimmed sample mean (with q = 0.5) of the Hawk’s wing length and Hawk’s weight (i.e., the “Wing” and “Weight” columns). You may need to remove the NA values. What can you say by comparing the results of the median and the trimmed mean that you obtain? Your result should look something like this: ## Wing_mean Wing_t_mean Wing_med Weight_mean Weight_t_mean Weight_med ## 1 315.6375 370 370 772.0802 970 970 (Q2) Combine them with the “group_by()” function to obtain a breakdown by species. Your result should look something like this: ## # A tibble: 3 × 7 ## Species Wing_mean Wing_t_mean Wing_med Weight_mean Weight_t_mean Weight_med ## ## 1 CH 244. 240 240 420. 378. 378. ## 2 RT 383. 384 384 1094. 1070 1070 ## 3 SS 185. 191 191 148. 155 155 1.3 Location and dispersion estimators under linear transformations (Q1) Suppose that a variable of interest x has values x1, ⋯ ,xn. Suppose that x1, ⋯ ,xn~has a s~ample ~mean A. Let a,~b ∈ ℝ be real numbers and define a new variable x with x~1, ⋯ ,x~n defined by xi = axi + bfor i = 1,2, ⋯ ,n. What is the sample mean of x1, ⋯ ,xn as a function of a, b and A? (please write down your answer as an expression of a, A, and b. You don’t need to use R). Now using the vector “HawksTail” that you created in Section 1.1 as data and letting a = 2 and b = 3, verify your conclusion using R codes: Compute the mean of “HawksTail*a+b” and then compare it with the one obtained from the mean of “HawksTail” and your conclusion. (Q2) Suppose further that x1, ⋯ ,x~n has s~ample variance p and standard deviation q. W~hat is~the sample variance of x1, ⋯ ,xn? What is the sample standard deviation of x1, ⋯ ,xn? (Please write down your results.) Now using the vector “HawksTail” that you created in Section 1.1 as data and letting a = 2 and b = 3, verify your result using R codes again. 1.4 Robustness of location estimators In this exercise we shall investigate the robustness of several location estimators: The sample mean, sample median and trimmed mean. We begin by extracting a vector called “hal” consisting of the talon lengths of all the hawks with any missing values removed. hal
DEPARTMENT OF MATHEMATICAL SCIENCES AUTUMN SEMESTER 2024-2025 MATH1109 - CORE MATHEMATICS Python Coursework Deadline: 15:00, Wednesday 27/11/2024 Rules It is not permitted to use generative artificial intelligence (AI) software for this coursework. Ensure that you have read and have understood the Policy on academic misconduct. One of the things stated in this policy is that “The submission of work that is generated and/or improved by software that is not permitted for that assessment, for the purpose of gaining marks will be regarded as false authorship and seen as an attempt to gain an unpermitted academic advantage”. You are allowed to work together and discuss in small groups (two to four MATH1109 students) but you must write all code by yourself with the exception that you may copy from material provided on the MATH1109 Moodle page. You may ask for and receive help from the tutor Richard Rankin although not all questions will be answered and those that are will be answered to all students in the class. Each student is to submit their own coursework. You must submit one .py file for each question. A full submission contains three Python files: • legendre.py, • square_root.py, • time_steppers.py. You are strongly encouraged to use the Spyder IDE (integrated development environment). Marks breakdown This coursework is out of 100 marks: • Q1 – 40 marks. • Q2 – 30 marks. • Q3 – 30 marks. Guidelines For full output data marks, your functions need to return the correct outputs for the particular input arguments. For full plot marks, your plot(s) should have the correct data plotted, axis labels, a legend if appropriate, and a descriptive title. Note that you will not be penalised for not using TeX/LaTeX fonts. You should comment your code as discussed in Appendix 3 of the Python Notes and all functions should have a docstring, see Chapter 7.6 of the Python Notes. Some marks will be assigned for commenting and docstrings. Please be aware that we will test your functions with an automated marker to check that they work and produce the desired output(s), both with the data given in the templates and with different undisclosed data. .py files that include template functions can be found in the same folder as this file on the MATH1109 Moodle page. The template .py files also contain some simple tests of your functions. You are encouraged to write your own tests of your functions in a separate file. If your modules have filenames that differ to what has been explicitly asked for, then your modules will not run through the automarker, and you risk scoring low output/plot marks. The automated tests for all questions will be “timed out” if they take too long to run. All questions should only need at most a few seconds to run. When setting up a figure inside a function, you should first use the following syntax before plotting anything: fig = plt.figure() fig can then be returned from the function as if it were any other variable. Questions 1. The Legendre polynomials {Lu (x)}u≥0 are a set of polynomials that are orthogonal over the interval (−1, 1). This means that The Legendre polynomials can be constructed using the recurrence relationship: L0 (x) = 1, L1 (x) = x, nLu (x) = (2n − 1)xLu−1 (x) − (n − 1)Lu−2 (x), for n ≥ 2. Your task: (a) Complete the function found in legendre.py (available on Moodle) with prototype: def compute _ legendre (x,p) • This function should compute the Legendre polynomials up to and including degree p at the points contained in x. • This function should take as input: – A one-dimensional numpy.ndarray x - the values at which to evaluate the Legendre polynomials; – An int p - the maximum polynomial degree to evaluate; • The function should output: – A numpy.ndarray of shape (p+1,len(x)) - the evaluated Legendre polynomials. Once you have written compute_legendre(), test it by running legendre.py. You should obtain the following: Legendre polynomials: [[ 1. 1. 1. 1. 1. ] [-1. -0.5 0. 0.5 1. ] [ 1. -0.125 -0.5 -0.125 1. ] [-1. 0.4375 -0. -0.4375 1. ]] (b) Complete the function found in legendre.py with prototype: def plot _ legendre (p) • This function should plot the Legendre polynomials up to and including degree p over the interval [−1, 1] on a single set of axes. • This function should take as input: – An int p - the maximum polynomial degree to plot; • The function should output: – A matplotlib.figure .Figure - a handle to the plot created. Once you have written plot_legendre(), test it by running legendre.py. [40 marks] 2. In this question, you will implement an algorithm to find an approximate square root of a > 0. The mathematical square root function has the following Taylor expansion about a point x2: This motivates the following iteration where N is some positive integer. The iteration should begin with an initial guess is considered sufficiently accurate when for some give error tolerance ε . Your task: Complete the function found in square_root.py (available on Moodle) with the prototype: def approx _ square _root (a,N,x0 , eps) • This function should apply (1) to find the approximate square root of a. • This function should take as input: – A float a - the value to be square rooted; – An int N - to control how many terms in the Taylor expansion are used; – A float eps - the tolerance at which to stop the iteration; – A float x0 - the initial guess for the iteration. • The function should output (in this order): – A float - the (approximate) positive value of the square root of a; – An int - the number of iterations required to obtain a sufficiently accurate approximation. Once you have written approx_square_root(), test it by running square_root .py. You should obtain the following: sqrt(25) = 5.0 , No_iterations = 4 sqrt(10) = 3.162277660168379 , No_iterations = 2 Note: Very tiny changes to these values are acceptable due to the way Python carries out floating point arithmetic. [30 marks] 3. Suppose we wish to solve the scalar initial value problem A two-point method for approximating solutions to this problem has the time stepping formulae: yu+2 = yu+1 + δt(3f(tu+1 , yu+1) − f(tu, yu))/2, n = 0, … , N − 2 (4) where, δt = T/N and tu = nδt, n = 0, … , N. In order to findy2 , both y0 andy1 are required. y0 is available from the initial condition, but in general, y1 is not known. y1 can be simply provided, as in part (a), or calculated some other way, as in part (b). Your task: (a) Complete the function found in time_steppers.py (available on Moodle) with the prototype: def perform _time _ stepping1 (T,N,y0 ,y1 , f) • This function should use the method shown in (4) to approximately solve the IVP (2)-(3). • This function should take as input: – A float T - the final time T; – An int N - the number of time-steps to perform; – A float y0 - the initial value y0; – A float y1 - the value to use for y1; – a function f - the function f(t, y). • The function should output (in this order): – a numpy.ndarray - a vector containing all the time points {tn}Nn=0; – a numpy.ndarray - a vector containing all the approximations {yn}Nn=0. Once you have written perform_time_stepping1() test it by running time_steppers .py. You should obtain the following: perform_time_stepping1: tn = [0 . 0 .5 1 . 1 .5 2 . 2 .5 3 . 3 .5 4 . 4 .5 5 . ] yn = [1 . 1 .23606798 1 .44647817 1 .6412379 1 .82300795 1 .99402943 2.15596995 2.31011529 2.45747855 2.59887356 2.73496507] (b) Complete the function found in time_steppers.py (available on Moodle) with the prototype: def perform _time _ stepping2 (T,N,M,y0 , f) • This function should use the method shown in (4) to approximately solve the IVP (2)-(3). • To find a value for y1 ≈ y(δt), M steps of the forward Euler method should be used. • This function should take as input: – A float T - the final time T; – An int N - the number of time-steps of (4) to perform; – An int M - the number of time-steps of forward Euler to perform to findy1; – A float y0 - the initial value y0; – a function f - the function f(t, y). • The function should output (in this order): – a numpy.ndarray - a vector containing all the time points {tn}Nn=0; – a numpy.ndarray - a vector containing all the approximations {yn}Nn=0 . Once you have written perform_time_stepping2() test it by running time_steppers .py. You should obtain the following: perform_time_stepping2: tn = [0 . 0 .5 1 . 1 .5 2 . 2 .5 3 . 3 .5 4 . 4 .5 5 . ] yn = [1 . 1 .23861555 1 .44864405 1 .64325985 1 .82490307 1 .99581873 2.15766904 2.31173637 2.45903135 2.60036596 2.73640354] [30 marks]
ECE303: Real Time Digital Signal Processing Final Project: Cool Guitar Effects Special effects for guitars are a fun application of DSP. In this project, you would be creating three guitar effects using Real time DSP techniques learned in previous labs. 1. Primary Reference (1) Primary reference for the project will be Chapter 10: Guitar Special Effects. Chapter covers relevant theory and provides few sample examples. It is highly recommended to understand the chapter before starting the project. Chapter 10.2 and Chapter 10.5 are very important for your understanding. Please make sure you read them and understand most of the contents in these two sections. (2) This final project consists of three parts as described below a. Creating Echo effect b. Creating Flanging effect c. Creating Chorus effect (3) WINDSK already has these audio effects implemented. Refer to Chapter 3, section 3.2.3 for more details. Check out these effects in WINDSK to get an understanding of how these effects sound. 2. Assignment 1: Delay + Echo Effect (1) Theory The delay effect is a very simple time-based guitar effect generated using the following FIR (finite impulse response) difference equation (Fig 10.1 in textbook) y(n) = x(n) + x(n - D) The direct signal x(n) is added to a single attenuated and delayed copy of itself α . x(n - D) The delay D represents the round-trip travel time from the source to a reflecting surface. The coefficient α is a measure of the reflection and propagation losses, such that |α| ≤ 1. The echo effect is a multiple delay effect. The direct signal is now added to several attenuated and delayed copies of itself. For example, using three successive delays, the echo difference equation becomes If an infinite number of successive delays are added, using z-transforms and a geometric series summation, the echo difference equation can be represented recursively as This IIR (infinite impulse response) difference equation roughly imitates the reverberating nature of a room. (Fig 10.2 in textbook). (2) Tasks a. Implement multiple echo effect using IIR filters as shown in Fig 10.2 in textbook. Feel free to use codec based ISR or EDMA based frame. approach, whichever you are more comfortable with. b. Adjust the delay of echo so that it imitates the reverberating nature of a room. Set the gain value α for echoed sample as 0.75. Make one channel talk through and the other channel having echo effect to compare the two. (3) Hints a. Read Chapter 10.5 in the textbook, try to understand how the code works. b. If you would like to use codec based ISR to implement multiple echo effect using IIR filters, feel free to use this code in Book3rdEditioncodechapter10ccsEchoISRs_B.c (Implement IIR filter) in your CCS project. c. Remember to include Echo.h, Echo.gel, as well as StartUp.c in this folder to your CCS project. (4) Assignment 1 Submission Save this project as “Echo Effect”, and you will need to submit it as one of the assignments. 3. Assignment 2: Flanging Effect (1) Theory The flanging effect is similar to the delay effect, except the amount of delay now varies dynamically with time (Fig 10.11). The basic FIR difference equation is where is a periodically varying delay value between 0 and 2 msec, with a low frequency no greater than 1 Hz. Flanging uses very short delays, while the previous delay and echo effects use much longer delays. The shorter delays of flanging give rise to comb filtering. It is the variance of the comb filter via the varying delay that gives flanging its sound. The flanging effect produces a pronounced whooshing sound, similar to a jet aircraft on taking off. (2) Tasks a. Implement flanging effect as shown in Fig 10.11. Feel free to use codec based ISR or EDMA based frame. approach, whichever you are more comfortable with. b. You would need to generate a sinusoidal varying delay to achieve this effect. Make one channel talk through and other channel having flanging effect to compare the two. (3) Hints a. For creating sinusoidally varying delay times for effects such as a flanger or chorus, consider creating the sinusoidal values for in the StartUp.c module. You don’t want to put something like that inside an ISRs.c which executes over and over again at the rate of the sample clock. where: is the maximum number of sample delays is some low frequency, no greater than 1 Hz b. If you would like to use codec based ISR to implement flanging effect, feel free to use this code in Book3rdEditioncodechapter10ccsEchoISRs_B.c (Implement FIR filter) in your CCS project. c. Remember to include Echo.h, Echo.gel, as well as StartUp.c in this folder to your CCS project. d. Remember to modify the StartUp.c for creating the sinusoidal values for (4) Assignment 2 Submission Save this project as “Flanging Effect”, and you will need to submit it as one of the assignments. 4. Assignment 3: Chorus Effect (1) Theory Block diagram of Chorus effect is shown in Fig 10.12 in textbook. To generate a chorus effect that makes one musician sound similar to four musician playing the same notes, three separate chorus signals (identical to flanging except having longer delay times) are summed with the original signal. (2) Tasks a. Implement chorus effect as shown in Fig 10.12. Feel free to use codec based ISR or EDMA based frame. approach, whichever you are more comfortable with. b. Make one channel talk through and other channel having chorus effect to compare the two. (3) Hints a. Remember to include Echo.h, Echo.gel, as well as StartUp.c in this folder to your CCS project. b. Remember to modify the StartUp.c for creating the sinusoidal values for (4) Assignment 3 Submission Save this project as “Chorus Effect”, and you will need to submit it as one of the assignments. 5. For your submission of the Final Project: (1) The entire completed CCS project for Section 2 (2) The entire completed CCS project for Section 3 (3) The entire completed CCS project for Section 4 (4) A word document explaining the following: i. your procedure of implementing the Echo effect and how this effect sounds like ii. your procedure of implementing the Flanging effect and how this effect sounds like iii. your procedure of implementing the Chorus effect and how this effect sounds like (5) Compress all above into one single zip file and name it with your Full Name and your partner’s Full Name. Thanks! 6. Grading Guide (1) Project forms 20% of the overall course grade. 80% of the grades would correspond to assignments. (2) Project Grading is as follows a. Echo effect - 20 % based on algorithm used, and the correctness of your code b. Flanging effect - 40 % based on algorithm used, and the correctness of your code c. Chorus effect - 30 % based on algorithm used, and the correctness of your code d. Remaining 10 % of the grade will be based on how correct your effect sounds! If your effect sounds as expected, you will get full credit. (You can check out these effects in WINDSK to get an understanding of how these effects sound. Chapter 3.2.3)
Introduction This assignment focuses on applying object-oriented programming principles and optimisation algorithms to solve the Traveling Salesperson Problem (TSP). You will extend a starter codebase in Java, implementing different algorithms and exploring the use of appropriate data structures to solve the problem efficiently. Throughout the assignment, you will develop modularised software, emphasising clean object-oriented design and effective use of abstraction through interfaces and inheritance. The objectives of the assignment align with all Intended Learning Outcomes (ILOs). You will demonstrate your ability to build larger software components using objects and modularisation (ILO1), apply fundamental data structures and algorithms to real-world computational problems (ILO2), and understand how these structures and algorithms work, including their trade-offs (ILO3). Additionally, you will explore recursion and divide-and-conquer techniques (ILO4), contrast the complexity and efficiency of algorithms (ILO5), and demonstrate computational thinking by solving unseen variations of the TSP problem independently (ILO6). This assignment is divided into four parts, with a total of 18 tasks. Each task consists of either a programming task or an analysis task, along with a corresponding reflection task. For the programming and analysis tasks, you will be required to make additions or alterations to the baseline code provided, implementing and testing different algorithms and data structures. The reflection tasks are designed to encourage you to think critically about your design choices, complexity analysis, and problem-solving approach. Your reflections should be documented in the provided report template, which you will submit alongside your code. Additionally, there is a word limit of 2,000 words for the entire report. While this limit will not be strictly enforced, failure to be clear and concise may affect your grade. Overly generic text that does not directly address your specific programming or analysis solution will not benefit you and should be avoided. Focus on providing thoughtful, precise reflections on your work. Use examples from your code and analysis to make your points. Part 1: Interface Design and Object-Oriented Structure Introduction In this part of the assignment, you will focus on designing a flexible and modular codebase using object-oriented principles. You will implement an interface that defines the structure for different TSP optimisation algorithms and refactor existing algorithms to conform. to this structure. This will allow the system to easily switch between different algorithm implementations. Additionally, you will create a class to encapsulate the TSP problem, separating the data from the logic used to solve it. This part emphasises clean software design, abstraction, and reuse, helping you to modularise larger pieces of software effectively. Tasks and Instructions 1. Create the OptimisationAlgorithm Interface a. Programming Task: Create an interface called OptimisationAlgorithm that declares a single method: DeliveryRoute findBestRoute(CityList cities). This method will serve as a contract for all optimisation algorithms. Your method should take a CityList object and return a DeliveryRoute object representing the optimal route found by the algorithm. b. Reflection Task: Write a few sentences explaining how designing an interface like OptimisationAlgorithm contributes to flexibility and modularity in your code. What benefits do you anticipate this design will bring as you continue to develop more algorithms? 2. Refactor Existing Classes to Implement the Interface a. Programming Task: Refactor the DeliveryRouteOptimiser (brute-force) and NearestCityOptimiser (greedy nearest-city) classes to implement the OptimisationAlgorithm interface. Ensure that the findBestRoute method in both classes uses the existing logic, and test your refactoring by running the main program to verify correctness. b. Reflection Task: In a few sentences, describe any challenges you encountered when refactoring the existing code to implement the interface. Did the new structure make it easier or harder to integrate the algorithms? Why? 3. Design the TSPProblem Class a. Programming Task: Design and implement a TSPProblem class that loads cities from a file and calculates the total distance of a delivery route. Your class should include a constructor to load cities into a CityList, a method to calculate route distances, and a private method to handle file loading. Make sure to test your calculateTotalDistance method with a known small example. b. Reflection Task: In a few sentences, explain how you structured the TSPProblem class and why. How does separating the problem data from the algorithm logic improve the overall organisation of the code? 4. Write Unit Tests with JUnit a. Programming Task: Write unit tests using JUnit to verify the correctness of your code. Test the TSPProblem class to ensure cities load correctly and distances are accurate. Write additional tests for both the DeliveryRouteOptimiser and NearestCityOptimiser to ensure that the findBestRoute method works as expected for small input problems. Test edge cases (e.g., two cities or no cities). b. Reflection Task: Write a few sentences on your approach to testing. What kinds of bugs or edge cases did your tests help identify? Did unit testing change how you approached your code design? Part 2: Algorithm Development and Optimisation Here, you will expand the range of optimisation algorithms available in the system by implementing two additional algorithms, with at least one involving recursion or divide-and-conquer strategies. You will build on your understanding of algorithm design, exploring how different methods can tackle the same problem with varying efficiency and accuracy. In addition, you will integrate unit testing to validate the correctness of your algorithms, ensuring that they work correctly for small TSP instances before tackling larger ones. Tasks and Instructions: 5. Implement a New Algorithm (Algorithm 1) a. Programming Task: Implement a new optimisation algorithm to solve the TSP problem. This algorithm can be a heuristic or metaheuristic approach, such as Simulated Annealing, Genetic Algorithm, or another well-known approach. Your implementation must adhere to the OptimisationAlgorithm interface, ensuring that it can be swapped out seamlessly with the previous algorithms. i. Requirements: 1. The new algorithm should provide a more efficient or approximate solution for larger problem sizes (e.g., 30 or 50 cities). 2. Make sure to test your algorithm with small problems to verify that it returns a valid route (visits all cities exactly once) and that the total distance is reasonably optimized. b. Reflection Task: Write a few sentences reflecting on the design of this algorithm. Why did you choose this particular approach? What advantages and disadvantages does it have compared to the brute-force or greedy nearest-city algorithms? 6. Implement a Backtracking Algorithm Using a Stack a. Programming Task: Implement a backtracking algorithm for the TSP using a stack to manage the cities visited. The stack will help keep track of the current route as the algorithm explores different paths. When the algorithm finds that a certain route is invalid or suboptimal, it will backtrack by popping cities from the stack and trying alternative routes. i. Requirements: 1. Implement the stack from scratch, using an array or linked list. 2. Use the stack to simulate the recursive backtracking process: pushing cities onto the stack as they are visited, and popping them off when backtracking occurs. 3. Ensure the backtracking algorithm adheres to the OptimisationAlgorithm interface, allowing it to be swapped with other algorithms. 4. Test the algorithm with the provided .txt files for small to medium-sized TSP problems (10, 20, 30 cities). b. Reflection Task: In a few sentences, reflect on the role of the stack in your backtracking algorithm. How did the stack make it easier to manage partial routes and backtrack when necessary? What challenges did you encounter in ensuring the stack was used correctly to track visited cities? 7. Write Unit Tests with JUnit a. Programming Task: Develop unit tests to verify the correctness of the two new algorithms using JUnit. Your tests should ensure that: i. Both algorithms return a valid route (i.e., they visit all cities exactly once). ii. The results for small problem sets (e.g., the 10-city problem) are compared with known optimal solutions or expected outcomes. iii. Edge cases (e.g., problems with very few cities) are handled correctly. b. Reflection Task: In a few sentences, describe your testing strategy for the new algorithms. What types of test cases did you prioritise, and how did you ensure that your recursive algorithm is functioning as expected? 8. Performance Comparison a. Programming Task: After implementing both new algorithms, compare their performance against the brute-force and greedy nearest-city algorithms. Run each algorithm on problem sets of increasing size (e.g., 10, 20, 30, 50 cities) and measure the time taken to compute a solution. b. Reflection Task: In a few sentences, summarise your findings. How do the two new algorithms perform. relative to the brute-force and greedy algorithms? Were there any surprises in terms of execution time or solution quality? Reflect on how algorithmic complexity influenced the performance of each approach. Part 3: Data Structures and Efficiency In this part, you will focus on using different data structures to affect the efficiency of your algorithms. You will explore different ways to represent the list of cities and refactor your code to use a more efficient data structure. By analysing and testing the performance of each structure, you will learn the trade-offs between different implementations. Unit tests will also play a key role in ensuring that your data structures function correctly as the basis for your algorithms. This part is crucial for understanding how the right data structure can impact algorithm performance. Tasks and Instructions 9. Modify CityList to Use a More Efficient Data Structure a. Programming Task: Refactor the CityList class to improve its efficiency. Currently, CityList is a custom implementation of a singly linked list. You will modify this class to use a more efficient data structure, such as an array-backed list (e.g., similar to ArrayList) or a doubly linked list. The goal is to reduce the time complexity for common operations (e.g., access, insertion, deletion). i. Requirements: 1. Maintain the original functionality of CityList while improving its internal structure. 2. Ensure the class still provides methods for adding cities, retrieving cities, and iterating through the list. b. Reflection Task: In a few sentences, explain why you chose the specific data structure (e.g., array-backed or doubly linked list) to replace the original singly linked list. How does this new data structure improve the efficiency of the TSP algorithms? What are the trade-offs, if any? 10. Analyse and Compare the Performance of the Refactored Data Structure a. Programming Task: Compare the performance of the refactored CityList with the original singly linked list. Measure and record the time it takes to perform. key operations (e.g., adding a city, retrieving a city) on both the original and modified versions for different list sizes (e.g., 10, 20, 50 cities). i. Requirements: 1. Write a method that measures the execution time of key operations in CityList. 2. Compare how the time scales as the number of cities increases. b. Reflection Task: In a few sentences, summarise your findings. How does the performance of your modified CityList compare with the original version? Did the new data structure perform. as expected when scaling to larger problem sizes? 11. Refactor NearestCityOptimiser to Use a More Efficient Evaluation Structure a. Programming Task: Refactor the NearestCityOptimiser class to use a more efficient data structure for evaluating and selecting the nearest city. Consider using a structure such as a hash map (or HashMap) for quick access to city distances or an adjacency matrix to store and retrieve the distances between cities. The goal is to improve the efficiency of selecting the nearest city, especially as the number of cities grows. i. Requirements: 1. Refactor the algorithm to use your chosen structure, ensuring that the nearest city can still be selected in a time-efficient manner. 2. Consider how the new structure can reduce the time complexity of finding the nearest city compared to iterating through all remaining cities for each step. 3. The new implementation should still adhere to the OptimisationAlgorithm interface. 4. Test the refactored NearestCityOptimiser on different problem sizes (e.g., 10, 20, 50 cities) using the provided .txt files to ensure correctness and performance. b. Reflection Task: In a few sentences, explain why you chose this specific evaluation structure and how it improved the performance of the NearestCityOptimiser. Reflect on the trade-offs between your chosen structure and other possible alternatives (e.g., array-based or iterative solutions). Did the new structure make a significant difference in the performance of the algorithm? 12. Write Unit Tests with JUnit a. Programming Task: Write unit tests to validate the correctness of the modified CityList and the refactored NearestCityOptimiser using JUnit. Your tests should: i. Verify that the new CityList implementation correctly adds, retrieves, and removes cities. ii. Test the NearestCityOptimiser to ensure that it still returns valid routes and that the performance improvements hold up under larger city sets. iii. Include tests for edge cases such as empty city lists or lists with only one or two cities. b. Reflection Task: In a few sentences, explain how your unit tests helped you identify potential issues in the refactored data structures and algorithms. Were there any unexpected bugs that surfaced during testing, and how did you address them? 13. Analyse the Impact on Overall Algorithm Efficiency a. Programming Task: After modifying the CityList and refactoring the NearestCityOptimiser, analyse how these changes have impacted the overall efficiency of the algorithms. Run the algorithms on problem sets of increasing size (10, 20, 30, 50 cities) and compare the time taken before and after the refactor. b. Reflection Task: In a few sentences, discuss your observations regarding the impact of the refactored data structures on the overall algorithm performance. Did the improvements make a significant difference, particularly as problem size increased? How did the complexity of the algorithms change as a result of the modifications? Part 4: Complexity Analysis and Algorithm Comparison This part is about evaluating the performance of your algorithms from both a theoretical and practical standpoint. You will perform. complexity analysis to understand the time and space efficiency of each algorithm, using Big-O notation. Then, you will compare the real-world performance of your algorithms by running them on different-sized TSP problems, recording and interpreting the results. This analysis will help your understanding of algorithm efficiency and its impact on computational problems, preparing you to reason about algorithmic complexity in future work. Tasks and Instructions 14. Perform. Theoretical Time Complexity Analysis a. Analysis Task: For each of the algorithms you’ve implemented so far (e.g., brute-force, nearest-city, genetic algorithm, recursive approach), estimate the theoretical time complexity using Big-O notation. Consider the following aspects: i. The time complexity of core operations, such as finding the nearest city or generating all permutations (for brute-force). ii. How the complexity scales with the number of cities (e.g., how does the algorithm behave as the number of cities increases from 10 to 50?). b. Discussion Task: In a few sentences, provide a short summary of your theoretical complexity findings. Which algorithm has the highest time complexity? Which algorithm has the lowest, and why? Reflect on how the choice of data structures affected these results. Justify your estimates. 15. Perform. Theoretical Space Complexity Analysis a. Analysis Task: Estimate the space complexity of each algorithm. Consider how much memory is required for storing cities, distances, intermediate results (e.g., population in the genetic algorithm), or recursive calls. Write down the Big-O space complexity for each algorithm. b. Discussion Task: In a few sentences, describe how space complexity differs between the algorithms. Which algorithm requires the most memory, and why? Did any specific data structures significantly influence space usage? Justify your estimates. 16. Empirical Performance Testing a. Analysis Task: Conduct empirical performance tests on each algorithm using the provided .txt files with different problem sizes (e.g., 10, 20, 30, 50 cities). Measure the time taken for each algorithm to find a solution and record the results. i. Use System.currentTimeMillis() or System.nanoTime() to time the execution of each algorithm. ii. Compare the runtimes across the different problem sizes to observe how each algorithm scales. iii. Capture the solution quality (e.g., total distance of the route) for each algorithm, as well as the runtime. b. Discussion Task: In a few sentences, compare the empirical runtime results with your theoretical analysis. Were there any discrepancies between the expected time complexity and the real-world performance? Reflect on how factors like problem size and implementation choices influenced the results. 17. Algorithm Comparison Based on Solution Quality a. Analysis Task: Compare the solution quality (i.e., the total distance of the route) produced by each algorithm for the same problem sizes. Record the total distance of the route found by each algorithm for each problem size (e.g., 10, 20, 50 cities) and observe how the quality changes. i. Consider which algorithm consistently finds the shortest route. ii. For heuristic algorithms like the genetic algorithm, test multiple runs to account for variability in the solution. b. Discussion Task: In a few sentences, reflect on the trade-off between solution quality and runtime. Did the faster algorithms (like nearest-city) find worse solutions than slower ones (like brute-force)? Were approximate algorithms able to achieve near-optimal results within reasonable time limits? 18. Summarise and Reflect on Complexity and Performance a. Analysis Task: Prepare a table like the example given in Table 1, or chart that summarises the following for each algorithm across all problem sizes: i. Theoretical time complexity (Big-O). ii. Theoretical space complexity (Big-O). iii. Empirical runtimes (in milliseconds or seconds). iv. Solution quality (total distance of the route). b. Discussion Task: In a few sentences, summarise your findings. Which algorithm strikes the best balance between performance and solution quality? How does problem size affect the scalability of each algorithm? Reflect on what you learned from both the theoretical analysis and the empirical testing. Algorithm Time Complexity Space Complexity Runtime (10 cities) Runtime (50 cities) Total Distance (10 cities) Total Distance (50 cities) Brute-force O(?) O(?) X ms X ms X km X km Nearest-city (refactored) O(?) O(?) X ms X ms X km X km New Algorithm O(?) O(?) X ms X ms X km X km Submission To submit your solution, you need to upload the following to as two separate files Canvas: 1. The report as a DOCX file a. Do not include your name anywhere in this file, only your student number b. Make sure you have clearly indicated which answer applies to which question and/or task in the assignment. 2. Your code as a ZIP file a. Only include the .java files b. Do not include any data files, .class files, or the report Use of generative AI 2 AI-Assisted idea generation and structuring AI can be used in the assessment for brainstorming, creating structures, and generating ideas to improving work. No AI content is allowed in the final submission