FIT1043 Assignment 3: Specification Due date: Friday 18th October 2024 - 11:55 pm Aim Assignment 1 & 2 walked you through what you have learnt in Lectures 1 to 7 and also the Collection, Wrangling, Analyse and Present phases of our Standard Value Chain. It provides you an introduction to the data science lifecycle. This assignment is related to the latter part of this unit, where we used BASH shell and R programming language to work with large datasets. It will test your ability to: ● Read a reasonably large dataset, ● Process the dataset using BASH Shell Scripts, ● Conduct aggregation of the dataset content, ● Read data from a file in R, and ● Generate appropriate visualisations in R and output to files. Data The dataset for this assignment is available on Moodle. It is a compressed file that contains pre-processed twitter content sourced from Sentiment140 Dataset on Kaggle. The original source contained 1.6 million tweets, extracted using the Twitter API and they have been labelled as negative (0), neutral (2), or positive (4). The data on Moodle for this assignment is a subset of the original dataset. The columns are the same, and are as follows: ● target: the polarity of the tweet (e.g., 0 = negative, 2 = neutral, 4 = positive) ● ids: The id of the tweet (e.g., 2087) ● date: the date of the tweet (e.g., Sat May 16 23:58:44 UTC 2009) ● flag: The query. If there is no query, then this value is NO_QUERY. ● user: the user that tweeted (e.g., robotickilldozr) ● text: the text of the tweet (e.g., Lyx is cool) Note: You will need to use either a Linux machine, a Mac terminal or Cygwin on a Windows machine for this purpose. For those who are more curious, the paper describing the dataset is as follows: ● Go, A., Bhayani, R., & Huang, L. (2009). Twitter sentiment classification using distant supervision. CS224N project report, Stanford, 1(12), 2009. Hand-in Requirements Please hand in a single PDF file only and a video file (refer to Task B). PDF file should consist of: 1. Answers to the questions. In order to justify your answers to all the questions, make sure to a. Include screenshots/images of the graphs or outputs you generate (You will need to use screen-capture functionality to create appropriate images.) b. Explain what each part of the command does for all your answers. For instance, if the code you use is ‘unzip tutorial_data.zip‘, you need to explain that the code is used to uncompress the zip file. c. Copy and paste your Unix code from Bash Shell and the R code (Do Not include screenshots of your code). d. Kindly Do Not copy the questions, else you might have high Turnitin similarity due to all submissions referring to the same set of questions. Assignment Tasks: In this assignment you will work with a large data set (in this case, just more than a million lines of data) and will use shell scripts to process and aggregate data. In the whole exercise, you must NOT uncompress the data and store it. Once the data is aggregated and properly formatted, you will then read the data in R to conduct further analysis. In this assignment you will only use R to read some data and provide visualisations for the latter tasks. Note, for this assignment you are required to write shell commands to answer all questions in Task A unless the instructions specify using R code. Task A: Download the file FIT1043_Dataset.gz from Moodle. Use the BASH shell to manipulate the file and answer the following questions. Show the BASH shell command you used and also the displayed output where appropriate. A1. Inspecting the data (3 marks) 1. State the size (in Bytes or MegaBytes) of the FIT1043_Dataset.gz file and provide the shell command that you used to determine the size. 2. What delimiter is used to separate the columns in the file? Do illustrate how you deduced this. 3. How many lines are there in the dataset? Again, provide a single line code on how you obtained it. A2. Information from Data (5 marks) 1. How many unique users are there in the dataset? Provide a single line of code that uses the “awk” and “uniq” commands. You are also required to read the “man” pages of the “uniq” command to figure out if it is sufficient to answer the question. Explain the code you provided. 2. What is the date range for the Twitter posts in this file? (Assume that the data is ordered by date in chronological order) 3. For each of the sub-questions below, provide a single line code (one each) and briefly explain your code. a. How many tweets mentioned the word “France” in any combination of uppercase or lowercase letters . b. How many of those are not spelt exactly “france” or “France” but in other combinations of uppercase and lowercase (e.g., FRance or francE). c. Output the lines of A2.3 (b) into a file called myText.txt (not the number of lines but the specific lines that are returned). A3. Data aggregation (4.5 marks) 1. Find the total number of negative, neutral, and positive tweets that mentioned the word “USA” (ignore case). Then find the total number of negative, neutral, and positive tweets that mentioned the word “Canada” (ignore case). 2. Store the data from A3.1 in files named sentiment-USA.csv and sentiment-canada.csv respectively, using the following output format (Note, you can manually create the csv files using output numbers from the shell commands): Negative, 99 Neutral, 99 Positive, 99 3. [R Code] Use the files sentiment-USA.csv and sentiment-canada.csv from A3.2 and read both files using R. 4. [R code] Using the data from both countries, plot two separate bar charts: one for the USA and one for Canada. Then copy the bar charts and paste them in your PDF report. You will get a bonus mark if you plot a side by side bar chart instead of two separate bar charts. 5. In your report, analyse and discuss the differences observed between the two bar charts, considering aspects such as overall sentiment distribution. A4. Small Challenge (3.5 marks) Let’s assume that we want to consider tweets that contain the word “Australia” from the data provided. 1. To answer this question, you will need to first extract the timestamps of the tweets (date column) referring to “Australia” (ignore case) using the BASH Shell, and save the timestamps into a file named aus_time.txt. 2. [R code] You will then need to read aus_time.txt in R. Note that R will not recognise the strings as timestamps automatically, and for this task you are to convert them from text values using the strptime()function. Instructions on how to use the function are availablehere. You will need to write a format string, e.g., starting with “ %a %b” to tell the function how to parse the particular date/time format in your file. Explain this in your answer. 3. [R code] Using the data processed in A4.1 and A4.2, calculate the number of tweets for each day. After performing this aggregation, create a histogram to visualise the daily tweet counts. Discuss the distribution of tweets in your histogram, noting any patterns you observe. Task B: Video Preparation (4 marks) Presentation is one of the important steps in a data science process. In this task you will need to prepare an up to 3 minutes video of yourself (you can share your code on screen) and describe your approach on the above task (Task A4). ● Please make sure to keep your camera on (show yourself) during recording. Clarifications Do use the Ed Forum so that other students can participate and contribute. For postings on the forum, do use it as though you are asking others (instead of your lecturer or tutors only) for their opinions or interpretation. Just note that you are not to post answers directly. Congratulations! You have completed all FIT1043 assignments and you will have only the final exam left. I do hope that you have been well introduced to the world of Data Science, which still requires significant effort and there is lots more to learn. Hopefully those skills will contribute to your lifelong learning!
EARTHSS 17: Catastrophes Discussion 2: Tectonic Maps and Drawing Cross-Sections Part I: Tectonic Maps At right is a tectonic map of New Zealand, which is situated on several different boundaries. Use the image to answer the questions that follow. On the map: 1. Place a triangle in all locations where you would expect to find volcanoes 2. Star all of the locations where you would find shallow earthquakes 3. Put an “x” at a location where you would expect deep earthquakes 4. Lable a convergent, divergent, and transform. boundary. 5. Which plate is more dense? The Australian Plate or the Pacific Plate? Defend your answer. 6. Which population (City A or City B) would be most prone to a catastrophe? Use the chart below to inform. your decision and to defend your answer. Population Mean Building Age Mean Income/Household CITY A 383,000 60 years $65,000 CITY B 1,300,000 40 years $161, 886 Part II: Sea Floor Spreading 1. An ocean now exists between two Continents (A and B). Using the magnetic reversals, determine approximately when the supercontinent first broke apart. Part III: Drawing Cross-Sections 1. Your TA will provide you with a birds-eye view of South America (i.e. a satellite view). Study the image and discuss with your group where there appears to be oceanic crust, continental crust, mountains, and trenches. Sketch a cross section (side-on view) in the box below, showing what you would expect the lithosphere and asthenosphere to look like in an east-west cross-section across South America, from point X to point Y. Include approximate crustal thicknesses; try to draw it to scale. On your drawing, label (A) a trench, (B) a volcanic mountain chain, (C) the oceanic plate and (D) the continental plate. Include the lithosphere and asthenosphere in your drawing.
159.352 2024/S1 – Assignment 1 Brief Online Psychological Profiling In this assignment, you will extend the minimalistic Web servers developed in the exercises from the lectures. Here you will develop a Web application to generate an online (and not necessarily serious) psychological profile of the user. Your application will function both as a server to the end user and as a client itself in order to consume 3rd party Web services via RESTful APIs—as in the following schematic. A key aim of this assignment is to gain hands-on experience with HTTP fundamentals. Do not use any high level framework (Django, Flask, Nodejs, etc) as they abstract the low level HTTP functionality. You will get a chance to use these frameworks in the 2nd assignment. Here you are being asked to implement your own micro-framework. However, you may make use of standard modules that come with Python, e.g. http.server, urllib.parse, requests, json etc. Also it is strongly encouraged that you do not hard code HTML text within your Python scripts. Requirements Authentication Use basic HTTP authentication to protect your site. Implement this in your Python server so that without the correct login credentials, none of the resources will be accessible. Use your 8-digit student ID for both the user name and password, e.g.. when your browser asks for the credentials put in : User Name: 12345678 Password: 12345678 (replace 12345678 with your own ID) [4 marks] The back end Design your server to respond to the following URI paths. Also add other path definitions as you see fit. Any undefined path should result in a 404 NOT FOUND response. / The default/empty path should deliver the content of the “landing page” index.html (or otherwise). This will function as the “front end” as below. /form Deliver the content of the file psycho.html to the user. The content here is a classic form. using vanilla HTML. Your browser should then display this appropriately. /analysis This is the “action” upon submitting the form data from the browser. You will first need to (slightly) modify psycho.html. This URI should action the following tasks at the server-side: 1. Parse the input form data and store at the server side in a suitable format. 2. Analyze the input data to generate a “psychological profile”. The results should be as follows: • an assessment of the users suitability for their selected preferred career • a recommendation of movies the user might like—fetch the relevant data from a 3rd party site via a RESTful API (see below) 3. Fetch a random image, from a 3rd party site (see also below), for each pet that the user selected in the check boxes. Store these at the server side. For step 2 you can analyze the form data in any way you see fit—be creative and have fun! The result of actioning the /analysis URI should be the psychological profile data and image files stored at the server. These data should NOT be be delivered to the client at this point. The server response should just be a simple message in a suitable format. The delivery of actual data is to be handled by the view URI paths below. /view/input This URI delivers the input data to the client. This should be delivered in a suitable serialization format. Do not include HTML. The visualization of the data is to be handled by the front end. /view/profile Deliver the psychological profile data to the user for display in the front end. Again, use a suitable serialization format. [11 marks] The front end This deals with the presentation and visualization of the data generated at the server. Design a suitable front end in index.html to interact with server. You will need to add JavaScript functionality. This should have the following functionality: 1. Fetch the input data form. psycho.html by actioning the appropriate back end URI. The content of this HTML will need to be displaced in a separate browser window. 2. Fetch the serialized input data and display in the browser in a suitable human viewable form. 3. Fetch the serialized psychological profile data together with the pet images (if any) and display them in the browser in a human readable format. Results should be displayed in a manner you would expect to see in a browser window after appropriately parsing the serialization text. Do not just dump this raw text in the display document. [7 marks] Deployment Package your application as a Docker image and get it working in a Docker container. [3 marks] Submission Please upload your saved Docker image. Instructions are on Stream. This assignment is worth 25 marks (25% towards your final grade). Due date: 2024 March 29, 11:55pm.
Question 2 [20 marks]: Identify all the stakeholders of your project. In less that 400 words, describe how each of them will engage with the software life cycle steps as part of the development of your product. You can refer to your selected process model should it help arguing your answer. Question 3 [15 marks]: As you are developing a software as a medical device, you need to identify the classification of your product. In less that 150 words, indicate the classification and justify your answer. To answer this question, you can refer to the UK regulation according to the Medical Device Directive 93/42/EEC or the EU regulation MDR 2017/745. Question 5 [25 marks]: As part of your certification process, you will need to verify and validate your product. Detail, in less than 200 words, how your intent to verify your tool and what are the objectives of verification. In another 200 words max, describe how you could validate your tool.
Optimization and Algorithms November 17, 2022 Exam: Part A 1. Positioning without covering a set. Consider the set S = {x = (x1 , . . . , xn) ∈ Rn : - 1 ≤ xi ≤ 1, for 1 ≤ i ≤ n} . (In dimension n = 2, the set S looks like a filled square.) We want to position a ball B(c) = {x ∈ Rn : Ⅱx - cⅡ2 ≤ r} such that the center c of the ball is as close as possible to a given point d ∈ Rn and such that the ball does not cover the set S (that is, we do not want to have S ≤ B(c)). The radius r > 0 of the ball is given and cannot be changed. For future reference, let V C Rn be the set of vectors of size n whose components are either 1 or -1. For example, in dimension n = 2, we have Note that, for n = 2, the set V is the set of vertices of the square S. (For general n, the set V has 2n elements.) Consider the following optimization problems. One of these optimization is suitable for the given context. Which one? Write your answer (A, B, C, D, E, or F) in the box at the top of page 1 Hint: think about this problem in dimension n = 2. 2. Unconstrained optimization. Consider the optimization problem where The point is a global minimizer of (7) for one of the following choices of d: Which one? Write your answer (A, B, C, D, E, or F) in the box at the top of page 1 3. Least-squares. Let A ∈ Rm×n and b ∈ Rm be given, with n being an even number, and consider the following optimization problems: where rev : Rn → Rn is the map that returns the input written in reverse order (that is, written from the last component to the first component). Examples (for n = 4): where sort : Rn → Rn is the map that returns the input sorted in ascending order. Examples (for n = 4): where circ : Rn → Rn is the map that returns the input circulated by one component (that is, the first component of the input x becomes the second component of the output, the second component of x becomes the third com- ponent of the output, and so on, and the last component of x becomes the first component of the output). Examples (for n = 4): where cent : Rn → Rn is the map that shifts the input so that it becomes centered at the origin; more precisely, given the input x, the map subtracts from x the average of the components of x. Examples (for n = 4): where trim : Rn → Rn is the map that trims one component at the beginning and at the end of the input; that is, given the input x, the map zeroes the first and last components of x, while keeping the other components of x intact. Examples (for n = 4): where swap : Rn → Rn is the map that swaps each consecutive pair of compo- nents of x (that is, given x = (x1 , x2 , . . . , xn), it swaps x1 with x2 , thenx3 with x4 , and so on, until xn-1 with xn). Examples (for n = 4): One of the above problems is not a least-squares problem. Which one? Write your answer (A, B, C, D, E, or F) in the box at the top of page 1 4. Newton algorithm. Consider the Newton algorithm with the generic update equation given by x k+1 = x k + Qkdk , (8) where Qk denotes the stepsize. Suppose that the Newton algorithm is applied to the function f : R2 → R, f (a, b) = (2a - b)2 + b2, and suppose that the current iterate is One of the following vectors is then the vector dk in (8). Which one? Write your answer (A, B, C, D, E, or F) in the box at the top of page 1 Exam: Part B 1. Convex problem. Show that the following problem is convex, where the vectors ak ∈ Rn (for 1 ≤ k ≤ K) and c ∈ Rn. The numbers bk (for 1 ≤ k ≤ K), λ > 0, r > 0, and P > 0 are also given. The function φ : R → R is defined as The function ψ : R → R is defined as 2. Equivalent problems? Bob wants to compute a point in the hyperplane H(s, r) = {x ∈ Rn : sT x = r } that is closest to given points pk ∈ Rn , for 1 ≤ k ≤ K, in the mean squared-distance sense. That is, Bob wants to find a global minimizer of the problem Alice claims that this problem is equivalent to compute a point in the hyperplane H(s, r) that is closest to the center-of-mass of the points pk, for 1 ≤ k ≤ K. That is, Alice claims that the global minimizers of (2) are the same as the global minimizers of Is Alice correct or wrong? If you think Alice is wrong, then provide a counter- example: that is, provide an hyperplane H(s, r) and points p1 , . . . , pK such that the global minimizers of (2) and (3) are not the same. If you think Alice is correct, then prove that the global minimizers of (2) and (3) are the same (for any hyperplane H(s, r) and points p1 , . . . , pK ). 3. Distance between two parallel hyperplanes. Consider two parallel hyperplanes in Rn given by H1 = {x ∈ Rn : sT x = r1 } , and H2 = {x ∈ Rn : sT x = r2 } , where s is a nonzero vector in Rn , andr1 andr2 are two distinct numbers (r1 r2 ). We wish to find the distance between these two hyperplanes. That is, denoting this distance by d (H1, H2 ), we wish to compute d (H1, H2 ) = inf {Ⅱx1 - x2 Ⅱ2 : x1 ∈ H1, x2 ∈ H2} . (4) Give a closed-form expression for the distance d (H1, H2 ) in terms of s, r1 , and r2 . Hint: use KKT conditions on the problem (4). 4. Dead-zone quadratic penalty. The dead-zone quadratic penalty function with bandwidth B > 0 is the function φ : Rn → R defined as φB (x) = (ⅡxⅡ2 - B) . Let H(s, r) be a given hyperplane H(s, r) ={x ∈ Rn : sT x = r } , with s ∈ Rn and r ∈ R. Give a closed-form expression for a global minimizer of the problem where c ∈ Rn and B > 0 are given. Assume that c is not in the hyperplane (c ∈/ H(s, r)) and that s is a nonzero vector (s ≠ 0).
YEAR 2022-23 EXAM CANDIDATE ID: XRNQ0 MODULE CODE: GEOG0093 MODULE NAME: Conservation and Environmental Management COURSE PAPER TITLE: The Social Impacts of Conservation, Oyster Habitat Restoration, and Improving Social Assessments WORD COUNT: 1,742 Details of fieldwork project Project title The Social Impacts of Conservation, Oyster Habitat Restoration, and Improving Social Assessments Subject keywords (please provide 3) Social Impacts, Assessment, Conservation Project location (country and region) Essex, United Kingdom Fieldwork dates From January 2024 to March 2024 Total number of days in the field 91 4. Abstract Conservation projects are now not only assessed by their ecological effectiveness, but also by how well they gain local support and avoid negative effects on human well-being (Milner- Gulland et al., 2014; Bennett et al., 2019). While evaluations of social impact assessment have been undertaken (de Lange et al., 2015), recently, little attention has been spent on refining techniques and practicing improvements suggested in the past (Margoluis et al., 2009). In response to this lack of engagement, the research will compile suggestions made by assessments, refine them, and test them when undertaking its own assessment of the social impacts of oyster habitat restoration. Located in Essex, the research will assess the ENORI project and its goal of protecting cultural value (ENORI, 2023). 6. Aims and objectives of project The research aims to cultivate an effective approach to the assessment of social impacts made by conservation projects based on the findings of past evaluations (Jones et al., 2017). Doing so would offer project stakeholders an example of how they could approach their social impact assessments so that they collect representative data which helps improve their public relations and their project as a result (Bennett, 2016; Bennett et al., 2019). This cultivated approach will be tested, and subsequently evaluated, during its assessment of the ‘ENORI’ oyster habitat restoration project, a branch of conservation which has historically been assessed mainly by its economic and ecological impacts (Coen and Luckenbach, 2000; McAfee et al., 2020). The conceptual side of this research will compile and draw from journals, articles, and reports. The empirical side of the research will interview ENORI project stakeholders and team members, alongside locals in Essex coastal communities. These interviews will be undertaken in collaboration with the ENORI project itself and the Tollesbury & Mersea Native Oyster Fishery Co Ltd, a partner of the project. The research will contribute empirically to the ‘ENORI’ project’s heritage-based goal, and conceptually to conservation projects of all types through the improvement of their own social impact assessments. The research objectives are: 1) To evaluate the approaches to social impact assessment suggested by previous research 2) To create a refined approach based on this previous research 3)To test this new approach trough the assessment of the ENORI oyster habitat management project’s social impacts via interviews 4) To contribute to the ‘ENORI’ project though the sharing of collected data 5) To impact the approach to social impact assessments by conservation projects 7. Proposed research In the modern world, conservation projects can be scrutinised based not just on their ecological results, but also their social impacts. This has sparked an interest within projects to assess the social impacts they are having on local communities and public observers (Kaplan-Hallam and Bennett, 2017), and to also focus on and marketing positive social effects as an actual part of their project’s aims (Browder, 2002). Projects assessing their social impact is important to them maintaining positive public relations (Bennett et al., 2019) and their project’s development, but a common problem is that projects struggle to develop effective methods of social impact assessment (Stem et al., 2005). In response, many evaluations of these social impact assessments have been undertaken (Wilder and Walpole, 2008; de Lange et al., 2015). However,a key issue is that very few investigations have been conducted in order look over the suggestions made by these evaluations, and to use their suggestions to create new and improved approaches to social impact assessment (Margoluis et al., 2009). Its this lack of engagement and activity that this research will address. This research’s compiling of multiple social impact assessment evaluations will help identify effective approaches and suggestions made by these evaluations. This knowledge will subsequently be used to refine and create a new approach to social impact assessment. Though this part of the research would be conceptual, empirical evidence for its effectiveness would then be collected though its use in assessing the ENORI project. The Essex Native Oyster Restoration Initiative (ENORI) is an oyster habitat restoration project. Its goal is to reintroduce and conserve self-sustaining European native oyster (Ostrea edulis, Linnaeus, 1758) populations within the Blackwater, Crouch, Roach and Colne Estuaries of Essex, UK (ENORI, 2023). O. edulis has been in decline across Europe due to overharvesting, habitat degradation, and disease (Gaffney, 2006), but EDNORI aims to promote sustainable fishing, and to also protect Essex’s oyster fishing heritage and long history of native-oyster fishing (ENORI, 2023). The impact of this social goal is what the empirical part of this research will focus on. In partnership with ENORI and the Tollesbury & Mersea Native Oyster Fishery Co Ltd , interviews based around this goal with ENORI stakeholders and team members, and with local Essex coastal community members, will provide data on the social impacts ENORI has had oncostal Essex communities. The assessment approach created by the conceptual side of this research would then be tested through its assessment of this data. The following plan denotes how the research will achieve its previously stated objectives; number filled brackets will identify which research objectives are being met: 1. The researcher will conduct an extensive literature review of social impact assessment evaluations. Reviewed literature will be primarily made up of journals, articles, and reports. During this review, assessment approaches suggested or promoted by evaluators will be compiled. Once the literature review has concluded, the complied approaches will be further reviewed, providing inspiration for a quality assessment redesign supported by evidence. During this time of literature review, the researcher will also be in contact with ENORI, the Tollesbury & Mersea Native Oyster Fishery Co Ltd, and coastal community members. This will be done in order to prepare for data collection, plan transport and journeys, and to arrange dates with interviewees. (1, 2) 2. The researcher will choose interviewees based on their knowledge of ENORI, their knowledge of local Essex communities, or their knowledge of the impacts ENORI has had on the local communities. It will be expected that interviewees will not have in depth knowledge of every aspect, but by carefully choosing a mosaic of interviews, the researcher will gain an appropriate picture of ENORI and Essex. It is expected that new interviewees may make themselves known during data collection. (3) 3. Once a refined social impact assessment has been created, the researcher will travel to Essex and carry out their interviews. Questions will be carefully chosen based on what the interviewee knows, and influenced by the assessment created by the conceptual part of this research . Standard questions asked to all interviewees will also be asked. Virtual interviews will be carried out as well if needed. Locations for the interview will be agreed; this could be at their home or elsewhere. (3) 4. Once interviews have concluded, the researcher will undertake data analysis. The data collected will also be shared with ENORI. Results from the analyses, along with how effective it was to use during data collection, will determine how the newly created assessment is evaluated. (4) 5. A report of the research and its findings will be shared with ENORI stakeholders, while the research’s findings will be published as an academic report. (4,5). Timeline September 2023 – January 2024: Literature review, communications with collaborators January – March 2024: Interviews in Essex March – July 2024: Data Analysis July – October 2024: Ready reports 8. In country collaborations and local benefits The research will be carried out in collaboration with ENORI, and the Tollesbury & Mersea Native Oyster Fishery Co Ltd. Data collected would benefit ENORI, as the project could use the data for information on the social impact they’ve had on local communities. Depending on what the data looks like, the local communities could also benefit from ENORI amending possible negative social impacts from its project, or bolstering positive ones. 9. How will the project further geographical knowledge? The research will provide the field of conservation with a modern example of a social impact assessment approach. This approach will be a refined product of inspiration gathered from multiple social impact assessment evaluations, addressing the current inactivity within this branch of conservation science. The data collected by the new approach, along with its evaluation, will provide conservation practitioners with a review of this new approach, allowing them to possibly adopt aspects of the approach for their own projects. It also provides data on the social impacts of oyster habitat restoration projects, an impact of oyster habitat restoration not usually investigated. The research and its results are intended to be published within The Social Science Journal. 10. Project outcomes and wider significance The data collected by the research can be used by ENORI to evaluate its project’s social impacts on local Essex communities. As a result, ENORI would be able to address and negative impacts they are having on local communities, improving public relations between themselves and local Essex communities and perhaps removing impacts which are negatively affecting the community’s wellbeing. The publication of this research would also have the capacity to help conservation projects of all types, not just oyster habitat restoration. This is because the review of a newly created and refined social impact assessment approach could provide conservation projects with inspiration and evidence to improve their won social impact assessments. Similar to Essex, these changes in could also benefit their project’s local communities. For non-academic audiences, the research would provide an insightful investigation into the social affects conservation projects can have on local communities, both good and bad. This research may introduce readers to how conservation projects include social elements as well, not just ecological ones. Readers not interested in oyster reef restoration can find benefits from this research for conservation projects of any type around the world. 12. Summary of key elements of ethical assessment The social interaction consistently present within this research would cause most ethical issues. The key issue would be the interviews. To ensure interviewees are comfortable and do not feel harassed, the ability for an interviewee to not answer a question, stop the interview, and leave the interview must be allowed and made known to them. Interviewees must also not be forced or coerced into taking part in an interview. Any children who are interviewed must be accompanied by an adult or legal guardian, and strict permission to undertake the interview must be received by said adult or guardian. Permission must be given by each interviewee for their answers to be used in published data. All these ethical issues will be appropriately addressed by the researcher.
CIV2235—STRUCTURAL MATERIALS Week 3 Practice Class Properties of Fresh Concrete QUESTION 1: Select the appropriate option as answer and write down in the answer sheet (5 marks each) 1. Workability of concrete is inversely proportional to a) time of transit b) water-cement ratio c) the air in the mix d) size of aggregate 2. Which one of the following statements is true regarding the workability of fresh concrete? a) A higher free water content in concrete mixes leads to increased workability. b) A higher free water content in concrete mixes results in loss of workability. c) Aggregate grading has no impact on concrete workability. d) Workability loss only occurs when concretes are improperly mixed. 3. For compacting plain concrete road surface of thickness less than 20 cm, we use a) form. vibrator b) screed vibrator c) internal vibrator d) none of the above 4. A possible solution to reduce bleeding is a) Use cement with high calcium chloride b) Use coarser cements c) Use cement with low tri-calcium aluminate content d) All of the above 5. Which of the following statements is wrong about concrete bleeding? a) It is a form. of segregation b) Aggregates settle downwards under gravity c) It should be always eliminated d) It can be useful to finishing operations e) None of the above 6. What is the mechanism for bleeding of fresh concrete? a) Aggregates settle due to gravity, displacing free water and cement paste which accumulates at the highest surface of the concrete b) Aggregates settle due to gravity, displacing free water which rises to the highest surface of the concrete c) Aggregates settle due to gravity, displacing free water and cement paste which accumulates at the lowest surface of the concrete d) Aggregates settle due to gravity, displacing free water which accumulates at the lowest surface of the concrete 7. After casting, an ordinary cement concrete on drying a) expands b) mixes c) shrinks d) none of the above 8. Which of the following statements is correct? a) Keeping the cement moist when storing it will increase the strength of the hardened concrete. b) Keeping the cement moist when storing it will increase the early strength of concrete. c) Keeping the cement moist when storing it does not affect the strength of concrete. d) None of the above 9. Concrete must be cured for at least a) 1 day b) 7 days c) 28 days d) Until it hardens 10. What is the maximum drop height of concrete on site a) 20 m b) 2 m c) 30 m d) 3 m e) None of these QUESTION 2: Write BRIEF answers for the following questions. (10 marks each) 1. Define workability of concrete and discuss the factors affecting the workability of concrete. 2. Why does bleeding occur within concrete? Mention three adjustments you would make to the concrete mix proportions to reduce it? 3. What is plastic shrinkage cracking? Is it detrimental to concrete strength? What are the solutions to plastic shrinkage cracking? 4. Why compaction is needed for concrete? List at least three types of compaction. 5. Air temperature is 23 °C, relative humidity is 50%, concrete temperature is 30 °C, and wind speed is 20 km/h: (i) Draw in the following figure and determine rate of water evaporation (ii) The maximum evaporation rate is 1.0 kg/m2/h. What is the maximum wind speed allowed if other parameters remain unchanged? (ii) The maximum evaporation rate is 1.0 kg/m2/h. What is the concrete temperature allowed if other parameters remain unchanged?
AUGUST EXAMINATIONS 2020 ULMS 766 Marketing Management 1. Levitt suggested in his article ‘Marketing Myopia’ that in order to identify the needs of customers first, companies need to identify the industry they are in. Discuss the relevance of this view today with appropriate examples. 2. To what extent can adjustments in the marketing mix assist markets to persuade their customers to make a purchase. Evaluate the importance of ‘blending’ the mix. 3. Critically evaluate the decision-making process (DMP) model as a tool to help marketers understand how consumers buy and how they can influence the purchase decision. 4. Assess the impact of secondary data in assisting marketers to determine the primary data methods to be adopted and the questions asked in relation to the chosen collection method. 5. Assess the different stages of the product life cycle model and how it could be applied to pricing and marketing decisions within highly competitive market segments.
STAB57H3F: An Introduction to Statistics Winter 2025 (last updated on Jan 04, 2025) 1 Course Description Mathematical treatment of the theory of statistics. The topics covered include: the statisti- cal model, data collection, descriptive statistics, estimation, confidence intervals and P-values, likelihood inference methods, distribution-free methods, bootstrapping, Bayesian methods, re- lationship among variables, contingency tables, regression, ANOVA, logistic regression, appli- cations. Statistical software R will be used. Contents, emphasis, etc. of the course is defined by means of the lecture materials - not only the texts. Table 1 shows the tentative lecture guide. Lecture slides will be uploaded every week. However, they are just rough, point-form notes, with no guarantee of completeness or accuracy. They should in no way be regarded as a substitute for attending the lectures, or for doing the weekly non-credit homework. Important announcements, problem sets, additional examples, and other course info will be posted on the course web page on Quercus. Check it regularly. Prerequisite: STAB52H3 or STAB53H3 Exclusion: MGEB11H3, PSYB07H3, STAB22H3, STAB23H3, STA220H1, STA261H Breadth Requirements: Quantitative Reasoning 2 Course Schedule • Lec 01: TUE 9 - 11am, THURS 11am - 12pm • Lec 02: TUE 1 - 3pm, THURS 1 - 2pm • Instructor: Shahriar Shams, Assistant Professor (teaching stream), Department of Computer and Mathematical Sci- ences, University of Toronto Scarborough. • Email: [email protected] (Please add “STAB57” at the beginning of the sub- ject of your email. PLEASE!) • O ce hours: time and details to be announced later. 3 Textbooks 1. Mathematical Statistics and Data Analysis, 3rd Edition, John A. Rice 2. Probability and Statistics: The Science of Uncertainty, Second Edition, by Michael J. Evans and Jefrey S. Rosenthal Available online on the web-page of Professors Evans and Rosenthal http://www.utstat.toronto.edu/mikevans/jeffrosenthal/ 4 Homework Every week after the lecture a set of exercises will be provided. This homework is not for credit. This is only meant to give students opportunities to learn the materials and prepare themselves for the tests and exam. TAs will solve some of the harder problems in the tutorials. Tutorials will start from week-2. 5 Tutorials The tutorials will start on the second week and run until the last week of class. Tutorials will cover topics taught in the previous week’s lecture. In preparation for the tutorials, you should do weekly non-credit homeworks. There will be short quizzes every week starting from week 3 based on previous week’s lectures and non-credit homeworks. You have to write the quizzes in your assigned tutorial. Quizzes are open-book (students are also allowed to use lecture notes). Default score for a missed quiz is zero. Out of the 10 quiz scores, your best 5 scores will be worth 5% of the course grade. Quiz marks cannot be shifted to other assessments. 6 Assignments for credit There will be two assignments (each worth 10%) in the course. Both the assignments are take home and will require some hand calculations and some coding in R. The tentative assignment release dates are : mid-February and mid-March. Students will be given reasonable time to finish each of the assignments. Clear instructions will be given on how to complete and submit your work. Crowdmark will be used for all the assessments in the course. 7 Evaluation • Midterm test: outside of lecture hours, will be scheduled by the office of registrar. • Final exam: everyone registered in the course will be required to write the exam, will cover everything taught in the course, date and time will be fixed by the office of registrar and will be announced later. Grades will be calculated using two schemes. The final course grade will be the larger of the two grades. Assessment Scheme 1 Scheme 2 8 Missed assessment There are NO make-up assessments of any form in this course. • Taking the final exam and submitting both the assignments are mandatory for every student in order to pass this course. • Students are not required to submit any doctor’s note for missing the midterm. 9 Computing Statistical software R will be used extensively. Students will learn solving probability problems using simulations in R. No previous exposure is expected and R will be introduced starting from the basics. Any code used in the lectures will be available on the course web-page for students to practice at their own time.
Main Examination Period 2025 – January – Semester A - Timed Examination Module Code and Title: BUSM096 Business Relationships and Networks Date of exam: 7 January 2025 Question 1 Choose three important concepts relating to business relationships. Why are they important for explaining business relationships (e.g., how do they fit into a model that explains business relationship performance). How does each of these concepts relate to grounding theories? Are these concepts representing relationship marketing instruments, and if not, how could instruments affect them? Use the Hatteland/Autostore – Amazon business relationship use case to exemplify your answers. [50 Marks] Question 2 A supply chain manager states about their firm’s supplier business relationships: “I manage all my supplier relationships in the same way” . Critique this statement by referring to at least four important concepts and theories relating to business relationships (one should be the relationship lifecycle concept, another one should be Transaction Cost Economics). [50 Marks] Question 3 Outline the ‘narrow definition’ of the concept of the dark side of business relationships. What are mechanisms that drive the dark side? What are managerial activities that could mitigate against the dark side of business relationships. How could a focal firm know that one of their business relationships is ‘dark’? Use the Hatteland/Autostore – Amazon business relationship use case to exemplify your answers. [50 Marks] Question 4 Is the marketing in business relationships the same as in business networks? What are additional concepts and instruments used to manage in a network? How can the concept of network pictures be used for managing in networks, and how does it link to concepts around ‘networking’, e.g. by Ford? [50 Marks]
5QQMN532 – Asset Management Assessment 2 – Exam (75% of total module grade) The Task You will be assessed based on an exam over a E-hour period. The exam will be in-person at a time and location to be confirmed. Module Learning Outcomes Assessed You will be assessed on all learning outcomes of the course. Specifically, you will be tested on your understanding of: 1. Understanding of how securities in the major asset classes are analysed, valued and traded. 2. Knowledge of how investment managers construct portfolios including making asset allocation decisions. 3. Ability to appraise different styles of active and passive management for bond and equity funds and understand how managers add value. 4. Skills to evaluate the performance of fund managers and analyse and interpret fund reports. 5. Knowledge to discuss trends in the asset management industry. Assignment Details and Structure The exam will contain at least one numerical question and at least one essay question. You will need to answer all questions in the exam. You are allowed to use a non-programmable calculator during the exam. Only calculators from the CASIO FXVM and FXVQ RANGE are allowed. Please note that calculators will not be available to borrow on the day of your assessment and you are required to bring this to your in-person examination. Assessment Support Information The course contains a range of feedback opportunities designed to support you in performing well on the exam. This includes: 1. A previous exam paper with detailed feedback will be available on KEATS from Reading Week. 2. A mini quiz after each lecture on KEATS. After each lecture, you will find an MCQ test on KEATS containing five questions. After every lecture, you will find an optional short MCQ test with five questions for additional practice. You will get feedback in the form. of a score. 3. Seminars covering concepts and practical applications of material that are relevant for exam. You should attempt seminar questions in your own time and then receive feedback in the seminars as well as written feedback in the form. of detailed solutions to numerical problems after the seminar. 4. Examples relevant for the material covered in exam will be covered in the lectures and lecture notes with feedback in the form. of detailed solutions. Marking Criteria Marks will be awarded as the percentage of out J\ for each question. General marking criteria for all essays in the exam: 40+ • General knowledge is demonstrated, but the work is mainly descriptive. There is very little analysis offered in the essay. • Sparse coverage of basic arguments. Low quality in a number of areas and poor range of reading. Adequate presentation. Some unclear arguments. • Some omissions and/or irrelevant material 50+ • Sound understanding of the key issues is demonstrated, and evaluative thought is apparent in some areas • You made some attempt to engage with the question, but some parts are not clearly enough to address the question • There are some confusions and inconsistencies in the arguments • Clearly presented but little development or original analysis • Some omissions and/or irrelevant material 60+ • Good understanding of key concepts with the development of analytical thought. • Good use of relevant literature and theory • Coherent, well organised and logical presentation with some minor inconsistencies • Students often fall short of 70+ because they do not focus enough on the question and did not offer enough analysis (instead of a description of the concepts and arguments). 70+ • Thorough understanding of key concepts demonstrating insight and a good level of evaluation • A comprehensive range of relevant arguments and literature. Evidence is used to support arguments, awareness of wider issues • Clear, logical and integrated presentation. 75+ • Thorough understanding of key facts with evidence of evaluation in the discussion. Independent and critical evaluation. • Clear and fluent style. Very well-focused and structured
Optimization and Algorithms October 19, 2022 Quiz 1. Moving as far away as possible from a point. Consider a vehicle that moves in the plane R2 . The state of the vehicle at time t is denoted by x(t) ∈ R4 . The first two components of x(t) correspond to the position of the vehicle at time t; the last two components of x(t) correspond to the velocity of the vehicle at time t. The initial state of the vehicle (at time t = 1) is given and is denoted by x init. Assume that the state of the vehicle evolves as x(t + 1) = Ax(t) + Bu(t), t = 1, 2, . . . , T — 1, where the matrices A ∈ R4×4 and B ∈ R4×2 are given, and u(t) represents a control signal. We wish to design the control signal u(t), fort = 1, 2, . . . , T —1, such that the vehicle is located as far away as possible from a given point b ∈ R2 at time t = T (that is, at the end of the time-horizon {1, 2, . . . , T}). Also, as the vehicle is moving (from t = 1 to t = T), it should never enter a given dangerous disk D = {p ∈ R2 : Ⅱp — cⅡ2 < R}, where the center c and the radius R of the disk are given. Finally, there is an upper bound on the magnitude of the control signal (as measured by the Euclidean norm Ⅱ·Ⅱ2 ). Specifically, the magnitude of u(t) should never exceed a given limit U > 0, for t = 0 to t = T — 1. Let and consider the following problem formulations: For the given context, one of the formulations above is appropriate. Which one? Write your answer (A, B, C, D, E, or F) in the box at the top of page 1 2. Unconstrained optimization. Consider the following optimization problems: The point x* = 0 is not a global minimizer for one of the problems above. Which one? Write your answer (A, B, C, D, E, or F) in the box at the top of page 1 3. Least-squares. For a vector v = (v1 ; v2 ; : : : ; v n) ∈ Rn , the symbol C(v) denotes the n × n (circulant) matrix obtained by letting the vector v become its first column and then rotating v, one component at a time, to get the remaining columns; for example, for v = (v1 ; v2 ; v3 ; v4 ) ∈ R4, we have Consider the following optimization problem where the vectorsak ∈ Rn and bk ∈ Rn are given for 1 ≤ k ≤ K. The vector r ∈ Rn and the constant P > 0 are also given. Problem (1) can be rewritten as a least-squares problem, that is, as a problem of the form Consider the following pairs A and β: (The symbol In denotes the n × n identity matrix, and the symbol 0n denotes the n-dimensional vector whose components are all zero.) Which of the pairs A and β above makes problem (1) equivalent to the least- squares (2)? Write your answer (A, B, C, D, E, or F) in the box at the top of page 1 4. Closed-form solution. For a vector v = (v1 , v2 , . . . , v n) ∈ Rn , the symbol D(v) denotes the n × n (diagonal) matrix obtained by displaying the vector v along its diagonal; for example, for v = (v1 , v2 , v3 , v4 ) ∈ R4, we have Consider the optimization problem where the matrices A ∈ Rm×n and R ∈ Rm×n , and the vectors θ ∈ Rn and b ∈ Rm are given. Assume that the columns of R are linearly independent and all components of the vector θ are nonzero. One of the following vectors is a global minimizer of (3): Which one? Write your answer (A, B, C, D, E, or F) in the box at the top of page 1
Syllabus MATH 260 – Introductory to Statistics 4 credit hours JTerm 2025 Course Overview This course, grounded in algebra, introduces fundamental statistical concepts. Utilizing the statistical software RStudio, we will gather and scrutinize diverse datasets. You will master the interpretation of RStudio outputs to formulate insightful conclusions. Catalog Description Using statistical software, this course covers probability, descriptive statistics, sampling distributions and the Central Limit Theorem, hypothesis testing and confidence intervals, distributions of random variables and/or test statistics (normal, Z, t, F, binomial, and chi-square), t-tests (one- and two-sample, paired), analysis of categorical data (one proportion: binomial test, normal approximation; two or more proportions: chi-square tests, odds ratios), correlation, and simple linear regression. Credit will not be granted for both MATH 260 and BUS ADM 216. Course Learning Outcomes Upon successful completion of MATH 260 - Introductory Statistics, students will be able to: · Understand the fundamental role of statistics in daily life. · Define and distinguish the basic terminology of statistics, including sample vs. population, parameters vs. statistics, and descriptive vs. inferential statistics. · Use the simple random sampling method to collect samples for experiments. · Categorize variables as either qualitative or quantitative, and further as discrete or continuous. · Summarize and interpret datasets using graphical displays and numerical measures, depending on data type. · Use key concepts in probability theory and the rules that apply to calculating probabilities, focusing on both equally likely and unequally likely outcomes. · Construct discrete probability distributions. · Recognize the features of a binomial experiment and apply the binomial probability mass function to find probabilities associated with a binomial random variable. · Recognize the features of a normal distribution, and compute probabilities associated with normal distributions. · Understand the role sampling distributions play in statistical inference: Determine the sampling distribution of the sample mean for a normally distributed random variable and explain how the Central Limit Theorem is applied to large samples when the distribution of the random variable is unknown or non-normal. · Apply the statistical inference techniques for parameter estimation of point estimation and confidence interval estimation: Calculate and/or interpret point estimates and confidence intervals for one population mean, one and two population proportions, and two population means for both independent and dependent samples. · Comprehend the reasoning behind hypothesis testing and apply techniques for testing various statistical hypotheses concerning population parameters, including one-sample tests for a mean and for a proportion, two-sample and paired sample tests for two means (for independent and dependent samples, respectively), and the two-sample proportion test. · Explore the possible relationship between two quantitative variables using a scatter plot and linear correlation coefficient. · Develop and interpret a simple linear regression model between two quantitative variables, which allows for prediction. · Analyze categorical data via a goodness-of-fit test, and tests of independence and homogeneity. · Use a dedicated statistical package to conduct basic statistical analyses. How to be successful in this course Statistics problems are expected to be challenging and build on previous knowledge and understanding. Consequently, you should set aside at least 9 1/2 - 12 hours per week for study. (Note: The amount of time required for study will vary by individual.) It would be beneficial to work on extra problems, in addition to the ones assigned in the homework and assignments. If at any time you feel that you are falling behind, you should contact the instructor immediately. Student’s Responsibility · Be prepared for all classes. · Be respectful of others. · Actively contribute to the learning activities in class · Make sure they have a strong internet connection. Instructor’s Responsibility · Be prepared for all classes. · Evaluate all fairly and equally. · Be respectful of all students. · Create and facilitate meaningful learning activities. · Behave according to university codes of conduct · Give timely feedback. Grading Policies 20% - Practice Homework: The homework is graded. You have unlimited attempts on the homework and until the end of the semester to complete it. I highly suggest attempting all homework before an exam as all exam problems come from the homework. 40% - Chapter Exams: 2 exams will be given each worth 20% of your grade. Make sure to schedule time in your calendar to take the exam. Make sure to have a strong internet connection. There are no makeup exams given. 30% - Final Exam: This will be a cumulative final exam. You can choose Monday, Tuesday, or Wednesday to take the final during finals week. Make sure to schedule time in your calendar to take the final. Make sure to have a strong internet connection There are no makeup finals given. Letter-grade scale Grade Percent A 92% - 100% AB 89% - 91% B 82% - 88% BC 79% - 81% C 70% - 78% D 60% - 69% F Below 60% Learning environment This is an online course that requires you to have a strong internet connection. This course is accessible through Canvas. There is no live lecture for this course, students will be required to use the course software Access Pearson Statistics, Access Pearson Statistics videos, Lecture Videos, and lecture notes to learn the material. If you email me by Friday, January 3rd with the amount of time you should set aside per week to study for this course you will earn 1 extra credit point. All students are required to purchase Access Pearson Statistics software through Pearson or the bookstore. You will use this software to complete practice homework, quizzes, and exams. You should regularly schedule time outside the class to complete homework and study. Do not procrastinate or get behind in this class, the difficulty of the class will make it hard to catch up. If you are struggling with homework or understanding concepts Access Pearson Statistics software has resources to help you. These resources will be discussed in the introduction video on Navigating Access Pearson, be sure to ask about these resources if you have any questions. The Exams will be taken through Access Pearson Statistics. You must submit all work for your exams through Canvas to have an opportunity to earn partial credit. However, you must submit all your work, not just specific problems within 10 minutes of completing your exam. There are no exceptions to the 10-minute rule even if you have internet issues. Making sure you have a strong internet connection is your responsibility. Your work must be submitted through Canvas and not emailed to me. DO NOT review your exam until after submitting your work. If your work shows you reviewed the exam before submitting it, I will not accept it. Exam problems for which work is not submitted will not be graded for partial credit. All work must be numbered (including a, b, c, etc..), neatly organized, and easy to follow or you will not receive partial credit. DO NOT scribble your work out as you should be using a pencil. There should not be error messages in your RStudio work. Your work must be a pdf otherwise it will not be accepted, and you will not have an opportunity to receive partial credit. Review your pdf document before submitting it if it is not readable, I will not accept it, and you will not receive credit for it. All calculations must be done in RStudio, not Excel.
ECON3102 Tutorial 07 - Week 8 Question 1: Valuation Charlie’s cheese factory has a very precise business plan for 2019-2028, shown below: (in 2025 the main storage facility will need to be replaced, hence the higher investment). From 2029 onwards, dividends will increase at a rate of 2% a year forever. The interest rate is 6%. (a) Use the Gordon growth formula (See equation 1) to calculate the value that the factory will have in 2028 after paying dividends (i.e. the value not including the value of the dividends it will pay in 2028). V = r - g/d1 (1) (b) Compute the present value of the entire infinite stream of dividends that starts in 2019. Question 2: Credit Constraints A two-period world exists. A firm’s production function is given by F(K, L) = At Kα L1-α where At can have diferent values in each period. In each period, the firm can hire labor in a competitive labor market at the same wage w, which the firm perceives as constant. Unfortunately, there isn’t a market for renting capital: the firm can only use capital it owns. If the firm possesses K units of capital and decides to employ L workers, its earnings will be F(K, L) → wL. Initially, the firm has K1 units of capital in the first period. No depreciation occurs. At the end of period 1, the firm can procure capital for period 2 either by utilizing its earnings or by borrowing. All loans must be repaid in period 2, and the interest rate is r. Earnings can also be used to distribute dividends to shareholders in period 1. The utmost amount lenders are willing to provide to the firm is b. (a) Formulate the firm’s challenge in deciding the number of workers to employ in each period. Recognize that this issue can be addressed period by period, considering Kt as constant. Derive an expression for the profits of a firm in period t that accepts its capital stock Kt as constant and determines the amount of labor to employ, i.e., for ω(Kt) = max F(Kt, L) - wL L (b) Illustrate the firm’s problem in deciding the dividend amount, borrowing quantity, and investment level. (c) If b = ∞ , prove that the ideal investment quantity is influenced by A2 but not by A1 . Elaborate. (d) Assuming b = 0, demonstrate that when A1 is adequately high, then the optimal investment level aligns with part (c). Determine the least level of A1 for this scenario and label it A1(*) . Argue that when A1 < A1(*), the investment is influenced by A1 . Please elucidate. (e) Suppose A1 < A1(*) . How does the firm respond to a rise in A2 ? How does an increase in b afect the firm’s decisions? Please explain. Question 3: Aggregate Investment with Risk The world lasts two periods. The aggregate production technology for period 2 is given by: F(K, L) = AKα L1-α K is the aggregate capital stock in period 2 and L is the labor force, which is exogenous and normalized to L = 1. Period 2 is the end of the world, so capital depreciates fully (δ = 1) and the representative household will consume F(K, L) = AKα L1-α . The utility function is u(c) = log(c). A is a random variable, which can take two possible values: AH =1+ ϑ or AL = 1 - ϑ, with equal probability. The interest rate between periods 1 Now consider the following investment project: investing an additional unit in period 1 to obtain an additional unit of capital in period 2. (a) What is the dividend produced by the marginal unit of capital? Express it as a function of the aggregate capital stock K and realized productivity A. (b) Suppose ϑ = 0. For what value of K is the net present value of additional investment exactly zero? (c) Now suppose ϑ > 0. For what value of K is the net present value of additional investment exactly zero? (Hints: Use equation 2 to guide your answer). (d) How does K depend on ϑ? Explain.
CSE 101 Introduction to Data Structures and Algorithms Programming Assignment 6 In this assignment you will create a BigInteger ADT in C++ that is capable of performing arithmetic operations on arbitrarily large signed integers. The underlying data structure for this ADT will be a List of longs. It will therefore be necessary to alter your ListADT from pa5 slightly. Fortunately, this can be done by changing a single line of code in List.h, namely line 15, which changes from typedef int ListElement; to typedef long ListElement; Make this change, then test your List again using your ListTest.cpp (and my ListClient.cpp if you like). The BigInteger ADT will represent a signed integer by encapsulating two pieces of data: an int (which will be either 1, -1, or 0) giving its sign, and a List of non-negative longs representing its magnitude. Each List element will be a single digit in the base b positional numbering system, where b is a power of 10: b = 10p. For reasons that will become clear, werestrict the exponent p to the range 1 ≤ p ≤ 9. The BigInteger arithmetic operations will utilize the long arithmetic built into the C++ language to perform. operations on single (base b) digits, and buildup the standard arithmetic operations (add, subtract, multiply) out of these (base b) digit operations. The reason we chose b to be a power of 10 is to facilitate the conversion between base 10 and base b. In the case p = 2, we have b = 100, each base b digit consists of 2 base 10 digits. Base 100 digits = {00, 01, 02, … … … , 97, 98, 99} The 52-digit base 10 number N = 6523485630758234007488392857982374523487612398700554, (too large for any built-in C++ data type) becomes the following List of 26 base 100 digits. L = (65 23 48 56 30 75 82 34 00 74 88 39 28 57 98 23 74 52 34 87 61 23 98 70 05 54) where we have separated digits by a space for the sake of readability. The same number in base 1,000 (i.e., p = 3) would have 18 digits: L = (006 523 485 630 758 234 007 488 392 857 982 374 523 487 612 398 700 554), and in base 1,000,000,000 (p = 9) it would have 6 digits: L = (006523485 630758234 007488392 857982374 523487612 398700554). Observe that to obtain the base 10 representation of such a number, we can merely concatenate the base 10 digits of each of its base b digits, then strip off any leading zeros. To go in the opposite direction and parse a string of base 10 digits into a List of base b digits, we can separate the string into groups of p characters, working from right to left. The final, leftmost, base b digit maybe parsed from fewer than p characters. In all of these Lists, weregard the front as being the right end, and the back as the left. With this convention, the List indexof a base b digit is the corresponding power on b. Thus L = (cn−1 cn−2 ⋯ ⋯ ⋯ c2 c1 c0) represents the number N = cn−1bn−1 + cn−2bn−2 + ⋯ ⋯ ⋯ + c2 b2 + c1 b1 + c0 b0 . It is instructive at this point to do some arithmetic examples using the above representation. To illustrate, we take p = 2, sob = 100. Example As we can see, it is very useful to think of a borrow in subtraction as nothing more than a negative carry. One checks easily that in base 10: 355797 + 149082 = 504879 and 355797 − 149082 = 206715. Another way to do these examples is to add and subtract Lists as vectors, then "normalize" the results, by working from right to left in each vector, carrying and borrowing as needed to obtain a List of longs x in the range 0 ≤ x < b, i.e., base b digits. Example The reader is urged at this point to do a large number of such examples, since these are exactly the algorithms needed to perform BigInteger addition and subtraction. The subtraction example above (in particular the value −33) illustrates why it is useful to use long instead of unsigned long as our List element data type. It allows us to do signed arithmetic at the level of each base b digit. You should also attempt to do some multiplication problems in this representation. When multiplying, it is necessary for each digit in the first BigInteger to multiply each digit in the second BigInteger. If x andy are two such digits, then 0 ≤ x < band 0 ≤ y < b, hence 0 ≤ xy < b2 . In order to guarantee that this product is always computable in type long, we must have b2 no larger than the maximum possible long value,i.e. b2 ≤ 263 − 1 and therefore b ≤ √263 − 1 = 3,037,000,499.97 … The largest such b that is also a power of 10 is b = 1,000,000,000 = 109 , which explains why the power pon 10 must be in the range 1 ≤ p ≤ 9. BigInteger ADT Specifications The BigInteger ADT will be implemented in files BigInteger.hand BigInteger.cpp. Following our standard practice, BigInteger.h will contain the definition of class BigInteger, along with prototypes of member functions, as well those of overloaded operators. The file BigInteger.h is provided on the webpage under Examples/pa6, and should be submitted unaltered with your project. All functions and operators in this file will be implemented by you in BigInteger.cpp. (The one exception is the destructor, which is commented out and marked as optional.) BigInteger.cpp should define global constants called base and power, respectively, where base is of type long (i.e. type ListElement from List.h), and power is of type int. These constants should be defined so that base = 10power and 0 ≤ power ≤ 9. During your testing phase, you may choose power to have any value in the range 0 ≤ power ≤ 9. When you submit your project however, be sure to set power = 9 and base = 1000000000 (1 billion), for proper grading. You will notice that the BigInteger class (as defined in BigInteger.h) has two member fields: an int (1, -1 or 0) specifying the sign of a BigInteger, and a normalized List of longs specifying its magnitude. Here normalized means that each List element x is in the range 0 ≤ x < base, and so constitutes a valid digit in the chosen radix. The sign 0 is reserved for the number 0, whose magnitude is represented by an empty List. This is the zero state, which is created by the no-argument constructor BigInteger(). The constructor from long BigInteger(long x) will create a BigInteger object representing the integer x. The constructor from string BigInteger(std::string s); will create a BigInteger object representing the integer specified by s. The string s will begin with an optional sign ('+' or '-'), followed by decimal digit characters {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}. If this constructor is called on a non-empty string that cannot be parsed as a signed integer, it will throw an invalid_argument exception (from the standard library with the error message: "BigInteger: Constructor: non-numeric string" If called on an empty string, it will throw an invalid_argument exception with the error message "BigInteger: Constructor: empty string" The copy constructor, BigInteger(const BigInteger& N), will simply copy the fields of N to this. The function std::string to_string(); will return a string representation of a BigInteger as a base 10 numeral. It will be used to overload the stream insertion operator
BUAD306: INTRO TO SERVICE & OPERATIONS MANAGEMENT Winter 2024 About BUAD306 Operations Management (OM) focuses on the design of production and service processes and supporting business strategies to deliver goods and services that meet business goals and satisfy customer needs while generating profitability. Successful OM aims to improve profitability by utilizing analytical approaches/techniquesto achieve increased efficiencies, higher productivity, reduced costs and improved quality. During this session, you will learn about OM concepts and planning tools/ mathematics that are used in all successful businesses. Some of these topics include Forecasting, Decision Theory, Capacity Planning, Supply Chain Management, Project Management, and Quality Control. Upon successfully completing this class, you will have a solid understanding of the OM function, mathematical techniques used to make effective OM decisions and the importance of integrating OM with other core business functions such as Marketing, Finance, Human Resources, etc. As someone with over 35 years of corporate, start-up and small business experience, I reinforce the OM curriculum with actual operational examples— and regularly call on students to share their own business experiences. I will also ask students to think through discussion scenarios as a consumer, an employee and as a manager. This enables students to achieve a broad view of the impact of OM on all stakeholders. I have high expectations of students— and strongly recommend that you watch class lectures in a timely manner, read assigned textbook chapters, and complete related homework problems. I firmly believe that putting in a professional level of effort will enable you to not only succeed in the course but in your current job and future career. General Course Information Text: • REQUIRED: Production/Operations Management, Custom Text, 14th Ed., Stevenson (Electronic version automatically delivered by Bookstore via Canvas; see announcement for access.) • OPTIONAL: Murphy Course Pack (Fall ‘24 version is OK) Office Hours via Zoom (by appointment on Tues/Weds/Thurs; schedule via email): • Sign up via link on course Canvas homepage; if you are unable to meet during available times, email to schedule an appointment. Class Meeting Time: • Online (asynchronous);students must complete course modules and supporting work per schedule in syllabus and on Canvas. Canvas / Emails Canvas will be used as the “hub” for all coursework. Announcements, syllabus, practice problems, PowerPoint slides, Yellowdig discussions, homework solutions and other important course materials can be found on the course Canvas page. You are required to check it daily. In some cases, I may email students with information/materials orschedule changes. Please read these messages ASAP and be sure to follow instructions if provided. HAVE READY FOR LECTURES: • PPT Slides/Course Pack • Calculator • Notes/Qs from Readings • Completed homework problems (as requested) Viewing Lecture Recordings • This course operates in an asynchronous manner. Lectures and coursework are provided on Canvas and review/completion must be completed by students per the class schedule in this syllabus (and on Canvas). • Students are required to watch the lectures as shown on the syllabus schedule; it is NOT recommended that you wait and bunch them together; doing so will impact your ability to complete assignments and other work. If you have any issues with accessing recordings, please notify me ASAP. Want to Succeed in Winter BUAD306? Follow Instructions: Itis expected that all students will read assignments and course communications carefully and follow all instructions. This will ensure that your complete work properly and work can be graded quickly. Failure to read instructions may impact your grade— so please take the time to do so! Take Notes: Students are highly encouraged to watch lectures and take notes in a notebook or on corresponding pages of the course pack; this will facilitate learning and retention and will help with exam preparation. Complete Homework Problems: Numerous HW problems (from the textbook) are assigned to ensure thatstudents have ample opportunity to understand the mathematics taught in the course. These homework problems are not graded— but students are expected to complete them to prepare for assignments which are submitted/graded. Failure to complete homework problems will definitely impact your performance in the class. You should complete HW problems within 24-48 hours after learning math concepts in class; this will help with retention of information.
FIT5202 - Data processing for Big Data (SSB 2025) Assignment 1: Analysing Food Delivery Data Due Date: 23:55 Friday 17/Jan/2025 (End of week 3) Weight: 10% of the final marks Background Food delivery services have become an integral part of modern society, revolutionizing the way we consume meals and interact with the food industry. These platforms, accessible through websites and mobile apps, provide a convenient bridge between restaurants and consumers, allowing users to browse menus, place orders, and have food delivered directly to their doorstep with just a few taps. In today's fast-paced world, where time is a precious commodity, food delivery services offer an invaluable solution, catering to busy lifestyles, limited mobility, and the ever-present desire for convenience. They empower individuals to enjoy a diverse range of cuisines without leaving their homes or offices, support local restaurants by expanding their reach, and have even become a crucial lifeline during times of crisis, such as lockdowns and emergencies, ensuring access to essential sustenance and supporting the economy. As a result of its convenience, and the increasing preference for on-demand services, food delivery has become a very important part of modern life, impacting everything from our daily routines to the broader economic landscape. In the food delivery industry, accurate on-time delivery prediction is paramount. Big data processing allows companies to achieve this by analyzing vast datasets encompassing order details, driver performance, real-time traffic, and even weather. Sophisticated algorithms leverage this data to build predictive models. These models learn from historical trends, for example, a restaurant's longer preparation times during peak hours or a driver's faster navigation in specific areas. Real-time data, like driver GPS location and live traffic, further refine these predictions, enabling dynamic adjustments to estimated delivery times. The benefits are substantial. Firstly, customer satisfaction improves with reliable delivery estimates and transparent communication regarding delays. Secondly, operational efficiency increases through optimized driver scheduling and route planning, leading to reduced costs and faster deliveries. Furthermore, accurate predictions empower proactive measures to mitigate delays. The system can alert customers of potential issues, offer compensation, and trigger interventions like expediting order preparation. If an order is not delivered on time, a quality after-service should be followed, such as offering refunds, providing future discounts, or simply offering a sincere apology. By mastering on-time delivery prediction through big data, food delivery companies gain a crucial competitive edge. They can meet and exceed customer expectations, foster loyalty, and drive sustainable growth in a demanding market. As the industry evolves, leveraging big data for accurate delivery forecasting will remain a key differentiator for success. This series of assignments will immerse you in the world of big data analytics, specifically within the context of a modern, data-driven application: food delivery services. We will explore the entire lifecycle of data processing, from analyzing historical information to building and deploying real-time machine learning models. Each assignment builds upon the last, culminating in a comprehensive understanding of how big data technologies can be leveraged to optimize performance and enhance user experience. In the first assignment(A1), we will delve into historical datasets, performing data analysis to uncover key trends and patterns related to delivery times, order volumes, and other crucial metrics. This foundational understanding will pave the way for assignment 2A, where we will harness the power of Apache Spark's MLLib to construct and train machine learning models, focusing on predicting delivery times with accuracy and efficiency. Finally, assignment 2B will elevate our analysis to the real-time domain, utilizing Apache Spark Structured Streaming to process live data streams and dynamically adjust predictions, providing a glimpse into the cutting-edge techniques driving modern, responsive applications. Through this hands-on journey, you will gain practical experience with industry-standard tools and develop a strong conceptual understanding of how big data powers the dynamic world of on-demand services. In A1, we will perform historical data analysis using Apache Spark. We will use RDD, DataFrame. and SQL API learnt from topics 1-4. The Dataset The dataset can be downloaded from Moodle. You will find the following files after extracting the zip file: 1) delivery_order.csv: Contains food order records. 2) geolocation.csv: Contains geographical information about restaurants and delivery locations 3) delivery_person.csv: Contains basic driver information, their rating and vehicle information. The metadata of the dataset can be found in the appendix at the end of this document. (Note: The dataset is a mixture of real-life and synthetic data, therefore some anomalies may exist in the dataset. Data cleansing is not mandatory in this assignment.) Assignment Information The assignment consists of three parts: Working with RDD , Working with Dataframes, and Comparison of three forms of Sparkabstractions. In this assignment, you are required to implement various solutions based on RDDs and DataFrames in PySpark for the given queries related to eCommerce data analysis. Getting Started ● Download your dataset from Moodle. ● Download a template file for submission purposes: ● A1_template.ipynb file in Jupyter notebook to write your solution. Rename it into the format (for example: A1_xxx0000.ipynb. This file contains your code solution(xxx0000 is your authcode). ● For this assignment, you will use Python 3+ and PySpark 3.5.0. (The environment is provided as a Docker image, the same you use in labs.) Part 1: Working with RDDs (30%) In this section, you need to create RDDs from the given datasets, perform partitioning in these RDDs and use various RDD operations to answer the queries. 1.1 Data Preparation and Loading (5%) 1. Write the code to create a SparkContext object using SparkSession. To create a SparkSession, you first need to build a SparkConf object that contains information about your application. Use Melbourne time as the session timezone. Give your application an appropriate name and run Spark locally with 4 cores on your machine. 2. Load the CSV files into multiple RDDs. 3. For each RDD, remove the header rows and display the total count and first 10 records. 4. Drop records with invalid information(NaN or Null) in any column. 1.2 Data Partitioning in RDD (15%) 1. For each RDD, using Spark’s default partitioning, printout the total number of partitions and the number of records in each partition (5%). 2. Answer the following questions: a. How many partitions do the above RDDs have? b. How is the data in these RDDs partitioned by default, when we do not explicitly specify any partitioning strategy? Can you explain why it is partitioned in this number? c. Assuming we are querying the dataset based on order timestamp, can you think of a better strategy for partitioning the data based on your available hardware resources? Write your explanation in Markdown cells. (5%) 3. Create a user-defined function (UDF) to transform. a timestamp to ISO format(YYYY-MM-DD HH:mm:ss), then call the UDF to transform. two timestamps(order_ts and ready_ts) to order_datetime and ready_datetime(5%) 1.3 Query/Analysis (10%) For this part, write relevant RDD operations to answer the following questions. 1. Extract weekday (Monday-Sunday) information from orders and print the total number of orders each weekday. (5%) 2. Show a list of type_of_order and average preparation time in minutes (ready_ts - order_ts) (5%) Part 2. Working with DataFrames (45%) In this section, you need to load the given datasets into PySpark DataFrames and use DataFrame. functions to answer the queries. 2.1 Data Preparation and Loading (5%) 1. Load the CSV files into separate dataframes. When you create your dataframes, please refer to the metadata file and think about the appropriate data type for each column. 2. Display the schema of the dataframes. When the dataset is large, do you need all columns? How to optimize memory usage? Do you need a customized data partitioning strategy? (Note: Think about those questions but you don’t need to answer these questions.) 2.2 Query/Analysis (40%) Implement the following queries using dataframes. You need to be able to perform operations like transforming, filtering, sorting, joining and group by using the functions provided by the DataFrame. API. 1. Write a function to encode/transform weather conditions to Integers and drop the original string. You can decide your own encoding scheme. (i.e. Sunny=0, Cloudy = 1, Fog = 2, etc.) (5%) 2. Calculate the amount of order for each hour. Show the results in a table and plot a bar chart. (5%) 3. Join the delivery_order with geolocation data frame, calculate the distance between a restaurant and the delivery location, and store the distance in a new column named delivery_distance. (hint: You may need to install an additional library like GeoPandas to calculate the distance between two points). (5%) 4. Using the data from 3, find the top 10 drivers travelling the longest distance. (5%) 5. For each type of order, plot a histogram of meal preparation time. The plot can be done with multiple legends or sub-plots. (note: you can decide your bin size). (10%) 6. (Open Question) Explore the dataset and use a delivery person’s rating as a performance indicator. Is a lower rating usually correlated to a longer delivery time? What might be the contributing factors to the low rate of drivers? Please include one plot and discussion based on your observation (no word limit but please keep it concise). (10%) Part3: RDDs vs DataFrame. vs Spark SQL (25%) Implement the following queries using RDDs, DataFrame in SparkSQL separately. Log the time taken for each query in each approach using the “%%time” built-in magic command in Jupyter Notebook and discuss the performance difference between these 3 approaches. (Complex Query) Calculate the time taken on the road (defined as the total time taken minus restaurants’ order preparation time, i.e., total time - (ready_ts - order_ts)). For each road_condition, using a 10-minute bucket size of time on the road(e.g. 0-10, 10-20, 20-30, etc.), show the percentage of each bucket. (note: You can reuse the loaded data/variables from part 1&2.) (hint: You may create intermediate RDD/dataframes for this query.) 1) Implement the above query using RDDs, DataFrame and SQL separately and print the results. (Note: The three different approaches should have the same results). (15%) 2) Which one is the easiest to implement in your opinion? Log the time taken for each query, and observe the query execution time, among RDD, DataFrame, and SparkSQL, which is the fastest and why? Please include proper references. (Maximum 500 words.) (10%) Submission You should submit your final version of the assignment solution online via Moodle. You must submit the files created: - Your jupyter notebook file (e.g., A1_authcate.ipynb). - A pdf file saved from jupyter notebook with all output following the file naming format as follows: A1_authcate.pdf
BA AND BSc LABOUR ECONOMICS L1039 IMPORTANT 1. Always access Canvas using Google Chrome, Microsoft Edge, or Firefox. Do not use Safari 2. If you have problems accessing your exam email your school office immediately [email protected]. 3. You must start this exam at the time published in your Sussex Direct Timetable. 4. Your submission must include: · Your candidate number (Do not put your name on your paper) · The title of the module and the module code 5. You are advised to save and submit your assessment in pdf format, as this prevents issues with file corruption. It is also the only format that will be considered/accepted if you have issues uploading by the deadline. 6. You have 2 hours 30 minutes to complete AND submit the exam (note that Sussex Direct will only show the work time of the exam in your Assessment Timetable). Note: You may submit your exam as many times as you wish before the exam ends When submitting through Canvas Online, all submissions will be recorded, but only the last submission will be marked. 7. Allow enough time (at least 30 minutes) to ORGANISE, SAVE, and SUBMIT. Do not leave the uploading/submission to the last 5 minutes. It may result in you missing the deadline and having to do a resit. 8. If you have extra time due to Reasonable Adjustments this is already added to your exam on Canvas, and you will see a different deadline to the one below. 9. After the exam end time you will NOT be able to submit because the Canvas link will have expired. If you fail to submit by the deadline/exam end time, your exam grade will be ZERO. 10. If you are facing issues with your file upload, please read and refer to the submission issue guidance on the last page of this document. Date: Wednesday 8th January 2025 Exam Start Time: 14:00 Exam End time (includes time for uploading – see above): 16:30 The Exam End time is when the Canvas link closes, and you will no longer be able to submit Candidates must attempt THREE questions. The STRICT word count is 2,500 words for all three questions. All answers MUST be TYPED (You may add hand-drawn graphs/ equations)