Assignment Chef icon Assignment Chef

Browse assignments

Assignment catalog

33,401 assignments available

[SOLVED] PSTAT 160A Stochastic Process Fall 2024

PSTAT 160A: Stochastic Process: Fall 2024 Syllabus Lectures Time and Location • Monday, Wednesday (Section 100): 2:00-3:15 PM BUCHN 1920; • Monday, Wednesday (Section 200): 5:00-6:15 PM HSSB 1173. •  The lectures will be in-person only, unless stated otherwise. Note that there will be no recordings of the lectures available. Office Hours (tentative) • Tuesday 11 AM-1:00 PM at Room No: 5505 (or Sobel seminar room), South Hall. • Meetings can be scheduled by appointment via email at pvellais@ucsb .edu. Teaching Assistants 2-3:15 PM Session PMILP @. PMILP @. PMGIRV PMSessionSectiondayTimeRoomNameEmail44503      T3-3:50 4105Juan M Becerra[email protected]44511      T4-4:50 3314MengruiZhangmengruiucsbedu44527      T5-5:50 4209MengruiZhangmengruiucsbedu/ -1Lecure - Min50Quiz  7-1015 Min20Quiz .25()Lect11-1415 Min20Finalpm 4:00-6:00Dec Mon Min70Finalpm 7:30-9:30Dec.10(Tues)Lect1-19120 Note: The Mid-term test and the final exam are cumulative. There will be no make up quiz or test. Contents to be Covered •  Probability Review:  Conditional Probability, Random variables, Distributions,  Conditional Expectation, Limit Theorems, Moment Generating Functions. (Chapter 1 & Appendix B) • Markov Chains: First Steps (Chapter 2) • Markov Chains: Long-Term Behavior (Chapter 3) • Counting Processes: Poisson Process (Some Parts of Chapter 6). Note: Some aspects (parts of Chapter 5) on Markov Chain Monte Carlo (MCMC) methods will be discussed, if time permits.

$25.00 View

[SOLVED] 7SSGN110 Environmental Data Analysis Practical 7 Time Series Analysis Frequency Domain Ja

7SSGN110 Environmental Data Analysis | Practical 7 | Time Series Analysis – Frequency Domain 1. Introduction and data processing The aim of this practical is to explore time-series analysis in the frequency domain (spectral analysis). The instructions in this exercise are perhaps less-detailed than previous practical sessions. At this stage you hopefully have sufficient skills to navigate and solve individual little details and steps along the way. We will use data from the London Air Quality Network; this is an excellent resource for data on lots of air quality variables, including CO2, NOx, Ozone, PM10, and so-on from many locations around London. You can easily find their general website homepage, but we’re interested in the data download section here: https://www.londonair.org.uk/london/asp/datadownload.asp  Have a look and try to download/access data from one of the many monitoring stations. When you select a certain dataset it will show you a graph and generate a link to download the data in a .csv file format. Note that if the dataset gets too large (roughly >65,000 values, which is the old Excel limit, in fact) the download fails. For the next exercise we want to use hourly data over a very long span of time (10 years). Because these data need to be downloaded in chunks (and because we don’t want to overload the LAQN data servers with 40+ simultaneous downloads) the relevant data is provided to you as a .csv file on KEATS. The data consist of hourly readings of NOx at the Marylebone monitoring station, from 1/1/2011 00:00 through 31/12/2020 23:00. NOx is the sum of the concentrations of NO and NO2 in the air, gas pollutants emitted from combustion engines. Concentrations of NOx in the air are also affected by temperature and solar radiation. Loading the data 1) Explore the Marylebone .csv file: 2) Open the file in Excel first, so that you have a good understanding of the variables. Scroll down through several 100s of rows of data. You will see there are gaps in the NOx data; this is a common feature of real datasets. 3) Open RStudio and read the .csv into an R dataframe. called data 4) Make sure you understand the variables in the dataframe. 5) Plot the data as a time-series to explore it visually 2. Autocorrelation Before doing spectral analysis, we’ll explore the autocorrelation in the time-series to see if there is a specific dominant periodicity. You have learned how to calculate the autocorrelation using acf() in last week’s practical. Try running the autocorrelation function on your data, e.g. acf(data$value). You will notice that this returns an error. This is because of the missing values. The error can be resolved by specifying:  acf(data$value, na.action=na.exclude). Have a look at the autocorrelation function plot. · Q1: what do you think the autocorrelation peaks are associated with? The lag range in the default ACF here is limited to just 50. What if we want to explore autocorrelations over much longer lags? Look up the usage of R’s acf function online (Google search or by typing ?acf in the console). · Q2: if we want to explore up to a lag of 2 months, how many sampling points does this represent? Run the acf function to a maximum lag of 2 months, and review the plot. · Q3: can you see evidence of a second periodic cycle in the time-series? We have seen that you can use the autocorrelation function to explore periodicities, but it gets harder to detect beyond just one dominant periodic signal, and also harder for much longer cycles. Spectral analysis is a much more powerful technique for detecting periodicities in time-series over a very wide range of time-scales. 3. Spectral analysis Before embarking on data analysis it is always good to try and imagine what sort of results you might expect. Given what you know about the variable here (NOx in the air besides a roadway) and based on what you can see in the time-series: · Q4: what kind of periodicities would you expect to encounter in the time-series? The basic R command for spectral analysis is the spectrum() function. Try running the spectrum function on your data, e.g. spectrum(data$value). You will again notice that this returns an error. This is because of the missing values. The error can be resolved by specifying:  spectrum(data$value, na.action=na.exclude). Have a look at the periodogram. There seem to be various peaks… · Q5: can you associate specific peaks to your expectations? The raw periodogram is very ‘noisy’ and this can be reduced by applying a smoothing filter over some scale defined as a span in the R function: spectrum(data$value, na.action=na.exclude, span=30). Play around with different lengths for the smoothing filter. Determining the time-scales of the peaks from the periodogram is difficult because of the default x-axis settings in the function: it scales the frequencies so that 1 = one cycle over the length of the time-series (3652.958 days…). We will now store the results from the spectrum() function into a dataframe. so that we can manipulate the outputs: data.spect

$25.00 View

[SOLVED] COMPSCI 4039 PROGRAMMING 2020 Java

PROGRAMMING COMPSCI 4039 Thursday 30 April 2020 1. For each of the following code snippets, write the output that the code would produce and describe why the output is as it is, paying particular attention to the looping criteria: how i is initialized, how and when it is changed, and how the loop terminates. (a) for(int i=0;i

$25.00 View

[SOLVED] Lab Exercise 8 Dictionaries and Class Inheritance Python

CS152 Lab Exercise 8: Dictionaries and Class Inheritance This project continues our work with classes within the domain of physical simulations. This is the second part of a multi-part project where we will look at increasingly complex physical simulations. This week we incorporate class inheritance, more custom shapes, and sophisticated collisions. Lab Tasks (L1-L3) L0. Setup Make one folder called Project_08 where you keep your CS 152 files. Then copy the Zelle graphics package and your physics_objects.py into this folder. In the project we are going to we are going to use a dictionary as a “router” or “selector” for what type of collision is required. Just in case you are still a little rusty on dictionaries we will start with a quick review and an exercise. You can watch a video about dictionaries from Prof. Maxwell:Dictionaries L1. Review Exercise on Dictionaries Dictionaries are a different method of storing information. A dictionary is a data type like a list, but the information in a dictionary is not stored in sequential order. Instead, each value stored in a dictionary has a unique key. In a dictionary, the key plays the same role as the index in a list.   The difference is that a key can be any Python type that is immutable (can't be modified). These include the types int, str, float, and tuple. Examples of valid keys are: 1, 42, '42 ', 'ice cream ', 'chocolate ', 'cookie ', 1.7, and (5, 'blueberry ', 'muffins '). Create a new Python file called wordmap.py. Put your name and a date at the top of the file in  a file header (triple quotes), then start a main function (no parameters). The goal of this program is to give the user a set of word prompts and then record their answer. To record the answer, use a dictionary with the word as the key and the response as the value. The pseudocode to do this is below: 1.   Print out a prompt for the user that tells them what to do. 2.   Create a list of about ten words, call it words. Leave space after each word (ex: “yes_”, “no “ , … ) 3.   Create an empty dictionary, called mapping ={}. 4.   Loop over the  words list. Each time through the loop, do two things. First, assign a response the return value of input, using the word as the argument to input. Second, using the word as the key for the empty dictionary mapping, assign to your dictionary the response (the output from input). 5.   Finally, loop over the keys in mapping (for key in mapping.keys ()) and print out the key/response pairs using the dictionary   .get (key) method to show the user their results. L2. Refactoring (rewriting) our Classes with Inheritance Watch a video from Prof. Maxwell about inheritance: Inheritance Inheritance is sharing the capabilities of one class with one or more other classes. This week we are going to use inheritance to simplify the code in the physics_objects.py file and make it easier to create new kinds of shapes. The goal is to create a parent class, Thing, that has all of the common fields and methods for physical objects. Then we will create child classes, like Ball, Block, and  Triangle, that make use of the parent Thing class. a. Define a parent class named Thing Edit your physics_objects.py file so that it now has a Thing class defined in it. Add a comment indicating that this class is the parent class for simulated objects. b. Define the Thing init method The init method for Thing should have two required parameters, win and the_type. The win parameter will be the GraphWin window for drawing and the_type will be the type of thing being created (e.g. a string like 'ball' or 'block'). You can add any number of default parameters for the remaining fields later on. In the init method, create the following fields and assign them either a reasonable default value or their corresponding parameter. type                        A string, indicating the type of the object.  (e.g., self.type = the_type) mass                       A scalar value indicating the mass of the object. position                   A 2-element list indicating the current position of the object. velocity                   A 2-element list indicating the current velocity of the object. acceleration            A 2-element list indicating acceleration acting on the object. elasticity                 The amount of energy retained after a collision. scale                       The scale factor between the simulation space and pixels. Default to 10. win                          A reference to the GraphWin object representing the window. vis                           An empty list that will hold Zelle graphics. color                        An (r, g, b) tuple. A good default value is black (0, 0, 0). drawn                      A boolean indicating if the shape has been drawn, initially False. c. Create the get methods Create get methods for all of the above fields except vis, win, and drawn. For most of them, you can copy and paste the code from the classes from last week. d. Create draw and undraw methods The draw method should loop over the self.vis list of graphics objects and draw them into the window specified by self.win. The draw method should finish by setting self.drawn to True. The und raw method should also loop over the self.vis list of graphics objects and undraw each one. The undraw method should finish by setting self.drawn to False. e. Create the set methods Create set methods for all of the above fields except type, position, scale, win, vis, color, and drawn. These methods will all be simple and should only update the value of the corresponding field. f. Create the setPosition method def setPosition (self, px, py): There is no change from last week's function. 1.   Calculate the difference between the new position (px, py) and the current position (i.e. self.position[0] and self.position[1]). Put these values in dx and dy. 2.   Update the ball's position fields with the new position. 3.   Multiply dx by self.scale and dy by -self.scale. 4.   In a for loop, move all of the items in the vis list by dx and dy. g. Create the setColor method def setColor (self, c): # takes in an (r, g, b) tuple For the setColor method first set the color field to   c. Then, if c is not None, it should   loop over the self.vis list and set the fill color of each object to the specified color. You may want to override this method in the child classes. (Remember to use gr.color_rgb () to convert the three values in c into a Zelle color object. e.g. ((gr.color_rgb (c [0],c [1],c [2])) h. Create an update method The update method is identical to the prior week's method from the Ball class. It should update the simulated position and velocity using the standard equations of motion. It should also move the graphics objects the appropriate amount. L3. Create a new Ball class that inherits from the Thing class class Ball(Thing): The Ball class will need four methods, init , refresh, getRadius, and setRadius. a. Define the init method The init method should have win as the only required argument, but you may also want to add radius, x0, y0, and color as default arguments so you can create a Ball in a location (x0, y0), of a particular size and color. The first step in the init method is to call the Thing (parent) init method. Call it by using the name of the class, Thing, followed by the name of the method, init , connected by a dot (. The first three arguments should be self, win, and the string "ball". Thing. init (self, win, "ball") b.   You may also want to pass in other parameters if you have them as optional arguments  to the Thing init method. Second, create a field self.radius and assign it     the radius of the Ball. Third, call self.refresh (), which is a function that will define the vis list. Finally, call self.setColor (). c. Define a refresh method The refresh method should implement the following algorithm. Assign to a local variable (e.g. drawn)the value of self.drawn if drawn: undraw the object (use self.undraw ()) Define the self.vis list of graphics objects using the current position, radius, and window if drawn: draw the object To define the vis list you can use the same code as last week. d. Define getRadius and setRadius def getRadius (self): The get Radius method should return the current value of the radius field. def setRadius (self, r): The set Radius method should assign r to the radius field and then call self.refresh (). Once you have completed this, download the files test_ballclass.py and .py. Put them both in the same folder as your new physics_objects.py file. Running test_ballclass.py should create two balls and send them into a single collision. When you are done with the lab exercises, begin the project.

$25.00 View

[SOLVED] FIN2002S Principles of Finance Java

FIN2002S Principles of Finance PART 1:  INTRODUCTION This Study Guide is designed to provide you with details of the module FIN2002S – Principles of Finance, the learning outcomes, delivery and assessment arrangements. The Study Guide consists of 6 parts. Part 1 gives background details to the subject area are provided and the broad aims of the module are set out. Part 2 consists of the module outline. In this part the (a) module learning outcomes, (b) the themes and topics to be explored are explained along with the (c) learning supports to be used. Part 3 gives details of the module delivery arrangements. It sets out the session arrangements and the expectations in relation to your prior preparation and student engagement. Part 4 provides details of the assessment techniques used in this module explaining the assessment components, their rationale. Part 5 explains the UCD grading policy and grade descriptors drawing on the university document are given for each assessment component (i) Assignment and (ii) Examination. Part 6 presents the concluding comments.   Accessing Live Zoom Classes Please log into Brightspace, go to “FIN2002S-Principles of Finance-2023/24 Summer”, click “My Class”, “Zoom”.  Please always login using your UCD email address and your name. Your name should be visible to the lecturer and other students to facilitate collaboration. Please join your online session no later than five minutes before the advised time of your session. Engagement tools on ZOOM Throughout the online sessions for this module, you will be frequently asked to engage with both your lecturer, and with your fellow students. The lecturer may send you into breakout groups and you discuss some class content in smaller groups before your findings are discussed with the whole class. You may use the “Share Screen” function (if enabled) to show some summary points of the breakout group discussions. If you select “Chat”, a chat window will open and you can communicate with the whole class or with your lecturer. If you would like to send a private message to your lecturer, please select your lecturer’s name instead of everyone. By clicking on “Reactions”, another menu will open. This menu allows you to raise your hand if you have a question or would like to comment. If you see a hand icon in the left upper corner of your screen, your hand is currently raised. You can lower your hand by clicking on this icon a second time. The lecturer can also lower your hand. When you join a Zoom session, you will be muted, and your camera is turned off. But for better engagement in the class, it is advised to keep your camera turned on. Please only unmute yourself if you would like to speak to avoid background noises. You can change your audio and video setting by clicking the small arrow beside the “Unmute” or “Start Video” icon. For more information please see https://buselrn.ucd.ie/student/category/using-zoom/ Background Details a. Background to the Topic This course provides an introduction to the principles of banking and finance. It module covers the fundamental basics of finance. The module will address issues such as why corporate finance is important and will introduce the theoretical underpinnings of financial concepts. A comprehensive range of issues including the role of corporate governance and agency theory in finance, how the stock and bond markets function, pricing stocks and bonds, and capital budgeting techniques will be introduced. The topics covered in this module will allow students to learn about the concepts and theories in finance that would help investors and business decision-makers in making investment and financing investments as well as knowing how risk can be managed. The knowledge obtained from this course would be very valuable for one’s to embark on a professional or business career in either the Financial Markets or the different Financial Institutions. b. Module Aims The aims of this module are to - enable students to understand the importance of corporate finance and the theoretical underpinnings of financial concepts. - enable students to understand the valuation of stocks and bonds. - enable students to understand the role of corporate governance and agency theory in finance. - allow students to apply capital budgeting techniques in the project evaluation process Module philosophy The module draws on student prior learning and work experience and combines insights from strategy, international trade and investment theory, human resource management and other areas. The assessment tasks for this module have been designed with this in mind as detailed later in the study guide. Programme Goals Programme Goals Specify the overall programme goal and insert a one-line description of each goal. Programme Learning Outcomes Specify the learning outcomes associated with each programme goal.   On successful completion of the programme students should be able to: FIN2002S (Sg) Principles of Finance   Module Components   1)       Programme Goal 1: Informed Thinkers: Our graduates will be knowledgeable on management theory and will be able to apply this theory to business problems (Knowledge).   Programme Learning Outcome 1a: Explain current theoretical underpinnings of business and the management of organisations. X (Exam question, Individual Assessment) Programme Learning Outcome 1b: Apply appropriate methods, tools and techniques for identifying, analysing and resolving business problems within functional and across functional business areas. X (Exam question, Individual Assessment, Group Assessment) 2)       Programme Goal 2: Communication, Analytical and Critical Thinking Skills: Our graduates will have well developed skills of communication, analysis and critical thinking (Skills and Competencies).   Programme Learning Outcome 2a Prepare a short business presentation (written and/or oral) on a current business issue.   Programme Learning Outcome 2b: Analyse specific business case studies or problems and formulate a report detailing the issues and recommended actions. X (Individual Assessment) Programme Learning Outcome 2c: Conduct secondary research on management-related issues and report on the findings and draw appropriate conclusions.   3) Programme Goal 3: Personal and Professional Development: Our graduates will demonstrate a commitment to personal and professional excellence and development (Skills, Competencies and Attitudes). Programme Learning Outcome 3a: Develop collaborative learning and team-work skills by engaging in module-related team activities. X (Group Assessment) Programme Learning Outcome 3b: Demonstrate capacity for problem solving collaboratively and individually. X (Individual Assessment, Group Assessment) 4)       Programme Goal 4: Ethical Awareness:  Our graduates will demonstrate an awareness of ethical issues in business and their impact on society (Attitudes). Programme Learning Outcome 4a: Demonstrate an awareness of ethical values and business issues concerning the advancement of the broader societal ‘good’. X (Individual Assessment) Programme Learning Outcome 4b: Illustrate an understanding of how business decisions might influence society and the wider community at large. X (Individual Assessment)  

$25.00 View

[SOLVED] SSK5221 Internet of Things First Semester 2024/2025 Individual Assignment 1 Python

SSK5221 Internet of Things First Semester 2024/2025 Individual Assignment 1 Write an article discussing Internet of Things paradigm and related technology. The topic could be something  related  to your domain and field of interest. The article should  be  broadly  scoped  - typically, review and tutorial articles that suited for magazine style. Technical articles may be suitable but these should  be of general  interest  to  normal audience and  of broader scope than archival technical papers. Tutorial type, review or survey article is suitable for the scope of assignment. The length of article should be around 4500-6000 words, written using provided templates. You can refer to related journals/articles: a.  IEEE Internet of Things Journal b.  ACM Transactions on Internet of Things (TIOT) c.  Elsevier Internet of Things d.  Other related journals/ transactions related to IoT articles Sample topics could something similar as follow but not limited to: -    A Survey on the Role of IoT in Agriculture for the Implementation of Smart Farming -    A Survey of IoT Management Protocols and Frameworks -    Deep Learning for IoT Big Data and Streaming Analytics: A Survey -    Sensing, Computing, and Communications for Energy Harvesting IoTs: A Survey -   IoT Middleware: A Survey on Issues and Enabling Technologies -    A Survey on IoT Security:     Application    Areas,     Security     Threats,    and     Solution Architectures -    Smart Home Based on WiFi Sensing: A Survey -    IoT in the Fog: A Roadmap for Data-Centric IoT Development -    Context-Aware Computing, Learning, and Big Data in Internet of Things: A Survey Evaluation Scheme This  is an  individual assignment. You will  be evaluated  based on  article deliverables, which are submitted based on the given template. The article should have clear and sufficient introduction, related works, methodology, experiment if necessary, results and discussion, conclusion, references, and appendices. However, variation of content organization is permissible. You also must submit softcopy of the article. Deadline is 10th January 2025.

$25.00 View

[SOLVED] CS152 Project 8 Pinball Wizard Python

CS152 Project 8: Pinball Wizard The focus of this project is to continue reworking our classes into an inheritance hierarchy and adding new shapes to our visualization. We will also use a dictionary to make working with collisions more streamlined. Project Tasks T1. Create a Block class The first task is to create a Block child class using inheritance. The parent class is Thing). a.   Define the Block      init     method The      init    method should have the following signature. You are welcome to add additional optional arguments. def    init   (self, win,x0=0,y0=0,width=2,height=1, color=None): As with the Ball class, the first action in the      init     method is to call the parent Thing.    init    method. Specify the type as the string "block". Any parameters you don't pass to the Thing.    init    method should then be assigned to their proper field. Assign the dx parameter to the field self.dx and the dy parameter to the field dy. You can use self.width and self.height if you wish (or any other names of your choice). Finally, call self.reshape() and self.color() to set up the vis list and set the color. b.   Create the reshape method def reshape (self): The reshape method should undraw the graphics objects if they are drawn. Then it should define the self.vis list of graphics objects using the current fields. Then it should draw the graphics objects if they are drawn. Note that if you use the undraw and draw methods, they  affect the value of self.drawn. Therefore, it's best to make a local copy of self.drawn and use that to test if the object needs to be undrawn/drawn. When creating the visualization for the Block, put the anchor point in the center of the block. One corner should be at (x0-width/2, y0-height/2) and the other corner should be at (x0+width/2, y0+height/2). c.   Write getWidth and getHeight These two functions should return the width or height of the block. d.  Write setWidth and setHeight These two functions should update the value of the width (dx) field or the height (dy) field and then call the reshape method. T2. Make another shape class of your choice Choose a shape. It can be a polygon (e.g. a triangle or a pentagon) or it could be a multi-object shape like a snowman. The new shape class should inherit from Thing. The       init    method should make sure all the necessary information is provided and finish by calling reshape and setColor. The reshape method should define the graphics objects that define the simulated object. It's   ok if this class is just a single graphics object. When you define the object's visualization, define it so that the object's position corresponds to the center of the object, just like it did for the Ball   and Block classes. If the shape is best modeled as a block (for the purpose of collisions) then it will need getHeight, getWidth, setHeight, and setWidth methods. If the shape is best modeled as a circle, then it will need getRadius and setRadius methods. If the class has a complicated color scheme, you may need to write a setColor for the child class. If the class is a multi-shape object, you may need to write a set Position function for the child class. T3. Write a unified collision function The next task is to modify the collision.py file to make it simpler to call the right collision function no matter what types of objects are involved. (Note, the collision functions all work with a ball and something else. We don't yet have block-block collisions, for example.) The idea is to use a dictionary with the two types involved in the collision as the key, making use of the type field in the Thing class. For example, if we have two objects, item1 and item2, we can create a key by writing: key = (item1.getType (), item2.getType ()) The key is a tuple that has two strings in it. Then, we can generate a dictionary entry that contains all the possible keys and stores the proper function to call in each case. For example, the following creates an entry in the dictionary collision_router with the key ('ball', 'ball') and sets its value to the function reference collision_ball_ball. collision_router [ ('ball', 'ball') ] = collision_ball_ball The above line creates a new entry in the collision_router dictionary with the key ('ball', 'ball') and its value is a function reference to the collision_ball_ball function (note there are no parentheses after collision_ball_ball). This entry in the dictionary can be used to call the collision_ball_ball function using the following syntax. collision_router [ ( 'ball ', 'ball ') ] (thing1, thing2) At the bottom of the collision.py file, at the top level (meaning totally unindented), create an empty dictionary called collision_router. Then add an entry to the dictionary (as above) for each possible collision of a ball and another type: ball, block, and the additional shape you created (which should be treated as either a ball or a block. Finally, create a function called collision (ball, thing,timestep)that takes in two Thing objects plus a time step and uses the collision_router dictionary to call the right function. Assume that the ball is always the first parameter and the other object (ball, block, or other) is  the second parameter. T4. Create an animated scene with obstacles Required Element 1: pinball.py Create a new file name pinball.py In this file you will create a scene that is like a pinball table. If you don’t know what that is follow this link: Pinball Machine Your pinball machine should have outside boundaries made of rows of blocks and some obstacles inside the box that are all stationary. It does not need to be completely enclosed. The default behavior. should be for the program to launch a single ball into the scene and have it bounce around. To create the scene, the following is a suggested structure for your code to get started. def buildObstacles (win): # Create all of the obstacles in the scene and put them in a list # Each obstacle should be a Thing (e.g. Ball, Block, other) # You might want to give one or more the obstacles an elasticity > 1 # Return the list of Things def main (): # create a GraphWin # call buildObstacles, storing the return list in a variable (e.g. shapes) # loop over the shapes list and have each Thing call its draw method # assign to dt the value 0.02 # assign to frame the value 0 # create a ball, give it an initial velocity and acceleration, and draw it # start an infinite loop # if frame. modulo 10 is equal to 0 # call win.update () # using checKey, if the user typed a 'q' then break # if the ball is out of bounds, re-launch it # assign to collided the value False # for each item in the shapes list # if the result of calling the collision function with the ball and the item is True # set collided to True # if collided is equal to False # call the update method of the ball with dt as the time step # increment frame. # close the window if    name   == "  main   ": main () Doing visual updates only every 10th frame. will make the animation smoother. What that does is run the virtual simulation for 10 time steps and then redraw the objects in their new positions. You can adjust both the time step and how often the visualization is redrawn to change the visual behavior. of the simulation. Required Element 2: Create a video of your pinball machine in action and upload a copy along with your Google Doc report. T5. Create one more shape class Create a new class that makes a new shape with at least two graphics objects. Consider this object to be of type ball for the purpose of collisions. Replace the ball in your obstacle scene  with the new shape (so the new shape should be bouncing around). Required Element 3: Create a video which includes your compound shape and upload a copy along with your Google Doc report. Follow-up Questions 1.   What is inheritance? 2.  What does it mean for a child class to override a method? 3.  What is a class variable or class global variable? 4.  What is a field of an object? Extensions Extensions are your opportunity to customize your project, learn something else of interest to you, and improve your grade. The following are some suggested extensions, but you are free to choose your own. Be sure to describe any extensions you complete in your report. ●    Make your pinball game interactive giving the user some control over the visualization.  Perhaps they could launch multiple balls, change the attributes of the balls or otherwise modify the scene in some way. ●   Create more elaborate spaces and develop interesting additional simulation videos. ●   Create more shape classes and show that they collide and simulate appropriately. ●   Add the capability to hit the ball with a block. ●   Create a separate scene game like putt-putt golf and let the user shoot the golf ball. Write your project report Reports are not included in the compressed file! Please don’t make the graders hunt for your report. You can write your report in any word processor you like and submit a PDF document in the Google Classroom assignment folder. Or use a Google Document format. Review the Writeup Guidelines document in the Labs and Projects folder. Your intended audience for your report is your peers who are not taking CS classes. From week to week, you can assume your audience has read your prior reports. Your goal should be to explain to peers what you accomplished in the project and to give them a sense of how you did it. The following is a list and description of the mandatory sections you must include in your report. Do not include the descriptions in your report,  but use them as a guide in writing your report. ●   Abstract A summary of the project, in your own words. This should be no more than a few sentences. Give the reader context and identify the key purpose of the assignment. An abstract should define the project's key lecture concepts in your own words for a general, non-CS audience. It should also describe the program's context and output, highlighting a couple of important algorithmic and/or scientific details. Writing an effective abstract is an important skill. Consider the following questions while writing it. ○   Does it describe the CS concepts of the project (e.g. writing well-organized and efficient code)? ○   Does it describe the specific project application (e.g. generating data)? ○   Does it describe your solution and how it was developed (e.g. what code did you write)? ○   Does it describe the results or outputs (e.g. did your code work as expected and what did the results tell you)? ○   Is it concise? ○   Are all of the terms well-defined? ○   Does it read logically and in the proper order? ●   Methods The method section should describe in clear sentences (without pasting any code) at least one example of your own computational thinking that helped you complete your project. This could involve illustrating how a key lecture concept was applied to creating an image, how you solved a challenging problem, or explaining an algorithmic feature that is essential to your program as well as why it is so essential. The explanation should be suitable for a general audience who  does not know Python. ●   Results Present your results in a clear manner using human-friendly images or graphs labeled with captions and interpreted for a general audience such as your peers not in the course. Explain, for a general, non-CS audience, what your output means and whether it makes sense. ●   Reflection and Follow-up questions Draw connections between lecture concepts utilized in this project and real-world problems that interest you. How else could these concepts apply to our everyday lives? What are some specific things you had to learn or discover in order to complete the project? Look for a set of short answer questions in this section of the report template. ●   Extensions (Required even if you did not do any) A description of any extensions you undertook, including text output or images demonstrating those extensions. If you added any modules, functions, or other design components, note their structure and the algorithms you used. ●   References/Acknowledgements  (Required even if there are none) Identify your collaborators, including TAs and professors. Include in that list anyone whose code you may have seen, such as those of friends who have taken the course in a previous semester. Cite any other sources, imported libraries, or tutorials you used to complete the project. Submitting your Project Report and Code Turn in your code by zipping the file and uploading it to Google Classroom. When submitting, double check the following. 1.   Is your name at the top of each Python file? 2.   Does every function have a docstring (‘’’ ‘’’) specifying what it does? 3.  All your code is in your Project 08 folder? 4.   Have you checked to make sure you have included all required elements and outputs in your project report? 5.   If you have done an Extension, have you included this information in your report under the Extension heading? Even if you have not done any extensions, include a section in your report where you state this. 6.   Have you acknowledged any help you may have received from classmates, your instructor, the TAs, or outside sources (internet, books, videos, etc.)? If you received no help at all, have you indicated that under the Sources heading of the report?

$25.00 View

[SOLVED] EN553413-613 Spring 2024 EN553413-613 Spring 2024 Exam 1 SQL

Applied Stats and Data Analysis EN.553.413-613, Spring 2024 Feb 21, 2024 Exam 1 Question 1 (18 pts). The following TRUE/FALSE questions concern the Simple Linear Regression model Yi = β0 + β1Xi + εi , E(εi) = 0, V ar(εi) = σ 2 , cov(εi , εj ) = 0, for i = j. (a) TRUE or FALSE. For the least squares estimates b0, b1 we require the errors to be normally distributed. (b) TRUE or FALSE. The estimated mean of the response variable at Xi is defined as b0 + b1Xi . (c) TRUE or FALSE. One of the Gauss Markov conditions is P n i=1 ei = 0. (d) TRUE or FALSE. Plotting e 2 i vs Yˆ i is one of the diagnostic plots. (e) TRUE or FALSE. QQ plot of the Yi ’s is one of the diagnostic plots. (f) TRUE or FALSE. Low R2 means that X and Y are not related. (g) TRUE or FALSE. The s 2 is an estimate of the variance of Yi . (h) TRUE or FALSE. Coefficient of simple determination R2 measures the proportion of the explained variation in Y over the unexplained variation in Y . (i) TRUE or FALSE. In the Correlation model of the regression Xi ’s are random variables. Question 2 (18 pts). Let X, Y, Z ∼ iid N(0, 1), i.e. they are independent, identically distributed standard normal random variables. For the following random variables state whether they follow a normal distribution, a t- distribution, a χ 2 distribution, an F distribution, or none of the above. State relevant parameters (e.g. degrees of freedom, and means and variances for normal RVs) (a) 3Y − Z (b) X + Y + Z. (c) X2 + Y 2 + Z 2 . X2 + Y 2 (d) 2Z2 X2 (e) √ Y 2 + Z2 (X + Y ) 2 (f) 2 Question 3 (20 pts). Suppose a data set {(Xi , Yi) : 1 ≤ i ≤ n} is fit to a linear model of the form. Yi = β0 + β1xi + εi where εi are independent, mean zero, and normal with common variance σ 2 . Here we treat Y as the response variable and X as the predictor variable. The output of the lm function is given. Some values are hidden by ‘XXXXX’. We provide you with additional value: X¯ = 1.11. Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 1.9412 0.4593 4.226 0.000508 *** x 0.7042 0.3697 1.905 0.072911 . --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: 0.9221 on 18 degrees of freedom Multiple R-squared: 0.1678, Adjusted R-squared: ----- F-statistic: XXXXX on XX and XX DF, p-value: XXXXXX (a) (2 points) How many data points are there (what is n, the sample size)? What is the estimated mean of the response variable Y at Xh = 2 for this dataset? (b) (3 points) Based on all of this output, do you reject H0 : β1 = 0 in favour of Ha : β1 = 0 at level α = 0.05 significance? What does the test tell us about the relationship between X and Y ? (c) (3 points) Based on all of this output, do you reject the H0 : β1 = 0 vs Ha : β1 > 0 at level α = 0.05 significance? Briefly explain why, or why not. (d) (4 points) The degrees of freedom, the p-value and the value of the F statistic are hidden. Is it possible to reconstruct all of them based on the data shown? Recover as many values as you can. (e) (4 points) Based on the data above find SSTo, SSR and SSE. Hint: Residual standard error may be useful here. (f) (4 points) Find the 95% confidence interval for the mean of the response function at Xh = 2. Write your answer in the form. A ± B · t(C, D), specify values A, B, C, D as precise as you can (i.e. find values of as many terms as you can). Question 4 (14 pts). Consider the following diagnostic plots for two models (Model 1 and Model 2). Two simple linear regression models Y = β0 + β1X + ε are fitted to the two different datasets (X, Y ) observations of each Model. For each model 3 diagnostic plots are shown: plot of Yi vs Xi , plot of semi-studentized residuals e ∗ i versus fitted values Yˆ i , QQ-plot of the semi-studentized residuals e ∗ i . (a) (5 points) What is the main issue do you diagnose with the Model 1, if any? Why? Which plot was the most useful in diagnosing this problem? Be as specific in describing the issue as you can. (b) (5 points) What is the main issue do you diagnose with the Model 2, if any? Why? Which plot was the most useful in diagnosing this problem? Be as specific in describing the issue as you can. (c) (4 points) This question is unrelated to the above plots. Explain in what cases the transformation of the predictor variable X is more appropriate than the transformation of the response variable Y . Question 5 (20 points). For the dataset of n = 200 observations a simple linear regression model Yi = β0 + β1Xi + εi is fit. The following estimates are obtained. b0 = 2, b1 = 1 We have listed additional information here (a) (2 points) What is the estimated variance s 2 of the error term based on the data above? (b) (3 points) Find a 90% confidence interval for β1. Write it in the form. A ± B · t(C, D), compute values of A, B, C, D if possible. (c) (4 points) Find the joint confidence intervals with confidence at least 90% for β0, β1 in the form. Ai ± Bi · t(Ci , Di). Compute values of Ai , Bi , Ci , Di if possible. Without any computation how does the interval for β1 for this part compare to the one in part (a)? (d) (4 points) Find the joint confidence intervals using Bonferroni procedure with confidence at least 90% for the mean of the response variable at Xh = 2 and Xh′ = 0. Find it in the form. Ai ± Bi · t(Ci , Di). (e) (4 points) Set up a General Linear Test for the data provided: specify the reduced and full model, compute the value of the F-statistic, specify its distribution under the null hypothesis. (f) (3 points) An Aspiring Data Scientist (ADS) noticed that one of the observed data points (Xi , Yi) = (2, 15) lies outside of the 99% Working-Hotelling band (we assume everything was computed correctly). They claim it is an issue. Briefly justify if their concern is correct or not. Question 6 (20 points). Suppose Yi follows the model Yi = βXi + εi where εi is independent, identically distributed N(0, σ2 ). Note, there is no intercept term. You observe a collection {(Xi , Yi)} of data from this model, i = 1, . . . , n. (a) (5 points) Write the objective function to be minimized and the equations that need to be solved to get the least squares estimate of β. (b) (5 points) Solve the equation in (a) and express the answer as a linear combination of Yi ’s. (c) (5 points) What is the distribution of b? Find the mean, variance. Justify your steps (d) (5 points) Write the log-likelihood that needs to be maximized to obtain the estimate of β. DO NOT MAXIMIZE IT. (a) Function to be minimized Equations to be solved: (b) Solving the equation: (c) Since b = P i ciYi , a linear combination of normal RVs, it will be a normal RV itself. The mean is The variance is We have shown that (d) The log-likelihood is

$25.00 View

[SOLVED] Comp 330 Fall 2024 Assignment 1 Python

Comp 330 (Fall 2024): Assignment 1 1. (10 points) Let Σ = {0, 1}. Draw a deterministic finite automaton (DFA) that accepts the language L1 = {w|w has an even number of letters, and                                 w does not have two identical consecutive letters} Hint: You can build a automaton for each language (i.e., “even number of letter” and “no two identical consecutive letters) then construct the product of the two’s. 2. (a) (10 points) Convert the following nondeterministic finite automaton (NFA) into a DFA. (b) (5 points) Use your solution to build another DFA that accepts the complementary language L = { w | w L } 3. Write a regular expression describing the set of strings over the alphabet Σ = {0, 1} that: (a) (10 points) Does not contain the string 110. (b) (10 points) Start and end with the same letter. 4. Let Σ = {0, 1}. Show that: (a) (10 points) the language L2 = { 0 k s0 k | k ≥ 1 and s ∈ Σ* } is regular. (b) (10 points) the language L3 = { 0 k1s0 k | k ≥ 1 and s ∈ Σ* } is not regular. 5. We introduce the rotation operation on languages rot(L) = {xy | yx ∈ L }. (a) (10 points) Show that rot(L) = rot(rot(L))). Start to show that rot(L) ⊆ rot(rot(L)). Then, show rot(L) ⊇ rot(rot(L)). (b) (15 points) Show that a regular language L is closed under the operation rot(). Let ML be a DFA that recognizes L. Show how to build a NFA NL that recognizes rot(L). 6. (10 points) Using the k-path induction method, write a regular expression representing the language accepted by the following DFA. Show your work. Simplify the regular expression as much as you can.

$25.00 View

[SOLVED] MAT E 640 Advanced Thermodynamics in Materials Final Exam 2020SPSS

MAT E 640 Advanced Thermodynamics in Materials Department of Chemical and Materials Engineering Final Exam December 18, 2020 1. Choose whether the following statements are true or false. If a statement is false, explain why? [20] T F The enthalpy of mixing in both ideal solution and regular solution is independent of temperature. T F The Le Chatelier’s principle states when subjected to an external influence, state of system shift in that direction which tends to enlarge the effects of external influence. T F For an incompressible substance, the specific heat at constant pressure is identical with the specific heat at constant volume. T F In a typical phase diagram, as temperature decreases, the Gibbs free energy of both solid and liquid solution as a function of composition also decreases. T F The partial molar value of an extensive property in a mixture is the same as the molar property of its pure component. T F Consider the liquid-vapor saturation curve of a single-component substance on the P-T diagram. The slope of this curve at any point is proportional to the entropy change and inversely proportional to the volume change at that point. T F When A-B solution shows negative deviation from Raoult’s law, A-A and B-B components are more likely forming clusters in solution. T F For a non-ideal gas, it is impossible to liquefy the gas by compression above the critical pressure. 2. Multiple Choice - Circle ONE correct answer for each. (16 marks) i) Which of the following is true for the heat and work during a thermodynamic process? a) q for reversible > q for irreversible and work for reversible < work for irreversible b) q for reversible < q for irreversible and work for reversible > work for irreversible c) q for reversible < q for irreversible and work for reversible < work for irreversible d) q for reversible > q for irreversible and work for reversible > work for irreversible ii) Which of the following figures illustrate the correct dependence of the molar Gibbs free energy on the temperature at constant pressure for a solid? iii) Which constraints must be imposed on system to make the Helmholtz function decrease? a) constant T and P b) constant U and T c) constant U and V d) constant T and V iv) In a P-T diagram, the slopes of sublimation and vaporization curves for all substances are a) negative b) positive c) zero d) none of the mentioned v) During phase transitions like vaporization, melting and sublimation a) pressure and temperature remains constant b) volume and entropy changes c) both of the mentioned d) none of the mentioned vi) The applicability of the assumption of regular solution to a real system increases if the system has a) large W and at low temperature b) small W and at low temperature c) large W and at high temperature d) small W and at high temperature vii) What is the configurational entropy of 5 moles of CH3F at absolute zero K? a) 57.6 J·K-1   b) 11.5 J·K-1   c) 45.6 J·K-1   d) 9.12 J·K-1   e) 0 J·K-1 viii) The van der Waals equation is the equation of state for a non-ideal gas. The properties of a gas predicted by this equation are different from that of an ideal gas. Under what two conditions are the properties of a real gas expected to be the most non-ideal? a) low temperature and high pressure b) high temperature and low pressure c) low temperature and low pressure d) high temperature and high pressure 3. In the following binary system, the Helmholtz free energy of mixing is given by DA = ax1x2 2 J/mole where a is a constant Calculate ∆A1 and ∆A2. (10 Marks) 4. Justify the following statement: if species A behaves ideally over the entire composition range of an A-B binary solution, then species B also behaves ideally. (10 Marks) 5. For sulfur dioxide, Tcr = 430.7 K and Pcr = 77.8 atm. Calculate a) The critical van der Waals constants for the gas. b) The critical volume of van der Waals SO2, c) The pressure exerted by 1 mole of SO2 occupying a volume of 500 cm3 at 500 K. Compare this with the pressure which would be exerted by an ideal gas occupying the same molar volume at the same temperature. (9 Marks) 6. In the P-V diagram, sketch a typical isotherm for a van der Waals gas at temperature below critical temperature. Label the equilibrium pressure as accurate as possible. (5 Marks) 7. The Fe-Cr binary phase diagram is given below. Assuming regular solution behavior. for liquid solution and regular solution behavior. for solid solution. Predict Ωs and Ωl. (10 Marks) ∆Hm (Fe) = 15, 200 J/mole at melting point of Fe ∆Hm (Cr) = 17, 200 J/mole at melting point of Cr AFe =55.85 g/mole, A Cr=52.0 g/mole Assume ΔHm and ΔSm do not vary with T. 8. For the Al-Ca phase diagram given below draw schematics of plausible molar free energy curves showing the common tangent construction as a function of composition, xCa, at T1 = 900 °C, T2 = 640 °C, T3 = 549 °C and T4 = 500 °C. (20 Marks)

$25.00 View

[SOLVED] COM398 Systems Security Matlab

COM398 Systems Security 60% OF THE TOTAL MARK Submission Date:                            9th  December 2024 (12:00 (Noon) UK time) Date returned with feedback:     Within twenty working days after the submission deadline. CW2 is an individual coursework which is worth 60% of the total coursework mark for this module. The successful completion of CW2 will address the following learning outcomes: •   Develop practical prototypes  to  experiment  with  and  reinforce  core  systems  security concepts. •   Illustrate acomprehension of the key issues and principles underlying modern security in computing systems •   Characterise  the  threats faced  by  computing  systems,  applications  and systems;  and examine the role of security risks assessment and management in IT This coursework component requires students to research, write and make a presentation on the topic of traffic analysis during a DoS / DDoS attack using Wireshark. This element would require each student to prepare PowerPoint slides (10-15) and vodcast of the student presenting the slides. The vodcast should be a maximum of 18 minutes long (vodcast exceeding the maximum limit will be penalised according to the following scheme). 18 minutes + 10% No penalty 18 minutes + >10% - 20% reduction in the total mark by 5% 18 minutes + >20% - 30% reduction in the total mark by 10% 18 minutes + >30% - 40% reduction in the total mark by 15% 18 minutes + >40% - 50% reduction in the total mark by 20% 18 minutes +>50% The  maximum total  mark  achievable  is 40% This assessment component is designed to encourage students to reflect critically on the fundamentals of systems security; and relate these fundamental concepts to developments within the field, and to real- world practical examples. The students should submit the PPT they presented along with the video to show their ability to carryout research on the CW topic. This coursework component requires you to prepare (see also notes 1 & 2, and the coursework preparation,  submission   and  provision  of  feedback  sections   below)   a  video-recorded   PPT presentation and the  PPT file  (video +  PPT slides) on traffic analysis using Wireshark.  In this coursework, you will be only considering the TCP/IP protocols for the analysis. Students will have to log their experience (including any Wireshark based visualisation), observations and analysis of the captured  network traffic  in  a  PPT  document  describing  the TCP/IP  protocol  suit,  and addressing some specific points related to the provided Wireshark traffic file (PCAP file). The PPT document and presentation may include (but not limited to) and address the following points: 1.   An explanation of the TCP/IP protocols suit including: a)   The  Transmission Control  Protocol  (TCP)  and  User  Datagram  Protocol  (UDP),  and  the difference between the two protocols b)   The Internet Protocol (IP) c)   The Difference between TCP and IP d)   The work of the TCP 3-Way Handshake Process. 2.   Describe and contrast the  Denial-of-Service (DoS) and  Distributed  Denial-of-Service (DDoS) attacks, and their sub-types. 3.   In the provided PCAP file, identify the type of the attack; any of your observations and analysis of the traffic should be justified and explained by adding suitable Wireshark snapshots (or any suitable Wireshark trace visualisation approach that you can embed in your presentation / video) 4.   What is the IP address of the suspected attacker in the PCAP file? Justify and explain? 5.   Reflecting on the detected attack(s), you should add in your conclusion the possible context / cause(s) that allowed such attack(s) to take place; and countermeasure recommendations. You should prepare your PPT document and presentation in such away that it maybe understood by and useful to a fictitious group of students taking a course in computing and who may be joining placement employers. Although you have the freedom to adopt and follow your own presentation plan and structure, the expectation, however, is that there should bean ‘Introduction’ in which you should cover the TCP/IP protocols suit from which you can elaborate on the DoS and DDoS as in the points above. The body of the report should be divided and partitioned into sections and any appropriate visualization means should be used (e.g snapshots). Your  presentation  should  be  evidence-based  and  supported  by  relevant  and  up-to-date references and links. Sources should include textbooks, academic websites, manufacturers’ web sites, RFCs, white papers and academic literature (conferences and journals). You may use your own selected referencing style. Note 1: You can use data from such sources as evidence but you need to express this in your own words.  Plagiarism will not  be tolerated and will be dealt with according to  University policy: https://www.ulster.ac.uk/student/exams/cheating-and-plagiarism.   It  is  inappropriate  to   make  a presentation based on sources which are not listed. Note 2: You should demonstrate good knowledge and understanding of the topics and points of your  presentation;  and  express  them  with  high  effectiveness,  conciseness  and  succinctness. When preparing your presentation, you should make sure to include only the most relevant references. Coursework preparation, submission and provision of feedback: This coursework should be returned as an electronic submission by the due date specified above. University regulations require that late submissions attract a mark of zero and will be rigorously applied, without exception. If you have extenuating circumstances, you should complete an EC1 form according to your course rules; forms are found on your course website – your year tutor and course director can advise. •   What should be returned is file 1) a copy of the PPT document used as the basis of your presentation (in this case your researched material / script. should either be embedded in the notes section or appended to the end of your PPT document), file 2) the video (in a suitable format, e.g. mp4, you may also use Panopto etc – for a Panopto submission, please  refer to the  material  on  the  module  page)  using  the  CW2  link  in  the  module webpage on Black Board (under assessment in the module webpage). You should also take note of the following: •    Please  ensure  the filename of the submitted  project  folder  archive  is  given  as Your- BNumber_CW (i.e., B0011_CW2-PPT and B0011_CW2-VODCAST). •   As it may be expected that the file to be submitted can be of a substantial size, you are advised to attempt your submission early to avoid any IT related issues. •    Feedback will be provided within 20 working days after submission by the date shown above. Feedback can take the form. of comments and a mark as shown herewith: Criterion                                                                                    Weight Research material (to include extent of background research, quality of analysis and citations & references)                           25 Trace files, traffic or design files analysis (as appropriate; and to include quality of analysis and answers and approach justification)                       40 PPT presentation (to include quality of both PPT and text; ad coherence of the points made)                             20 Video recording (to include quality of recording, creativity, communication, organization and clarity, use of adequate visualization techniques (e.g. snapshots)                             15 Comments: 1) Research Material: The material you present should be evidence-based and supported by relevant and up-to-date references. 2) PCAP files analysis: The analysis should include but not limited to filters and graphs to support your argument(s). 3) PPT presentation: When preparing your presentation, you should be sure to include only the most relevant points on the slides: you can give more details in the notes section if you wish to, however, the purpose of the slide is to be succinct in your information. The background image and snapshots (or additional graphics if you want to use them) and sound/audio effects should be relevant to the points being made on the slide. 4) Video recording: Your recording should demonstrate good knowledge and understanding of the topic of your presentation and express them with high effectiveness.

$25.00 View

[SOLVED] EN553413-613 Spring 2024 Applied Stats and Data Analysis Exam 2 SQL

Applied Stats and Data Analysis EN.553.413-613, Spring 2024 Apr 3, 2024 Exam 2 Question 1 (22 points). Consider the linear model Y = Xβ + ε, where Y is a n-by-1 vector of response variables, X is an n-by-p design matrix, β is a p-by-1 vector of coefficients, ε is a multivariate normal Nn(0, σ2 In). Denote by b the least-squares estimate of β. (a) TRUE or FALSE. Y ∼ Nn(Xb, σ2 I) (b) TRUE or FALSE. Cook’s distance measures the influence of one observation on all fitted values. (c) TRUE or FALSE. The least-squares estimate of β can be expressed as (XTX) −1XTY. (d) TRUE or FALSE. Deleted residuals are the same as Externally Studentized Residuals. (e) TRUE or FALSE. In the Multiple Linear Regression predictors could be both continuous and categorical. (f) TRUE or FALSE. If X has full rank, then the matrix XTX has rank n. (g) TRUE or FALSE. SST o = YT (I − n/1 11T )Y, where ✶ is an n-by-1 vector of 1’s. (h) TRUE or FALSE. Internally studentized residuals are better than externally studentized residuals in determining outliers with respect to Y . (i) TRUE or FALSE. Leverage can detect points that are outlying with respect to both X and Y . (j) TRUE or FALSE. Outliers with large ESR (externally studentized residuals) are always influential. (k) TRUE or FALSE. As we add more predictors, the coefficient of multiple determination R2 may decrease. Question 2 (16 points). In this problem we deal with the same multiple linear regression model as in Question 1. (a) Write the least-squares objective function Q(β) that we need to minimize to fit a multiple linear regression. (b) Write down the formula for the least-squares estimate for the regression vector b in terms of matrices X, Y. You don’t need to derive it. (c) Using the formula above, find E(b) and V ar(b). Show your work. (d) This part could be solved independently from other parts. Compute the covariance matrix Cov(e, Y), where e is a vector of residuals, Y is a vector of fitted values. Simplify as much as you can. What are the dimensions of the matrix Cov(e, Y)? Question 3 (16 points). Below is the sketch of a column space Col(X) of an n-by-2 design matrix X. The vector Y is an n-by-1 vector of values Yi , 1 is an n-by-1 vector of 1’s, X1 is an n-by-1 vector of predictor values Xi1. The dotted line (marked by a) depicts orthogonal projection on Col(X), the dashed line (marked by d) depicts orthogonal projection on the vector of 1’s. Let βb be the least squares estimate of β (a) Express vectors a, b, c, d in terms of Y, X, βb, Y¯ . Here, Y¯ is an n-by-1 vector of Y¯ ’s. (b) Express vectors a, b, c, d in terms of Y, H, I, J, where H is the hat matrix, I is an n-by-n identity matrix, J is an n-by-n matrix of 1’s. (c) If we know the coefficient of multiple determination R2 is very close to 1, what can you say about the vectors in this plot? Be as specific as you can. (d) If we know that there is a multicollinearity, what can you say about the vectors in this plot? Be as specific as you can. Question 4 (20 points). Consider the following regression model: Yi = β0 + β1X1i + β2X2i + εi where the εi are iid N(0, σ2 ). First few observations are listed below: We use lm in R to fit a linear regression model, obtaining the output below: Estimate Std. Error t value Pr(>|t|) (Intercept) 2.9427 XXXXXX YYYYY 0.0044 x1 0.5319 0.2075 2.563 0.0374 x2 0.3204 0.1906 1.681 0.1366 --- Residual standard error: 0.9001 on 7 degrees of freedom Multiple R-squared: 0.5584,Adjusted R-squared: 0.4322 F-statistic: 4.425 on 2 and 7 DF, p-value: 0.05724 (a) State the null and the alternative hypothesis for the model utility test for this model. What is your conclusion at the significance level α = 10%? Briefly explain. (b) Is β1 significant at the significance level α = 0.10? Is β2 significant at the significance level α = 0.10? Briefly explain. (c) Rewrite the model utility test from part (a) in the form. of the General Linear Test: H0 : Cβ = γ,         Ha : Cβ ≠ γ. Identify C and γ and state their dimensions. (d) Find the rejection region for the test in part (c) with significance level α = 0.05. Leave your answer in the form. v TA−1v > F(x, y, z). Provide numerical values for the vector v, matrix A (you don’t need to invert it), and parameters x, y, z of the quantile F(x, y, z). (e) Standard error for the intercept β0 is hidden by XXXXX. Recover it using the data provided above. (f) The plot below sketches the rejection regions for the tests in parts (a), (b). The inside of the purple ellipse correspond to the 90% confidence region of an F-test. Shade the areas where (0, 0) might lie in this plot. Question 5 (20 points). Consider the grocery retailer example, where X1 denotes the num-ber of cases shipped, X2 is the indirect cost of the total labor hours as a percentage (values are between 0 and 100), and X3 is 1 if the week has a holiday, and 0 otherwise. The observations Y are the total labor hours, and we choose to fit the multiple linear regression: Yi = β0 + β1Xi1 + β2Xi2 + β3Xi3 + β4Xi1Xi3 + β5Xi2Xi3 + εi              (1) where the εi are i.i.d. normal with mean 0 and variance σ 2 . The lm output is shown: Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 4.271e+03 2.319e+02 18.415 F(c, d, e) for this test. (f) Based on this output, find the interval where the total labour hours for a week without holidays with the 5% indirect cost of the labour hours, and 100 cases shipped would be with probability 90%. Leave your answer as A ± B · t(c, d). Specify numerical values for A, B, c, d. Identify as many values as you can. Leave values that you can’t identify as variables. Question 6 (16 points). The table below contains residuals ei , internally studentized resid-uals ri , externally studentized residuals ti and the leverage hii for the model with p = 2 predictors and n = 10 observations. Table 1: Values of hii, ei , ri , and ti . (a) Which points seem to be outliers with respect to Y ? Which residual (ei , ri , ti) would you use to identify them? Briefly justify. (b) Which points seem to be outliers with respect to X? Briefly justify. (c) Which points appear to be most influential? Briefly justify. (d) What should be the decision rule to identify observations outlying with respect to Y at the significance level α = 0.10? Write it in the form. |A| ≥ t(B, C) Identify A, B, C. Be as specific as you can.

$25.00 View

[SOLVED] Math 104A Midterm 1 Fall 2024 Introduction to Numerical Analysis Processing

Introduction to Numerical Analysis Math 104A Midterm 1, Fall 2024 1. (20 points) Let x0 = 1, x1 = 2, x2 = 4, x3 = 6. (a) Construct the Lagrange polynomials (at most degree). (b) Find the interpolation of 2. (20 points) (a) Repeat Problem 1 using the Newton divided di↵erences method for x0 = 1, x1 = 2, x2 = 4. (b) Use Theorem 3.3 to find an error bound for the approximations. 3. (20 points) (a) Find the Hermite interpolation for f(x) = sin(x) given using divided di↵erences. (b) Using the Hermite interpolation obtained, estimate f (). 4. (20 points) Determine the natural cubic spline S(x) that interpolates the data f(1) = 1, f(3) = 2, and f(4) = 0. 5. (10 points) Prove Theorem 3.6: Suppose that f ∈ Cn[a, b] and x0, x1,...,xn are distinct numbers in [a, b]. Then a number  exists in (a, b) with

$25.00 View

[SOLVED] LPL Assignment 2 2024 Java

LPL Assignment 2, 2024 The educational significance of multiple literacies in multi-cultural learning contexts 2000 words due on Friday18th October – to be submitted through Turnitin by 5 pm · (50% of total assessment) This assignment requires you to investigate the ways in which literacy practices are enacted in multi-literate, multi-cultural contexts. You will draw on relevant theoretical frameworks, critical readings, and theme study material provided (Multi-culturalism/multi-literacy OR Literacy, power, genders and learning), to analyse the ways in which the literacy practices used in institutional contexts empower and disempower individuals and support particular ideologies and identities. Choose from either the theme of multi-cultures/multi-literacy explored in the Tuesday case studies OR the theme of multi-cultures/genders/sexuality explored in the Wednesday case studies. Following this analysis, you will offer evidence-based suggestions for ways in which multi-literacy approaches might be mobilised to support the needs of diverse learners in these contexts. Part 1 Identify and analyse the key issues concerning literacy and its relationship to power that are evident in your chosen theme study. · What literacy practices are mobilised to empower and disempower individuals? · What roles do institutions play in the promotion or constraint of literacy practices? · In what ways are individual’s prior knowledge and cultural identity influencing their literate practices in the context presented?  (1200 words) Part 2 Drawing on subject readings, provide an evidence based argument for the ways in which multi-literate practices might be mobilised to positively and equitably empower learning. Locate your argument in a relevant institutional context.   (800 words) References need to be included. Please note that referencing must be in APA style. https://library.unimelb.edu.au/recite/apa If you wish to cite material from the Canvas modules please refer to: https://library.unimelb.edu.au/recite/apa/lecture-notes (and assume your lecturers can access the material).

$25.00 View

[SOLVED] CSC 110 Y1F Fall 2024 Quiz 6 - V1 C/C

Faculty of Arts & Science Fall 2024 Quiz 6 - V1 CSC 110 Y1F Question 1. Object Mutation [3 marks] Part (a) [1 mark] Consider the code below. >>> lst = [1, 2, 3] >>> lst.append([4, 5]) What will lst refer to after the executing every line above? Circle the correct option below. a)  [1, 2, 3, 4, 5] b)  [1, 2, 3, [4, 5]] c)  [1, 2, 3, 4] d) This will raise an Error since a list can not be appended to a list. Part (b) [1 mark] Which functions or operations are most useful for determining if two variables refer to different objects?  Select all that apply. a) type b)  == c)  is d)  id Part (c) [1 mark] Consider the following code: >>> s = ' CSC110 ' >>> z = s >>> s = ' CSC110 ' + ' Y ' >>> m = z >>> z[5] = ' 1 ' Which of the following is true? Select all that apply. a)  z refers to  ' CSC111Y ' b) m refers to  ' CSC111Y ' c)  s and m have the same id after the above code is executed d) An error is raised when the above code is executed. Question 2. Object Mutation [5 marks] Consider the function f1: def f1(s: set, lst: list) -> list: """   """ ... for element in lst: s.add(element) new_list = lst for element in sorted(s): new_list.append(element) return new_list And suppose we execute the following in the console: >>> my_list = [0, 1, 2] >>> my_set = {1, 2, 3} >>> my_other_list = f1(my_set, my_list) Part (a) [2 marks] What value will my_list refer to? a)  [0, 1, 2] b)  [0, 1, 2, 3] c)  [0, 1, 2, 0, 1, 2, 3] d)  [0, 0, 1, 1, 2, 2, 3] Part (b) [3 marks] Which expressions below evaluate to True? Select all that apply. a) my_set == {0, 1, 2, 3} b) my_set == {0, 1, 2} c) my_other_list is my_set d) my_other_list is my_list e) my_other_list == my_list f) my_other_list == list(my_set) Question 3. Memory Model [4 marks] Below is an object-based memory model diagram showing the state of the memory model at the moment Part (b) [3 marks] Complete the following code so it will generate the memory model diagram shown above by putting an expression or statement in each of the three boxes. Do not add in any extra lines or change anything else. def binoo(stuff: list, i: int) -> None: stuff[i] = def toopy(lst: list, add: str) -> None: binoo(lst[0], 1) if __name__ == ' __main__ ' : nums = [26, 17, 39] word = ' hi ' things = toopy(things, ' ! ' )

$25.00 View

[SOLVED] 7SSGN110 Environmental Data Analysis Practical 3 Hypothesis testing R

7SSGN110 Environmental Data Analysis | Practical 3 | Hypothesis testing 1. Introduction 1.1. About this practical This practical will help you develop your skills using R to analyse data using inferential statistics. It will also require you to manipulate data, building on what you did in Practical 1  and Practical 2. At various points in the instructions it will be assumed that you can look back to those practical instructions to understand what to do. The practical is composed of two sections: 1. Pebbles: Introduction to the basics of running inferential statistics in R & testing for differences between two groups. 2. Forests: Introduction to comparing 3 or more groups 1.2. Practical data You can access the files for this practical, ‘Pebbles.csv’, ‘Scot_Forests.csv’ via KEATS. 1.3. Getting started with R Before you start the data analysis In R, ensure that you have: • Created a folder on your computer for this week’s practical • Set the working directory for the practical work in R Studio • Loaded the required packages. We will be using the packages tidyr, ggplot & car • Read the Pebbles.csv’ and ‘Scot_Forests.csv’ files into R. Hint: Refer to Practical 2, section 4.1 for guidance on how to do these things. 2. Testing for differences between two groups 2.1. Background A coastal geomorphologist postulates that bedrock geology is one of the fundamental controls over the size of the material making up beaches. To test this, they wish to determine whether pebble size differs between beaches in sandstone vs. limestone regions. They take a sample of 50 pebbles from each beach and measure the length of the B-axis for each pebble, in millimetres. They wish to use a t-test to analyse whether there is a significant difference in the mean pebble size between the two beaches. Q1: What would be the null and alternative hypothesis of the two-tailed t-test? 2.2. Descriptive statistics Double click on the pebbles.data file shown in the workspace window (top right hand side of the window). This will open the pebbles.data dataframe. in a new tab. You will see that there are two columns: ‘beach’ describes which beach the data is from and ‘pebblesize’ gives us all the measured pebble sizes. Q2. What type of data formatting is being used - wide or long? Let’s first calculate descriptive statistics for the data set. We can do this using the summary() function summary(pebbles.data) ##     beach             pebblesize    ##  Length:100         Min.   :15.00   ##  Class :character   1st Qu.:38.00   ##  Mode  :character   Median :44.00   ##                     Mean   :45.17   ##                     3rd Qu.:52.00   ##                     Max.   :70.00 You will notice that the summary statistics produced are for the pebble data set as a whole, and is not taking into account the different geologies. To produce summary statistics using the summary function we need to transform. our data into wide format. We can do this using the spread() function as part of the tidyr package. pebbles.data$row

$25.00 View

[SOLVED] Clarkson Lumber Co Part 1 Python

Corporate Finance Clarkson Lumber Co – Part 1 Read the Clarkson Lumber Company case.  To help you organize your thoughts for the case discussion during class, attempt the assignment below. (Hint: do not focus on the decision to form. a new banking relationship, instead focus on the assignment questions, largely based on the exhibits instead of the text.) There are a lot of questions, some possibly a little difficult. Try to do as much as you can. In class, we will go over all the questions step-by-step, but it’s important you attempt all questions to understand the solutions. You do not need to submit a solution to this case. Questions 1-2 of this assignment are intended review the concept of Free Cash Flows (FCF) using historical information. Questions 3-7 are step-by-step calculations to project FCF in 1996. Assignment 1.   Generate the Statement of Cash Flows for Clarkson for the year ending in 1994. Notes: We have not done this in class, but you should know how to construct this statement from your accounting class. Below, you will find a worksheet to help you. Hint: During 1994, Mr. Clarkson bought Mr. Holtz’s interest in the firm. This transaction increases debt by $200 (see total notes payable to Mr. Holtz) and decreases net worth by $200 (share repurchase). 2.   Compute the free cash flows for the same year. Notes: To compute the taxes, use the tax rate information in note (c) to Exhibit 1. 3.   For questions 4 to 6, we will need some key financial ratios. Compute the following ratios for 93, 94, 95 and their average for the period. •    Income Statement i.   COGS/Sales ii.   Operating expenses/Sales •    Balance Sheet i.   Net Fixes Assets Turnover (NFATO) = Sales/netPPE ii.   Accounts Receivable Days on Hand (AR DOH) =AR/(Sales/365) iii.   Inventory Days on Hand =Inventory/(COGS/365) iv.   Accrued Expenses/Sales 4.   Suppose that sales in 1996 are $5.5 million. Project NOP. Assume: •   This is an “average” year compared to 93-95. This implies, for example, that you should project COGS so that the COGS/Sales ratio in 1996 equals the average of this ratio in the 93-95 period. Question 3 lists the key financial ratios you can use. •   Taxes are given by the schedule described in note (c) to Exhibit 1. •   Clarkson does not get any trade discounts. 5.   Project netPPE and the change in netPPE. 6.   Project the change in NWC. •    For accounts receivables, inventory, and accrued expenses assume that 1996 is an average year and use relevant ratios in question 3. •   To project, accounts payable assume that accounts payable days on hand in 1996 is 45 (AP DOH =AP/(Purchases/365)). •    Hint: You will need to estimate what purchases will be in 1996. Remember that Inv(t) = Inv(t-1) + Purchases(t) – COGS(t). So you should have projected enough information already to back out what purchases will be for 1996. •   All of the “Notes payable” on Clarkson’s balance sheet are interest bearing liabilities. 7.   Using your answers from questions 4, 5, and 6, project the FCF in 1996. Discussion Questions 1.   How does cash flows from operating, investing and financing activities relate to the FCF? 2.   For many of our projections we multiply a ratio by sales. What are we assuming about the production function? Worksheet for Question 1: Net Change in Cash Operating Activities* NI -     Increase in Accounts Receivable -     Increase in Inventory +    Increase in Accounts Payable +    Increase in Accrued Expenses CF from operating activities Investing Activities -     Increase in PPE CF from investing activities Financing Activities +    Increase in debt outstanding -     Stock repurchased CF from financing activities Net change in cash *Typically we add back depreciation as part of the adjustments to net income in the operating activities section. In this worksheet, we are adding back depreciation when computing the increase in net fixed assets in the investing activities section.

$25.00 View

[SOLVED] Math 104A Midterm 2 Fall 2024 Introduction to Numerical Analysis Python

Introduction to Numerical Analysis Math 104A Midterm 2, Fall 2024 1. (5 points) Attendance-Related Multiple Choice Question For extra credit assignment, students performed various activities in class. Which of the following was NOT performed in class? (A) Demonstrating how to make sourdough bread (B) Performing a magic show (C) Presenting a photography gallery (D) Playing a live guitar performance (E) Drawing SpongeBob (F) Presenting an audio synthesizer that uses Fourier transforms (G) None of these 2. (25 points) Let Πn denote the set of all polynomials of degree at most n. Suppose that {φ0(x), φ1(x), . . . , φn(x)} is a collection of linearly independent polynomials in Πn. Prove that any polynomial in Πn can be writ-ten uniquely as a linear combination of φ0(x), φ1(x), . . . , φn(x). 3. (25 points) Given the data: xi 4.0 4.2 4.5 4.7 5.1 5.5 yi 102.56 113.18 130.11 142.05 167.53 195.14 Construct the least squares approximation of the form. bxa , and compute the error. 4. (20 points) Use the Gram-Schmidt process to construct the Legendre polynomials φ0(x), φ1(x), φ2(x), and φ3(x) on the interval [0, 2]. The weight function is w ≡ 1. 5. (25 points) Find the least squares polynomial approximation of degree two to f(x) on the interval [1, 3] and compute the error E for the approximation. f(x) = x ln x

$25.00 View