AP/ITEC 2620 3.0 INTRODUCTION TO DATA STRUCTURES Assignment Question 1 (15 marks) Short Answer (maximum 20 words): Answer all five parts below. Part A (3 marks): What is the average-case time complexity for binary search on a minimum- level BST with n elements? Explain. Part B (3 marks): The first time you run algorithm A on a dataset of n elements; it is faster than algorithm B. The second time you run algorithm A on a dataset of n elements; it is slower than algorithm B. Explain how this is possible. Give an example for algorithm A and algorithm B. Part C (3 marks): If both have n nodes and are sorted smallest to largest, will it be faster to find the smallest value in a sorted linked list or a minimum-level BST? Explain. Part D (3 marks): What is the time complexity to delete the root of a minimum-level BST with n nodes? Explain. Part E (3 marks): An implementation of quicksort has its worst case of O(n2) for an array in inverse sorted order. How long will this implementation of quicksort take on an array already in sorted order? Question 2 (10 marks) Complexity Analysis/Estimation: What is the complexity of the given code as a function of the problem size n? Show all of the details of your analysis. for (int i = 0; i < 2*n; i++) { if (i == n) { for (int j = 0; j < i; j++) for (int k = 0; k < i; k++) O(1) } else { for (int j = 0; j < i; j++) O(1) } } Question 3 (10 marks) Recursion: Write a recursive function that will calculate the height of a binary tree. Note: root1 and root2 are instances of the class BinNode: public class BinNode { public char value; public BinNode left; public BinNode right; } Thus, the following statements would lead to the underlined output: Example 1: System.out.println( treeHeight (root1) ); 3 Example 2: System.out.println( treeHeight (root2) ); 1
Data Science and Machine Learning in Finance (ACCFIN 5246) Problem Set 2 – Spring 2025 Question 1 The model is: yi = β1 + β2x1i + β3x2i + ui (1) At each step, state any additional assumption you need to use: (1.1) Derive the OLS estimators without using vectors/matrix notations. (1.2) Show that OLS estimator is unbiased. (1.3) Assume that, Discuss the behaviour of this estimator as sample size increases to a very large number n → ∞. (1.4) Comment on the previous part. In particular, can you think of a case where takes the form. above, and what would be the main purpose of such regression? Question 2 Consider the regression model: y = Xβ0 + u where y is T ×1, X is T ×k and rank(X) = k, β0 is the k×1 parameter vector, and u ∼ N(0T , σ02IT) where σ0 2 is unknown but a positive constant. (2.1) Using this result, propose a decision rule to test: H0 : Rβ0 = r HA : Rβ0 ≠ r where R and r are respectively a q×k matrix and a q×1 vector of constants. Define the test-statistic associated with this hypothesis testing in terms of R, r, etc. What would constitute a Type I error in this context and what is the probability of a Type I error associated with your decision rule? (2.2) Define the p-value of the test in previous part. Question 3 The model is: yi = β0 + β1X1,i + β2X2,i + ui for i = 1, . . . , N and we wish to test the null hypothesis: H0 : β1 = β2 = 0. (3.1) What is the alternative hypothesis? Re-write the regression model, and the null hypothesis in terms of notations used in the lecture (R, r, etc.), indicating the size of each variable. Using the null hypothesis, what are the numerical values for elements in R, r, etc. (3.2) What is the test statistic and its distribution when the variance of the error term is unknown? (3.3) Represent elements in (X′X)−1 = {cjk}. What is [R(X′X)−1R′]−1 in terms of cjk elements? (3.4) What is the test-statistic in terms of cjk elements? (3.5) Suppose the test conclusion is to reject the null, comment on this conclusion. (3.6) Suppose the test conclusion is to fail-to-reject the null, comment on this conclusion. Question 4 Consider the probability density function, f(x; θ) = λe−λx. Find the MLE of λ and its variance (assuming that the sample is i.i.d.). Question 5 Consider a simple linear regression model with non-stochastic regressors and i = 1, . . . , n: yi = α + βxi + ui (2) ui ∼ i.i.d N (0, σ2 ) (3) (5.1) Define the ML estimator for α and β. (5.2) Clearly stating any assumption you need, derive the ML estimators for α and β. (5.3) Is this estimator BLUE?
Operations Management (33:136:386:22-26) Spring 2025 Homework 1 – Due February 12th, Wednesday 11:50pm Instructions: All questions are from the textbook. Please submit over the Canvas website as a pdf or a word document. Other formats such as .jpg, .dvi, .eps will not be accepted as it makes the grading difficult, and sometimes impossible in the blackboard grading system. You could also write your homework in hardcopy and scan it. There are some free smart phone applications that would allow you scan your homework if needed. Please do not forget to define decision and the slack variables properly. Explain your work in detail to get full credit. For fairness reasons, late homeworks will be subject to a penalty of 5 points per hour of delay. Please make sure that the format of the homework is correct, because if the submitted files cannot be opened by a pdf viewer, we will not be able to accept resubmissions. 1. (50 points) Universal Claims Processors processes insurance claims for large national insurance companies. Most claim processing is done by a large pool of computer operators, some of whom are permanent and some of whom are temporary. A permanent operator can process 16 claims per day, whereas a temporary operator can process 12 per day, and on average the company processes at least 450 claims each day. The company has 40 computer workstations. A permanent operator generates about 0.5 claim with errors each day, whereas a temporary operator averages about 1.4 defective claims per day. The company wants to limit claims with errors to 25 per day. A permanent operator is paid $64 per day, and a temporary operator is paid $42 per day. The company wants to determine the number of permanent and temporary operators to hire in order to minimize costs. a. Formulate a linear programming model for this problem. b. Solve this model by using graphical analysis. 2. (50 points) A canning company produces two sizes of cans—regular and large. The cans are produced in 10,000-can lots. The cans are processed through a stamping operation and a coating operation. The company has 30 days available for both stamping and coating. A lot of regular- size cans requires 2 days to stamp and 4 days to coat, whereas a lot of large cans requires 4 days to stamp and 2 days to coat. A lot of regular-size cans earns $800 profit, and a lot of large-size cans earns $900 profit. In order to fulfill its obligations under a shipping contract, the company must produce at least nine lots. The company wants to determine the number of lots to produce of each size can ( and ) in order to maximize profit. a. Formulate a linear programming model for this problem. b. Solve this model by using graphical analysis. 3. (Bonus: 20 points) The Valley Wine Company produces two kinds of wine—Valley Nectar and Valley Red. The wines are produced from 64 tons of grapes the company has acquired this season. A 1,000-gallon batch of Nectar requires 4 tons of grapes, and a batch of Red requires 8 tons. However, production is limited by the availability of only 50 cubic yards of storage space for aging and 120 hours of processing time. A batch of each type of wine requires 5 cubic yards of storage space. The processing time for a batch of Nectar is 15 hours, and the processing time for a batch of Red is 8 hours. Demand for each type of wine is limited to seven batches. The profit for a batch of Nectar is $9,000, and the profit for a batch of Red is $12,000. The company wants to determine the number of 1,000-gallon batches of Nectar and Red to produce in order to maximize profit. a. Formulate a linear programming model for this problem. b. Solve this model by using graphical analysis. c. How much processing time will be left unused at the optimal solution? d. What would be the effect on the optimal solution of increasing the available storage space from 50 to 60 cubic yards? 4. (Bonus: 20 points). Excel problem “Julia’s Food Booth” from the book on page 113.
Algorithms and Data Structures I Lab 5: Stackjack Background The card game Blackjack is played all across the world. Blackjack uses a standard 52 playing card deck. There are many variations on rules, but for this Lab here are the ones you will need to know: - A hand consists of a stack of cards. - Each card has a respective point value: - Numeric cards (2 - 10) are worth that many points (e.g. a 5 is worth 5 points) - Face cards Jack, Queen, and King are worth 10 points - Aces can be worth either 1 or 11 points - A hand’s score is the sum of each of its cards’ point values - The Player plays against a Dealer - Whoever gets closest to 21 without going over wins - In the event of a tie, the Dealer wins Exercise First, download the starter code from this folder. The starter code includes the following files: - Lab5.java: Driver program. Use it to compare your output to the output shown here. - StackInterface.java: An interface for the Stack ADT - HandScorerInterface.java: An interface that has one method: - public int score(Stack hand) - LinkedStack.java: A complete implementation of Stack Interface that uses a linked chain/list - Card.java: A Card class. Has methods for retrieving the suit (hearts, spades, clubs, diamonds) and value (“2” , “3” , “4” , . . .”jack” , “queen” , “king” , “ace”) Second, take a look at the HandScorerInterface .java file. You will be responsible for following the comments in the interface file and implementing the score method in the HandScorer class. Here are some example hands and their scores: Hand Score 10, jack, ace 21 jack, queen, 8 28 ace, ace, ace, ace, ace, ace, ace, ace, ace, ace, ace (11 total) 21 2, 4, 6, jack 22 king, ace 21 10, 5, 10 25 Note: suits don’t matter in Blackjack, and Blackjack uses multiple hands so more than 4 of the same value card can appear in one hand. Your score method will likely remove items from the stack to count the score. Remember to add the items back before returning. The order of a Blackjack hand does not matter. Here is some sample output from running Lab5 .java (note, this uses a random number generator so your card values will likely be different than mine): Starting new game of Blackjack Dealer's cards: king of clubs 9 of clubs 3 of hearts 2 of clubs Dealer's score: 24 Player's cards: 8 of spades ace of diamonds Player's score: 19 Player wins! Deliverable You are required to submit only HandScorer.java, a class you created to implement the HandScorerInterface. The autograder will use the HandScorer class that you submit to evaluate some sample Blackjack hands to ensure correctness.
INF6027 Introduction to Data Science (AUTUMN 2024~25) 1. Introduction and Aims In this section, describe your selected problem or topic addressed in the report. This should include a brief summary of the literature around the topic, with sufficient references to support your arguments. You can also include figures from reliable sources to provide further evidence to support your narrative. You should also state why you chose this topic/problem and why you think it is an important topic to consider in this dataset. 1.1 Research aim: You should follow on from the motivations for the research, and explain what exactly is the aim of the research. 1.2 Research Questions: 1. List your research questions 2. For a project of this size, you can expect to have 3. at least two or three research questions 4. Ideally, research questions should be independent of the methodology and techniques 2. Methodology You should describe the process you have used to gather the data, pre-process and clean the data, conduct the analyses, visualise the data. You should explain how you have studied the data using exploratory data analysis and used this understanding to develop your analysis and experimental details. You should justify why you have chosen the methods you have, and what methods you could have used and why you didn’t use these other methods 2.1 Illustration of the methodology 2.2 Analysis First provide details of exploratory data analysis to demonstrate how you studied the data and how that helped you make decisions on your methodology. Then provide details of the methods you have used, the experimental setup, the training/test data split, the parameters of the models. Ask yourself: have you provided enough information for someone else to replicate your methodology and experiments? Will they achieve the same results? 2.3 Answering the research question How are these methods going to answer your research questions? Explain how each methodological component helps answer the specific relevant RQs. 3. Results and Discussions 3.1 Results In this section (and subsequent subsections), you should present the results of the analysis. Start by first presenting the results of the exploratory data analysis, to explain how you have studied the data, and what you have understood about the dataset. You should then explain the results of the experiments, present the relevant visualisations and/or tables and explain what these results tell you. You should avoid reading out the graphs/tables, but instead you should provide explanations of what they mean and what do these findings mean for the context of your research. 3.2 Discussions Present your discussions around the relevance of your findings, the implications and what you take out from the findings. 3.2.1 Answering the Research Questions RQ1: Answer: RQ2: Answer: … 3.2.2 Relation to existing research You should explain what these results mean in the context of the existing literature - are your findings supporting previous research or contradicting them? Why do you think that is the case? 4. R Code, GitHub Pages You should provide a link to your GitHub repository and pages. With illustrations/images/screenshots, you should explain how you have structured your GitHub pages, and provide links to: (i) your profile (ii) the INF6027 project page (iii) the INF4000 project page (this will be described in the INF4000 module) (iv) code (v) instructions on running the code and what information you have provided on GitHub. The GitHub pages are a resource that is meant for a potential client and/or your future employer so take care to make this look professional, and represent your academic/research profile appropriately. We will not mark your GitHub pages directly, but will study your code from the repository, and what you present in this section, in relation to what exists in the GitHub pages. 5. Conclusions You should first start with a summary of the project you have done in one/two paragraphs. Then move on to the next subsections 5.1 Key findings In bullet points, you should provide a set of key findings that you have identified in your results and discussions section 1. Key finding 1 - refer to which section this is identified as a finding 2. Key finding 2 - … 3. … 5.2 Limitations, Assumptions and Weaknesses Limitations 1. Limitation 1 - explain why it’s a limitation 2. Limitation 2 … 3. Limitation 3 … 4. … Assumptions 1. Assumption 1 - justify why this is a reasonable assumption 2. Assumption 2 … 3. Assumption 3 … 4. … Weaknesses 1. Weakness 1 2. Weakness 2 3. Weakness 3 4. … 5.3 Future Work 1. List a few directions on how you can take this research forward in the future 2. … Summarise your work in 2-3 lines discussing what you have learned from the process and conclude the paper. References References must be in APA format Please see this page for details
INF6027 – Introduction to Data Science Coursework Brief (100% of the module credits) Please note: This coursework involves using the same dataset as your INF4000 assignment. You must use the same dataset so that you can spend more effort in thoroughly understanding your data better. There are, therefore, two primary areas in the INF4000 and INF6027 assignment where you can benefit from using the same dataset. The primary purpose of the INF4000 module is to evaluate your ability to effectively present interesting findings using visualisations, your understanding of theories for constructing them, your rationale behind their design, your skill in critiquing them with real-world examples, and how they enhance topic comprehension. The primary purpose of the INF6027 module is to assess how you identify a problem based on a given dataset, and then conceptualise, design, and implement a data science project. We expect visualisations to be created in this module, particularly to help you in exploring the selected dataset(s) and presenting results of your analysis/models. You can therefore use the same or similar visualisations for the two modules, but they need to be differently contextualised, positioned and discussed. Introduction This assessment for INF6027 Introduction to Data Science comprises a piece of individual coursework to assess your ability to analyse data using R/RStudio and to then communicate your findings. Given a specific topic and dataset (see Section 2), you should identify a specific problem or topic you would like to investigate. You will then need to pre-process and analyse the dataset to identify patterns and relationships that address your selected problem/topic. This should involve using techniques learned throughout the practical sessions that will help you to demonstrate your R skills in conducting data science. This coursework aims to follow the stages involved in a ‘typical’ data science process: 1) define the question(s) to address (note, sometimes this does not come at the start of the process, but after initial exploration of the data); 2) gather data; 3) transform, clean and structure the data; 4) explore and analyse the data; and 5) communicate the findings of the data analysis. This often occurs in an iterative manner and centred on one or multiple questions you are seeking to address. For example, the data discovery process in Figure 1 presents an example of the stages involved in data discovery as an iterative process and you can find more details in Section 3. This is also similar to the data science process from the “ Doing Data Science” book (O’ Neil & Schutt, 2013). Fig.1 Example data discovery process (Johnes, 2014:p2) You should write a 2,800 word structured report (see Section 4) that describes the approach you have taken to explore and analyse the data for the selected problem/topic. Your report should clearly communicate the results of your data analysis and be written in a way that helps the reader interpret your findings. Note: charts, tables, and appendices are not included in the word count. This assessment is worth 100% of the overall module mark for INF6027. A pass mark of 50 is required to pass the module as a whole. Submission deadline: 2pm Monday 16th January 2025 via Turnitin. See Section 5 for more general information about Coursework Submission Requirements within the Information School. Dataset options There are a number of datasets you can choose from for this coursework. You must: ● Choose one primary dataset to analyse in your coursework, although some datasets may contain multiple files that you need to link and integrate. ● You can, if you choose to, combine multiple datasets (strictly within this list) and perform some data analysis. However, your focus of the study should be the primary dataset. ● There are multiple datasets on each topic, spanning over different time periods and each dataset has different characteristics that could be studied. You would likely need to join multiple files from one of the dataset or join multiple datasets. You must not use datasets outside the ones provided by us. This is because the use of a dataset will need ethics approval, which requires more time than we have for this assessment. The list of datasets are in Appendix A What you need to do The following sections describe what you need to do in order to carry out the coursework. This roughly follows the steps shown in Fig. 1, but you don’t have to be constrained by this or follow them in this particular order; it is just a suggestion. Also, all the R we have done in the practical sessions should be enough to conduct the coursework, although you may need to investigate certain areas further that relate specifically to the problem you tackle in your investigation. a) Review the literature and identify research question(s) As mentioned previously, you should select a specific problem/topic related to the data (the ‘question’ stage in Fig. 1). To decide what area to focus on you could start by undertaking a brief review of the relevant literature around the broad domain. As examples: Football: clustering of similar players, analysis of player and team statistics, predictive modelling between player statistics and match outcome, etc. Maneiro, R. et aol. (2019). Offensive Transitions in High-Performance Football: Differences Between UEFA Euro 2008 and UEFA Euro 2016. Front. Psychol. 10:1230 Sarmento, H. et al. (2014). Match analysis in football: a systematic review, Journal of Sports Sciences, 32:20, 1831-1843 Deprivation: comparison of different areas, correlation or predictive modelling between different indicators (e.g., are there any associations between certain indicators?), clustering of local areas based on different deprivation index, relation between deprivation and other population or socio- economic phenomenons (you may have to search for and join other datasets). Aungkulanon, S. et al. (2017). Area-level socioeconomic deprivation and mortality differentials in Thailand: results from principal component analysis and cluster analysis. Int J Equity Health 16, 117 Salvatore, M. et al. (2021). Area deprivation, perceived neighbourhood cohesion and mental health at older ages: A cross lagged analysis of UK longitudinal data, Health & Place, Volume 67, 102470 News dataset: analysis of news articles, sentiment analysis of news over time, studying news topics and correlations between topics, comparing manually generated categories with topic modelling. Rameshbhai, C. J., & Paulose, J. (2019). Opinion mining on newspaper headlines using SVM and NLP. International journal of electrical and computer engineering (IJECE), 9(3), 2152-2163. Liang, H., Ganeshbabu, U., & Thorne, T. (2020). A dynamic Bayesian network approach for analysing topic-sentiment evolution. IEEE Access, 8, 54164-54174. Stock/Share: clustering of similar stocks, sector analysis, temporal analysis of individual stocks or sectors, correlation between indicators (e.g., a particular kind of expense and income/profits). Liu, H., Huang, S., Wang, P., Li. Z. (2021). A review of data mining methods in financial markets. Data Science in Finance and Economics, 1(4): 362-392. Ng, K. et al. (2017). StockProF: a stock profiling framework using data mining approaches. Inf Syst E-Bus Manage 15, 139–158. Reviewing past literature will help you understand what kinds of analyses are undertaken in your chosen domain and provide a possible source of ideas for what you could do with the datasets mentioned in Appendix A You are highly recommended to discuss your ideas with the tutors in-class, as they may give you feedback on the feasibility of the idea and/or difficulties in finding related literature. Do not leave this too late as your tutors will receive an increased amount of queries towards the coursework deadline and this is better discussed through a chat than emails. All submissions must have research questions. b) Download, pre-process and explore the data As well as reviewing relevant academic literature you should also download some data as clarified above and perform an exploratory analysis (i.e. ‘play’ with the data), to better understand the dataset and also help you to identify a particular problem or topic you might want to focus on. This part of your investigation will include steps to pre-process and transform the data, such as cleaning up the data, dealing with missing values, standardising numeric values, etc. This may also include combining or joining the data with another dataset from the list of options (should you choose to do so). This reflects the ‘gather ’ and ‘structure’ stages in Fig. 1. (Note: this part of the analysis could take a lot of time so don’t underestimate how much time you will need to spend on this part of the coursework.) c) Analyse and explore the data As you identify a topic of interest for your analysis then you should identify the most appropriate techniques (using R and associated packages) for carrying out your analysis and exploring the data. E.g. for football, you might want to predict match performance for a player based on their statistics. This might also be an iterative process whereby you perform some analysis and then gather (or remove) more data. Where possible relate your analysis to the relevant literature. This relates to the ‘exploring data’ stage in Fig. 3. Note that this is often an iterative process: as you explore the data you may end up re-designing your research questions, having to gather more data or having to perform. further cleaning as more data quality issues arise. Again, this is all a part of the data discovery process. d) Write up your findings Once you have performed analysis on the data and have some results then you need to write up your investigation into a report (this is the ‘communicate’ stage of Fig. 1). The report should be structured as outlined in Section 4. Writing up will need to be done for two sets of readers: (i) the report will need to present your findings as would be expected from a research paper; (ii) a set of Git Hub pages where you present yourself and your project to a prospective employer/client. A research audience: You will be evaluated on your ability to plan and undertake data analysis and exploration of the problem based on your chosen dataset, your ability to engage with the relevant literature, your use of R (and appropriate packages) and RStudio to process and analyse the data, and the way in which you communicate your findings within the report for your given problem/topic. A prospective client/employer: You must also provide your R code, together with a summary of your key findings on Git Hub. The code must be commented, appropriately indented, using variable names that are appropriate. You should provide sufficient information on the code so that someone else can follow what you have done. The code should also be consistent (i.e. same standards across all code files). The Git Hub pages should be organised as follows: - Your own profile page, with your interests and professional skills - The INF6027 project page (either within your profile page or linked from your profile), where you present: - a brief introduction (3-4 lines), - your research questions, - key findings - The R code - Instructions for downloading and running the code - The INF4000 project page (this will be detailed in the INF4000 coursework brief) Please note: The Git Hub pages, including the code must not be changed after the submission deadline. Changes past the deadline will be checked on Git Hub history, and lateness penalties will be applied as usual to the mark if changes past the deadline have been made. The penalties are detailed in the section ‘ Information School Coursework Submission Requirements’ below. The minimum requirement to pass is to perform. at least one type of data analysis (e.g., clustering, prediction, time-series analysis, etc.) and include at least two visualisations (e.g., charts, maps, etc.) that communicate the findings of your data science activity in the report. To obtain a higher mark and more effectively communicate your findings, you may decide to use more than one dataset or present more than one type of data analysis and/or use multiple visualisations and/or use multiple strategies for analysis. Again, you should also engage as much as possible with the appropriate literature.
FN3142 Quantitative Finance PRELIMINARY EXAM 2017 Question 1 (a) Describe how one can test forecast optimality with a Mincer-Zarnowitz regression? 40 marks (b) Consider a forecast ytα of a variable, Yt. You have 100 observations of ytα and Yt and you run the following regression: yt = β0 +β1 ytα +μt The following results are obtained: Estimate std error t-statistic β0 -0.008 0.0052 -2.3329 β 1 1.6135 1.0399 0.1468 (i) What can be inferred from this output? 20 marks (ii) What hypothesis do you need to test in relation to a Mincer-Zarnowitz regression and what is your test and conclusion? 40 marks Question 2 a) What is the “efficient market hypothesis”? 30 marks b) Discuss two of the modifications/extensions/refinements of the original definition of the efficient market hypothesis. 40 marks c) How does “collective data snooping” relate to the efficient market hypothesis? 30 marks Question 3 Consider using a historical simulation method (HS) and a GARCH method for forecasting volatility. After building the so called hit variables: the following regressions are run, with standard errors in parenthesis corresponding to the parameter estimates: Hitt(HS) = 0.0814 + μt (0.0132) Hitt(GARCH) = 0.0207 + μt (0.0123) a) Describe how the above regression output can be used to test the accuracy of the VaR forecasts from these two models? 30 marks b) Based on the above tests what conclusions can you draw? 20 marks c) Does a simple GARCH(1,1) model capture the leverage effect? Explain. 20 marks d) Describe two members of the GARCH family of volatility models that do account for the leverage effect. 30 marks Question 4 Suppose the parameters in a GARCH(1,1) model: σn(2) = w + αun(2) 1 +βσn(2) 1 and ω = 0.00002, α= 0.003, β = 0.95 a) What is the long-run average volatility? 10 marks b) If the current volatility is 1.5% per day, what is your estimate of the volatility in 20, 40 and 60 days? 25 marks c) What volatility should be used to price 20-, 40- and 60-day options? 25 marks d) Suppose that there is an event that increases the current volatility by 0.5%, to 2% per day. Estimate the effect on the volatility in 20, 40 and 60 days. 20 marks e) Estimate by how much the event increases the volatilities used to price 20- 40- and 60 day options. 20 marks
FN3142 ZA BSc degrees and Diplomas for Graduates in Economics, Management, Finance and the Social Sciences, the Diplomas in Economics and Social Sciences Quantitative Finance Monday, 22 May 2017 : 10:00 to 13:00 Question 1 The probability density function of the normal distribution is given by where µ is the mean and σ 2 is the variance of the distribution. a [7 marks] Assuming µ = 0 derive the maximum likelihood estimate of σ 2 given the sample of i.i.d data (x1 , x2, . . . , xT ). b [8 marks] Now assume that xt is conditionally normally distributed as N(0, σt(2)) where σt(2) = ω + βσt(2)-1 + αxt(2)-1 Write down the likelihood function for this model given a sample of data (x1 , x2, . . . , xT ). c [10 marks] Describe how we can obtain estimates for {ω, α, β} for the GARCH(1,1) model and discuss estimation di culties. Question 2 Consider the time series process xt that follows xt = φxt-1 + σct where ct ~ N (0, 1) and φ < 1. a [5 marks] What is the unconditional mean of xt? b [5 marks] What is the unconditional variance of xt? c [5 marks] What is the first-order autocorrelation of xt? d [5 marks] What is the second-order autocorrelation of xt? e [5 marks] Given a sample of data (x1 , x2, . . . , xT ) you estimate the parameters of this process via OLS. Compute an analytical expression for the R2 in this regression and give an interpretation. Question 3 a [5 marks] Given a loss function L, an optimal forecast is obtained by minimising the conditional expectation of the future loss: Given the quadratic loss function L(y, ˆ(y)) = (y -ˆ(y))2 (2) show that the optimal forecast is the conditional mean. b [5 marks] Describe how one can test forecast optimality with Mincer-Zarnowitz re- gression. c [5 marks] Consider a forecast Y(ˆ)τ* of a variable Yτ . You have 100 observations of Y(ˆ)τ* and Yτ and run the following regression Yτ = Q + βY(ˆ)τ* + ετ and obtain the following results: Estimate Std Error α -0.10 0.02 β 1.51 0.30 what null hypothesis should you set up in order to test for forecast optimality? Can this test be conducted with the information given? d [10 marks] What can be inferred from the results table in part (c)? Question 4 a [5 marks] What is meant by serial correlation? Give an example of a process with zero serial correlation and an example of a process with positive serial correlation. b [10 marks] Malkiel (1992) stated that a capital market is e cient if it fully and correctly re ects all relevant information in determining securities prices. Thus, mar- ket e ciency is defined with respect to some information set Ωt. Describe the three commonly employed definitions of market e ciency that depend on the size of Ωt. c [10 marks] Which of the following observations could provide evidence against semi- strong form. market e ciency? In the case of observations that could go against market e ciency, explain what additional information would be needed to conduct a rigorous test. – Mutual fund managers do not on average make superior returns than the market. – In a particular year hedge fund managers make superior returns than the market. – Mutual fund managers do not on average make superior returns than the market. – On average hedge fund managers make superior returns than the market. – Low book-to-market stocks tend to have higher returns than high book-to-market stocks. – forming a portfolio that goes long stocks that have had large positive returns over the previous year and goes short stocks that have had large negative returns over the previous year generates superior returns than the market. FN3142 ZB BSc degrees and Diplomas for Graduates in Economics, Management, Finance and the Social Sciences, the Diplomas in Economics and Social Sciences Quantitative Finance Monday, 22 May 2017 : 10:00 to 13:00 Question 1 Imagine the following gamble. First, flip a fair coin to determine the amount of your bet: if heads, you bet $1, if tails you bet $2. Second, flip again: if heads, you win the amount of your bet, if tails, you lose it. For example, if you flip heads and then tails, you lose $1; if you flip tails and then heads you win $2.) Let X be the amount you bet, and let Y be your net winnings (negative if you lost). a [10 Marks] Show that the covariance between X and Y is zero. b [15 Marks] Show that X and Y are not independent. Question 2 Consider the zero-mean MA(1) process Xt : Xt = ut + δut-1 where ut i~.i.d N(0, σu(2)) a [5 Marks] Find E[Xt], Et [Xt+1], Et [Xt+2] b [5 Marks] Find √0 = Var[Xt] c [15 Marks] Derive the autocorrelation function (ACF). Now, imagine you have a parameter estimate of δ = 0.70. Plot the autocorrelation function as a function of the number of lags. Question 3 a [5 Marks] Assume daily returns that are normally distributed with constant mean and variance, i.e., they are given by Rt+1 = σνt+1 νt+1 i~.i.d N(0, 1) where the time increment t + 1 is 1-day. Derive the following formula for the Value-at- Risk at the α% (VaR) critical level and 1-day horizon. where Φ is the standard normal cumulative density function. b [10 Marks] Describe the ‘historical simulation’ and RiskMetrics approaches to mea- suring Value-at-Risk. c [10 Marks] The expected shortfall ESt α +1 at the critical level α% and 1-day horizon can be defined as Using the VaR formula from part (a) derive the following formula for the 1-day ex- pected shortfall at critical level α where φ is the standard normal probability density function. Hint: From the properties of the normal distribution we know that if z is normally distributed. Question 4 a [5 Marks] Roberts (1967) defines three types of information set available to investors: (i) weak form eflciency; (ii) semi-strong form eflciency; (iii) strong form eflciency. Report a definition for each of these. b [5 Marks] To which information set, if any, do the following variables belong? – Stock prices today. – The risk free rate today. – Next year’s production figures just approved by a company’s board of directors. – The nominal size of the short position George Soros has in European equity. – Stock prices tomorrow. c [5 Marks] What is the eflcient market hypothesis statement according to Malkiel (1992)? d [10 Marks] Black (1986) gives an alternative definition of market eflciency. What is it and why is Black’s definition diflcult to test?
ELEN 4810 Final Exam 1. The Z-transform. Consider the following pole-zero diagram: Please answer the following questions: (a). Suppose that the system is stable. What is the region of convergence? Is the system causal? (b). At what frequency or frequencies W is jH(ej! )j maximized? (c). At what frequency or frequencies W is the group delay grd[H(ej! )] maximized? (d). Which of the following best characterizes the system? LOWPASS HIGHPASS ALLPASS BANDPASS BANDSTOP (e). Suppose we express H(z) as H(z) = Hmin (z)Hap (z), where Hmin is minimum phase, and Hap is all-pass. Please sketch the pole-zero diagrams of Hmin and Happ , labeling poles and zeros. 2. Bilinear Transformation. We design an IIR discrete time filter, by starting from a continuous design Hc (s) with magnitude response Hc (jΩ) as below: You may assume that this filter was designed to approximate an ideal low-pass filter with cutof frequency Ωc = tan(π/16). We set and Please answer the following questions: (a) Which of the following types of filter is Hc (s)? BUTTERWORTH CHEBYSCHEV I CHEBYSCHEV II ELLIPTIC (b) Please sketch jH(ejω )j over the interval [0, π], labelling any cutof frequencies, and indicating which intervals of ω exhibit ripple. (c) Let β1, . . . , βN be the zeros of Hc (s). Please give an expression for the zeros ζi of H(z) in terms of β1, . . . , βN . (d) Please give an expression for the impulse response h[n] in terms of the impulse response h1 [n]. (e) Suppose we wish to achieve a sharper transition, without increasing the order of the filter. How can we modify our initial design Hc (s) to accomplish this? 3. FIR Filter Design. Consider two designs of finite impulse response (FIR) bandpass filters. Both designs have a target magnitude response We plot the gain 20 log1 0jHj and phase H for each: Please answer the following questions: (a). Which filter has the shorter length L? (b). Both filters are canonical generalized linear phase systems. What type are they, and why? (c). For the bottom design (H2 ), please use Chebyschev’s alternation theorem to give an upper bound on the length L of the filter. 4. Inverse Systems. Consider an LTI system with impulse response h[n] = δ[n] — 4δ[n — 2]. Let H(ej! ) denote its frequency response. Recall that an inverse system for h with impulse response hi [n] satisfies hi * (h * x)[n] = x[n] for any input x with ROC(x) ∩ ROC(h) ∩ ROC(hi ) ≠ 0, and ROC(h) ∩ ROC(hi ) ≠ 0. (a) Find the impulse response hi [n] of a stable inverse system for h[n]. Is your answer causal? (b) Find an impulse response g[n] of a system whose magnitude response is the same as jH(ej! )j (i.e., jG(ej! )j = jH(ej! )j for all ω), but which has a causal, stable inverse system. 5. Systems and Spectrograms. A continuous time “chirp” signal xc (t) = cos(Qt2 ) (10) is sampled with period T = 10-4s to produce a discrete-time signal x[n] = xc (nT). The signal x[n] is then passed through a stable LTI system with real-valued impulse response h[n] to produce an output signal y[n]. We generate spectrograms of jX[r, k]j and jY [r, k]j with a Hamming window w[n] of length 100, a time step R = 10, and a length-N = 200 DFT. More precisely, X[r, k] = DFTN {w[n]x[n + rR]} [k]. (11) Y [r, k] = DFTN {w[n]y[n + rR]} [k]. (12) The two spectrograms jX[r, k]j and jY [r, k]j are displayed below, for r = 0, . . . 45 and k = 0, . . . 100. (a) What is the chirp parameter Q? Please make the best estimate you can. (b) Please sketch the group delay grd(H(ej! ) as a function of ω . Please label the locations and heights of any local maxima or minima. You can use the axis on the following page for your sketch.
CSCI-UA.0202-001 Operating Systems Homework 1 Due: Wednesday, September 18, 2024 These problems should be done on your own. We’re not going to be grading them strictly (we’ll mainly look at whether you attempted them). But they will be reinforcing knowledge and skills, so you should totally work through them carefully. Please save your answers (and references) as a PDF file and upload it to Brightspace. Question 1 Alice is writing a simple program to practice the use of pointers. She uses the function add() to calculate the sum of two integers. Instead of returning the value, the function returns a pointer to the result. #include int *add(int a , int b) { int c = a + b; int *d = &c; return d; } int main() { int *result = add(1 , 2); printf("result = %d " , *result); printf("result = %d " , *result); } Surprisingly, Alice notices that if she prints the result for the second time, the result is wrong! So she turns to you for help. (1) Can you explain what’s happening here? (2) Alice insists that add() should return a pointer. Can you propose a way to fix it? Question 2 Bob is playing with the UNIX/Linux shell, and he is confused about the following commands … 1. echo 'echo cat' | cat 2. echo 'echo cat' > cat 3. echo 'echo cat' >> cat 4. echo `echo cat` | cat 5. cat
FIN 540 Week 2 Interpreting Exchange Rates Assignment Overview The aim of this assignment is to apply course concepts to a real-world scenario. In this assignment, you will practice utilizing exchange rates to calculate appreciation and depreciation. You will determine if exchange rates are fixed or floating and locate data for an exchange rate crisis. The skills you develop will help you for your Final Assignment: Trading Simulation, which you will work on later this semester. Activity Time: 15 hours Learning Objectives · Analyze direct and indirect exchange rate quotations and bid and ask exchange rates. (1.1) · Calculate cross exchange rates. (1.2) · Articulate the appropriate utilization of specific exchange rate quotations based on distinct circumstances. (1.3) · Describe currency regimes based on the observed behavior. of exchange rates. (2.1) Instructions For exchange rates, please go to https://www.xe.com/ When you click on a country on that list, you will see the quotation of that country’s currency against all the other countries’ currencies. Please refer to the column titled “Last”. You need the quote of that country's currency against $. For example, when you click EURO (FX), EURUSD is $/Euro exchange rate. 1. Download the exchange rates of at least 10 foreign currencies, including the US dollar. At least 2 of currencies must be from emerging markets. You are encouraged to work with more than 10 countries, which will increase the complexity of the exercise and you will be awarded more credit. 2. Choose a time window for this exercise. Compute the one-year appreciation or depreciation of each currency against the US dollar year to year within your chosen time window. The time window is your choice, but the longer the better! You will be awarded more credit for a longer time window.) Use the following formula: ($: US dollar, X: The foreign currency that you have chosen) St($/X) = Beginning Rate St+1($/X) = Ending Rate The % appreciation (or depreciation) in X can be calculated as; (Ending Rate-Beginning Rate)/(Beginning Rate) x 100 For example; if you are working on a 10-year time window; you will do the aforementioned calculation for 2008-2009, 2009-2010, 2010-2011….2018-2019. For example, to calculate the % of appreciation of € against $ from 2018 to 2019, you need to calculate the following; (Spot rate $ / € as of January 1st 2019-Spot rate $ / € as of January 1st 2018)/(Spot rate $ / € as of January 1st 2018) x 100 Explore recent exchange rate trends for the pairs of countries that you have selected (the US dollar vs. each country you selected). To plot trends, download the series to a spreadsheet. 4) Plot fixed and floating rates for all of the countries you identified. From the data, which countries are fixed and which are floating? Please justify and explain your conclusions. Based on the plots, how did you know which are fixed and which are floating? 5) In the plots, locate data for an exchange rate crisis within your time-window. Please justify and explain your conclusions. Based on the plots, how did you know this was an exchange rate crisis? Please see the file below for the further details about the assignment. Interpreting Exchange Rates Assignment.pdf Submission Requirements An Excel file that shows all work with calculations, including the following: · Identifies 10 or more countries used in this exercise and their exchange rates · Identifies a time window for the exercise and calculates the one-year appreciation or depreciation of each currency against the US dollar year to year within the chosen time window. · Plots of examples of fixed and floating rates and answers the question which countries are fixed and which are floating? Please justify and explain your conclusions. · In your plots, locate data for an exchange rate crisis within your time window.
Data Analysis Assignment PS931 - Bayesian Approaches to Behavioural Science Spring Term 2025 (updated: 2024-11-27) • This assessment counts for 42% of your overall grade. • Submission Instructions: Submit your solution as one html or pdf document containing both R code, R output, figures, and written text (i.e., full sentences) to Tabula as “Data Analysis Assignment”, by midday (12 noon), Monday, 17th February 2025 . • Please use RMarkdown to create the document. • Important: Your document should be called YOUR-STUDENT-ID_daa (followed by the correct file extension). Please also add your student ID to the top of the document. To enable anonymous marking, please refrain from using your name in either the document script or the file name. • Your text does not need to contain references (i.e., references to scientific papers). General Guidelines There are two tasks. Your answers should have two separate sections for each task, one immediately after the other. In the first section, write out your answers using complete sentences, as you would for the results section of a paper. Include descriptive statistics in the text, tables or figures, as appropriate. Tables and figures should be of publication quality (i.e., fully labelled, etc.). Integrate inferential statistics into your description of the results. Your answers might be quite short. Given the validity of the statistical analysis, the first section will play the main role for your mark. The second section should include the complete R code that you used and its output. Add comments (using a #) to explain what the code does. The code should show all of the commands that you used; enough to replicate exactly what you did (I will be copying and pasting code to run checks, so make sure that works). You can include additional figures in the second section that you used to explore the data, which you do not wish to include in the first section. I will use the second section to help identify the source of any mistakes. For practical reports and papers you would only submit the first section; thus the first section should stand alone without requiring the reader to refer to the second section. To help ensure that the instructions about the answer format are clear, before turning to your assignment tasks, we first provide an example question and an answer that covers the key aspects. Note that the example answer shows both parts, as is required from you. Example Question Does mere exposure to a stimulus improve its attractiveness? In an initial stage, participants were exposed to a series of pseudowords. Words were exposed for very short durations with a mask. (Pilot work established that participants were unable to report whether or not a word was presented before the mask in these conditions.) In a second phase, a mixture of the old, exposed, pseudowords and new, previously unseen, pseudowords were presented. Participants could view each word for as long as they liked before rating their liking for the word on a 1-10 scale. Using the data set mere_exposure .csv, test the hypothesis that mere exposure increases the attractiveness of pseudowords. Example Answer Section 1 (example) To investigate whether exposure to a word improves its attractiveness, 32 participants took part in an experiment in which their main task was to rate the attractiveness of pseudowords on a 1-10 scale. Before the main task, participants were shown half of the pseudowords for a very short duration so that they could not perceive them consciously. Figure 1 shows the distribution and means of the attractiveness ratings and suggests that pre-exposed pseudowords (i.e., those shown briefly before the main task) were rated as more attractive than new, previously unseen, pseudowords. We analysed the attractiveness ratings using an ANOVA with a single repeated-measures factor exposure (old versus new). The difference in ratings (difference = 1.82, SE = 0.12) was significant, F (1, 31) = 228.33, p < .001, BF10 > 4.9x1012 . Figure 1 . Attractiveness ratings of pseudowords as a function of prior exposure. Points in the background show the raw data (overlapping points are offset on the x-axis), black points in the foreground show the mean, error bars show 95% within-subjects confidence intervals. Section 2 (example) library ("tidyverse") library ( "afex") library ( "emmeans") mere_exposure Rows: 32 #> Columns: 3 #> $ id 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, ~ #> $ old_ liking 7.4, 6 .5, 6 .8, 7.8, 6 .9, 9.2, 6.2, 7.9, 6 .5, 9 . 1, 7. 6, 8 . 6,~ #> $ new_ liking 5.6, 5.4, 3.4, 5.2, 6.1, 8.0, 4.4, 6.1, 3.1, 6.4, 6 . 1, 7.8,~ me_tidy % pivot_longer(cols = -id, names_to = "Exposure" , values_to = "Attractiveness") %>% mutate (Exposure = factor(Exposure), id = factor (id)) str (me_tidy) #> tibble [64 x 3] (S3: tbl_df/tbl/data.frame) #> $ id : Factor w/ 32 levels "1","2","3","4", . . : 1 1 2 2 3 3 4 4 5 5 . . . #> $ Exposure : Factor w/ 2 levels "new_ liking","old_ liking": 2 1 2 1 2 1 2 1 2 1 . . . #> $ Attractiveness: num [1:64] 7.4 5.6 6.5 5.4 6.8 3.4 7.8 5.2 6 .9 6 . 1 . . . me_tidy %>% group_by(Exposure) %>% summarise (mean = mean (Attractiveness), sd = sd(Attractiveness)) #> # A tibb le: 2 x 3 #> Exposure mean s d #> #> 1 new_ liking 5.74 1.34 #> 2 old_ liking 7.56 1 . 01 ggplot(me_tidy, aes (Attractiveness)) + geom_histogram() + facet_wrap (~Exposure) (a1 Anova Table (Type 3 tests) #> #> Response: Attractiveness #> Effect df MSE F g es p .value #> 1 Exposure 1, 31 0.23 228 .33 *** .377 - - - #> Signif. codes: 0 ' *** ' 0.001 ' ** ' 0.01 ' * ' 0.05 ' + ' 0.1 ' ' 1 (a2 Bayes factor analysis #> - - - - - - - - - - - - - - #> [1] Exposure + id : 4 .822112e+12 ±0.85% #> #> Against denominator: #> Attractiveness ~ id #> - - - #> Bayes factor type: BFlinearModel, JZS pairs (emmeans (a1, "Exposure")) #> contrast estimate SE df t .ratio p .value #> new_ liking - old_ liking -1 .82 0 . 12 31 -15 . 110 hB . This heuristic will often correspond to expected utility, but will not always do so. The file repeated_choice .csv contains experimental data from a repeated measures factorial experiment that investigated how choices changed with repeated experience with the choices. Participants ( id) were presented with pairs of alternatives, each with different probabilities of two possible rewards, as above. There were 75 alternative pairs in the experiment, and participants were presented with all 75 pairs in each block. Over the course of several days, participants completed 6 blocks (Block) of the experiment. For each block we calculated as a dependent variable the proportion of trials that matched the predictions of expected utility (ExpectedUtilityMatch) and the proportion of trials that matched the predictions of the lowest value heuristic (LowestValueMatch). Please analyse the data using both a frequentist and Bayesian ANOVA (e.g., using afex and BayesFactor), using post-hoc tests where appropriate, and present the results as you would for a paper, using APA format. In other words, describe your statistical model and results and describe the conclusions with regard to the research question. Be careful not to draw unwarranted causal conclusions. In the first section for this task, include only one figure (which may contain multiple panels), with an appropriate figure caption.
College of Social Sciences Media Research Methods PGT level 2024/2025 Welcome to Media Research Methods Media Research Methods are those research techniques that look to uncover the meanings and significance of the wide variety of evidence that associated with research on, about or with the media. This includes a broad range of approaches and techniques so we focus on those you are most likely to use or encounter throughout your degree. The purpose of the course is to introduce students to a number of the most commonly used media research methods and to develop practical understandings of the methodological underpinnings, application and critical analysis of these methods for those studying media, culture and journalism. As such, the course provides an overview of methods within the social sciences, and then explores the various stages and processes students undertake to produce a coherent media research design. It will provide instruction on how to approach the practical aspects of media research in ways which centre ethical concerns and procedures such as data management and privacy, informed consent and effective referencing. This course guide offers details on the readings, the intended learning outcomes and an outline of the different sessions. Please read the course guide carefully and refer to it throughout the course of your study. Many of your questions about assignments, readings, and lectures can be answered by this document. Course Aims and Learning Outcomes The course is designed to give students grounding in the way in which media researchers conceptualise, select and apply particular methods and how they may fit into a broader understanding of media, culture and society. The broad aims of the course are to provide students with: ● a robust introductory knowledge of a range of media methods; ● the ability to identify and formulate appropriate research questions ● and the types of information and data which can deliver on them; ● the tools to apply media research methods such as online inquiry, content analysis, social media analysis and interviewing, ethically, and with skill and comprehension. Intended Learning Outcomes By the end of this course students will be able to: ● Build a critical understanding of the theoretical, political and professional context within which media research is located. ● Demonstrate a detailed and reflexive knowledge of a range of methods of media research and the appropriateness of their application in different contexts. ● Demonstrate a robust understanding of the process of constructing a research design with application of research methods including evaluation of sources, data collection and analysis strategies. ● Incorporate and apply a critical and reflexive understanding of research ethics when working with media professionals, audiences and online data, including data produced by social media users. ● Develop a detailed understanding of how to manage different datasets with appropriate attention given to GDPR, data privacy and data management. ● Evaluate the significance of the practical aspects of carrying out different forms of media research, such as formulating achievable aims and objectives, gaining ethics approval, and good referencing practice.
Prescriptive Models and Data Analytics Problem Set #2 1 Hospital admission & quality of service Download health data .csv and load it into python. These are data from hospital admissions for coronary artery bypass graft (CABG) in the UK. Among other things, you observe whether the patient died after the surgery (coded up as patient died dummy), which hospital the patient visited (hospital id), and a series of patient characteristics such as gender and age. Question 1. Start by regressing the patient-died dummy variable on a set of hospital dummies (a) Based on the regression output, interpret the coefficients on the constant term and the dummy for hospital D. (b) What is the difference between the mortality rates at hospitals D and E (use the regression output to derive this)? Causal interpretation (or lack thereof) Question 2. Continue to use the hospital data in this question, but only use data for patients that visited either hospital A or B. Regress mortality on an intercept and a dummy for whether the patient visited hospital B. (a) Explain why the difference in mortality rate implied by this regression cannot be interpreted as the causal effect of visiting a different hospital (i.e., the change in risk of dying when moving a patient from hospital A to B cannot be inferred from this regression). (b) Do you think difference in mortality between hospitals are over- or under-estimated? Think about what type of patients go to which type of hospital. (c) What are potential control variables that you might want to include in the regression, in order to obtain a causal estimate (or at least get closer to a causal estimate)? Run such a regression with suitable controls and interpret the change in the coefficient on the hospital B dummy. Explain why you included the specific set of variables. 2 Demand estimation The dataset demand data .csv contains data on sales and prices at a set of ice-cream vendors measured over 52 weeks. All ice-cream at a given store is always priced the same, so there is only one price variable. However, different vendors charge different prices and most vendors vary their prices throughout the year. Question 1. Load demand data .csv into Python. For vendor 1, run a regression of sales on price and also a regression of sales on price and a summer dummy (make sure your regression selects only the 52 weeks of data for vendor 1). Use the omitted variable bias formula to explain why the price coefficient changes when the summer dummy is also included in the regression. Question 2. Repeat the two regressions that you just ran in question 1, but now use data only for vendor 2. In the case of the regression with the summer dummy, you should find that there might be multicollinearity problems. Why does this happen? Question 3. Suppose that one of the vendors did not systematically charge higher or lower prices in summer. If you were to repeat the analysis you just did for vendors 1 and 2, what would you expect to happen to the price coefficient estimate and its precision in the two regressions with and without the summer dummy?
Mechatronics 5CCE2MCT Individual Coursework Project Analysis of the AEK Bike Drivetrain You are a mechatronics design engineer working for Arduino on the new generation of Arduino Engineering Kit Bicycles (rev3). Your team specialises in the procurement and testing of electromechanical components for its production. Your manager has sent you a parametric model of the rev2 version of the bicycle that was developed from a previous project. The model simulateshow the bike moves in response to the actuation of geared DC motor (GM12-N20VA-08225-100-EN) currently shipped with the kit. Brief Your manager has asked you to analyse the electromechanical actuation system composed of the geared DC motors that drives the timing belt and pulley train that spins the rear wheel, shown in Figure 1. She provided CAD components and Simulink starter models for the assembly, n.b. these files can be downloaded from the KEATS module page in the MATLAB project archive, bike_rear_motor.mlproj. She has also sent you a list of specifications that she has discussed with the user experience team and has appended to the end of this document. She encourages you to use the model as a starting point and welcomes further input on how to improve the mechanical design. You are responsible for: • specifying DC motor, power supply, and gearbox characteristics • design adigital motor controller to test bike movement • demonstrate the effectiveness of your design. You are highly encouraged to brainstorm additional information about the context in which this mechanical system is to be used. Deliverables • a 3-minute video recording in which you present the motor and mechanism design to an engineering design team. The video should contain an animation of the mechanism and an overview of the Simulink model and results. • a 1-page written report presenting the results of your design analysis with a maximum of 2 page of supporting figures in appendix • zip and upload Simulink model to KEATs Figure 1: Bike drivetrain system details, showing (a) bike assembly, (b) drivetrain assembly closeup, and (c) geared DC motor assembly. Learning objectives • Model the electromechanical system that actuates the bike using a combination of mathematical, physical and data-driven methods and critique the choice of your modelling approach • Specify component parameters based on a design analysis of system requirements • Implement and tune a feedback controller to control position and speed of the mechanism • Test the controller design against multiple operating scenarios • Conduct a design space study tooptimise system-level performance • Report and justify recommended design implementation
PRACTICE EXAMINATION ECON 2331 • ECONOMICS AND BUSINESS STATISTICS 2 PART A—Multiple-Choice Questions (30 marks total) Please circle the letter of the correct answer directly on this exam paper. (1 mark each) 1. The critical value of t for a two-tailed test with 6 degrees of freedom using α = .05 is: a. 2.447. b. 1.943. c. 2.365. d. 1.985. 2. The sum of the values of α and β: a. is always 1. b. is always .5. c. gives the probability of taking the correct decision. d. is not needed in hypothesis testing. 3. What type of error occurs if you fail to reject H0 when, in fact, it is not true? a. Type II b. Type I c. either Type I or Type II, depending on the level of significance d. either Type I or Type II, depending on whether the test is one-tailed or two- tailed 4. For a given sample size in hypothesis testing: a. The smaller the Type I error, the smaller the Type II error will be. b. The smaller the Type I error, the larger the Type II error will be. c. Type II error will not be effected by Type I error. d. The sum of Type I and Type II errors must equal to 1. 5. If the null hypothesis is rejected in hypothesis testing: a. No conclusions can be drawn from the test. b. The alternative hypothesis is true. c. The data must have been accumulated incorrectly. d. The sample size has been too small. 6. When the following hypotheses are being tested at a level of significance of α H0: μ 500 Ha: μ < 500 the null hypothesis will be rejected, if the p-value is: a. ≤ α. b. > α . c. = α/2. d. s 1 - α/2. 7. A machine is designed to fill toothpaste tubes, on an average, with 5.8 ounces of toothpaste. The manufacturer does not want any underfilling or overfilling. The correct hypotheses to be tested are: a. H0: μ ≠ 5.8 Ha: μ = 5.8. b. H0: μ = 5.8 Ha: μ ≠ 5.8. c. H0: μ > 5.8 Ha: μ ≤ 5.8. d. H0: μ ≥ 5.8 Ha: μ < 5.8. 8. The sampling distribution for a goodness of fit test is the: a. Poisson distribution. b. t distribution. c. normal distribution. d. chi-square distribution. 9. The number of degrees of freedom associated with the chi-square distribution in a test of independence is: a. number of sample items minus 1. b. number of populations minus 1. c. number of rows minus 1 times number of columns minus 1. d. number of populations minus number of estimated parameters minus 1. 10. When individuals in a sample of 150 were asked whether or not they supported capital punishment, the following information was obtained. We are interested in determining whether or not the opinions of the individuals (as to Yes, No, and No Opinion) are uniformly distributed. The expected frequency for each group is: a. .333. b. .50. c. 1/3. d. 50. 11. The test statistic for goodness of fit has a chi-square distribution with k - 1 degrees of freedom provided that the expected frequencies for all categories are: a. 5 or more. b. 10 or more. c. k or more. d. 2k. 12. The ANOVA procedure is a statistical approach for determining whether or not the means of: a. two samples are equal. b. two or more samples are equal. c. two populations are equal. d. three or more populations are equal. 13. In an analysis of variance problem involving 3 treatments and 10 observations per treatment, SSE = 399.6. The MSE for this situation is: a. 133.2. b. 13.32. c. 14.8. d. 30.0. 14. When an analysis of variance is performed on samples drawn from k populations, the mean square due to treatments (MSTR) is: a. SSTR/nT. b. SSTR/(nT - 1). c. SSTR/k. d. SSTR/(k - 1). 15. In an analysis of variance problem if SST = 120 and SSTR = 80, then SSE is: a. 200. b. 40. c. 80. d. 120. 16. In an analysis of variance, one estimate of σ2 is based upon the differences between the treatment means and the: a. Means of each sample. b. Overall sample mean. c. Sum of observations. d. Population means. 17. Part of an ANOVA table is shown below. Source of Sum of Degrees of Mean Variation Squares Freedom Square F Between Treatments 180 3 Within Treatments (Error) TOTAL 480 18 The mean square due to treatments (MSTR) is: a. 20. b. 60. c. 18. d. 15. 18. If we are testing for the equality of three population means, we should use the: a. test statistic t. b. test statistic z. c. test statistic F. d. test statistic χ2. 19. A test used to determine whether or not first-order autocorrelation is present is: a. serial-autocorrelation test. b. t test. c. chi-square test. d. Durbin-Watson Test. 20. In multiple regression analysis, the general linear model: a. Cannot be used to accommodate curvilinear relationships between dependent variables and independent variables. b. Can be used to accommodate curvilinear relationships between the independent variables and dependent variable. c. Must contain more than two independent variables. d. Cannot use the standard multiple regression procedures for estimation and prediction. 21. Which of the following tests is used to determine whether an additional variable makes a significant contribution to a multiple regression model? a. a t test b. a z test c. an F test d. a chi-square test 22. In regression analysis, the error term ε is a random variable with a mean or expected value of: a. 0 b. 1 c. μ d. x 23. The coefficient of determination: a. Cannot be negative. b. Is the square root of the coefficient of correlation. c. Is the same as the coefficient of correlation. d. Can be negative or positive. 24. If the coefficient of determination is a positive value, then the coefficient of correlation: a. Must also be positive. b. Must be zero. c. Can be either positive or negative. d. Can be larger than 1. 25. In regression analysis, the unbiased estimate of the variance is: a. Coefficient of correlation. b. Coefficient of determination. c. Mean square error. d. Slope of the regression equation. 26. Which of the following is not present in a time series? a. seasonality b. cross-sectional pattern c. trend d. cyclical pattern 27. The component that reflects unexplained variability in the time series is called a. A trend component. b. Seasonal component. c. Cyclical component. d. Irregular component. 28. The following linear trend expression was estimated using a time series with 17 time periods. Tt = 129.2 + 3.8t The trend projection for time period 18 is: a. 68.4. b. 193.8. c. 197.6. d. 6.84. 29. The forecasting method that is appropriate when the time series has no significant trend, cyclical, or seasonal effects is: a. Moving averages approach. b. Decomposition model. c. Simple linear regression. d. Qualitative forecasting method. 30. Using a naive forecasting method, the forecast for next week’s sales volume equals: a. The most recent week’s forecast. b. The most recent week’s sales volume. c. Tthe average of the last four weeks’ sales volumes. d. Next week’s production volume. PART B—Define/Describe/Distinguish (12 marks total) In your own words, define/describe/distinguish between the following. Write your answers in one of the exam answer booklets. (3 marks each) 1. Multiple Regression Analyses 2. Time Series Analyses 3. Tests for Goodness of Fit Part C—Short-Answer Questions(38 marks total) In one of the exam answer booklets, write your answers to all of the following questions (marks as indicated) 1. Assume that the mean wage of employees is $25.00 and the standard deviation is $3.00. A sample of 36 employees finds a sample mean of $26.00. Conduct a test to determine if the mean wage is different from the population. (5 marks) a. State the null and alternative hypotheses b. Compute the standard error of the mea c. Compute the value of the appropriate test statistic d. Make a decision based on a critical z-value of 1.96 2. The following two tables summarize the amount of time in minutes that it took an employee to drive to and from the office each day for one week. (6 marks) a. Name two possible ways to test if the amount of time it takes the employee to commute to and from work is different in the morning and late afternoon. b. How do the assumptions of these two methods differ? c. Which of these methods would be the most appropriate for this data? 3. Telus wants to charge new consumers a premium to connect them if the service person spends more than 15 minutes to connect the new customers. A sample of 36 connections indicate that the mean time is 17 minutes. Based on this sample should Telus charge a premium? The population standard deviation is 4 minutes. (6 marks total) a. State the null and alternative hypotheses and compute the value of the test statistic. (4 marks) b. What conclusion would you reach? Explain why? (2 marks) 4. Use the data above to conduct an appropriate test to see if the mean value of stock prices has changed between last year and the current year. Level of significance α = 0.05. (6 marks)
CSCI-UA.0202-001 Operating Systems Homework 3 Due: Wednesday, October 16, 2024 These problems should be done on your own. We’re not going to be grading them strictly (we’ll mainly look at whether you attempted them). But they will be reinforcing knowledge and skills, so you should totally work through them carefully. Please save your answers as a single PDF file and upload it to Brightspace. Question 1 Alice has learned that the function strncpy() can be used to copy a string. So she writes the following code to try it out. However, the result isn’t what she expects. #include #include int main() { char str1[4] = "1234" ; char str2[4]; strncpy(str2, str1, sizeof(str2)); printf("str2 = %s " , str2); } Can you explain this issue to Alice and help her correct it? Question 2 Now, Alice wants to see if strncpy() can be used to copy other types of arrays. So she writes the following code. Since strncpy() only accepts char * arguments, she uses a trick: she casts the integer arrays to char * type. #include #include int main() { int arr1[4] = {1 , 2 , 3 , 4}; int arr2[4]; strncpy((char *)arr2, (char *)arr1, sizeof(arr2)); printf("arr2 = "); for (int i = 0 ; i
CEGE0030 – Roads and Underground Infrastructure TUNNELS COURSE WORK - This coursework will be done in groups of 3 persons. - As part of the coursework, you need to define a group leader to communicate with the coursework coordinator - As a group you must organise meetings to discuss the coursework progression and create minutes that will be used to demonstrate how you divided the work and how you have informed your peers. A simple and effective model of the minutes is available for download on moodle and these must be attached to the end of your submitted coursework. - These documents are the only way to calculate a scale factor to derive the individual mark, from the final coursework mark. Small differences in workload are expected but you should balance the proportion of work amongst group members. Introduction and scope of the project Your team is required to design the northern branch of the Crossrail 2 (CR2) line, going from Alexandra Palace to Seven Sisters (Figure 1); however, rather than having a stop at Turnpike Lane station, your stop must be at Wood Green station. New Southgate will be a terminal station and the exact location of the portal has not been defined yet. Your design should consider that the springline of your tunnel is located at a depth of 20m below Alexandre Palace station, at an alignment similar to the railway alignment aboveground; this is your starting point. The running tunnels, at Seven Sisters, must be pointing south, towards Dalston Kingsland, aligned with the A10 near Seven Sisters station. The client also wants Seven Sisters station on the CR2 line, to have access to both South Tottenham station on theovergroundlineandSevenSistersStationontheVictorialineand Rail Network. Therefore, you must decide where the platform. tunnels will be located, to give the best possible access to the lines mentioned above. During the design, the following aspects (not limited to) must be considered: -A geotechnical soil profile along the route must be created, together with the likely problems that may be encountered during the excavation of the tunnels. - Horizontal and Vertical alignments of the tunnel, as well as the geology excavated must be supplied. - The line will be composed by twin tunnels with an internal diameter of 7 m. - A definition of the type of TBM machine that shall be used, as well as an estimation of the pressures required by the ground, in order to allow excavation to proceed safely must be calculated and shown in the report. -Shafts for ventilation and emergency access to the tunnels must be designed along the line. Your team must decide what is the best location for the shafts, as well ashow it will influence the alignment. A small paragraph with an explanation must be provided. Figure 1 – Part of the Crossrail2 project to be designed inside the red circle. -Platform. tunnels must be located as near as possible to the existing stations. At this stage stations will not be redesigned but connection to the existing stations and location of the escalator tunnels must be specified on the drawings of your proposed station and connections. -A calculation of the stresses likely to be encountered on the tunnel lining and caused by the soil load, together with a surcharge of 65kPa, must be calculated. -A settlement through must be created considering a face loss of 0.25, 0.5 and 1.0%, over the whole area of the tunnel. -An analysis of the structures that are likely to suffer from differential settlements, between Wood Green and Seven Sisters stations must be performed. This must include listed buildings. Deliverable You are required to write a report, with no more than 2000 words in the main text (excluding captions, references, summary and index), explaining briefly your considerations and assumptions. Most of the information should be conveyed with drawings and sketches and there is no limit for these. Please make sure that your drawings or sketches have scales and areworded to convey the right information. Sketches without a number or a name will be ignored and not considered on the marks. At the end of your coursework, a set of meeting dates and minutes, describing what was agreed and spoken during the meetings may be submitted as an appendix – there is no limit of words. This part will only be used in case there are disputes related how much each team member has contributed to the final report.