Define average or mean

Assignment Help Basic Computer Science
Reference no: EM13866290

1. Many properties in engineering and science can be analyzed by trying to fit a straight line which uses x as the independent variable and y as the dependent variable. Suppose you have an array of x values and a corresponding array of y values. Write the process to fit a straight line to the data. Using the scenario y = mx + b, where m is the slope and b is the y intercept, m can be calculated by the formula

2. In numerical analysis the average and standard deviation is often calculated. The average or mean is given by the formula

Average = Sx/n

where n is the number of x values.

The standard deviation is a measure of scatter and is given by the formula

Standard deviation = ((S(x - x) is the average x, and n is the number of x values.

Suppose you have an array of x values write the process to calculate the average and standard deviation for these values.

3. The area under a curve can represent stored energy or other important properties. The area under a curve may be approximated by dividing the area into trapezoids, calculating the area of each trapezoid, and then summing those smaller areas. For example, using the diagram below, the area under the curve for the region from a to b could be approximated by dividing the region into 5 smaller areas.

The first area can be defined by a, f(a), x

4). The total area under the curve from a to b would be the sum of the 5 trapezoids.

In many engineering /science applications you may collect digital x-y data and you may not know the actual function for a line connecting these points.

However, you can still use the theory presented above to integrate under a curve generated by the x-y data sets. The first trapezoid can be formed from the first x-y set and the second x-y set, (the difference in the x values would be the base and the y values would be the heights). Then the second trapezoid would use the second x-y set and the third x-y set. The third trapezoid would use the third x-y set and the fourth x-y set, and so on.

Suppose you have an array of x values and another array of corresponding y values. Write the algorithm to calculate the area under the curve for these values.

Reference no: EM13866290

Questions Cloud

Write a brief qualitative description : Write a brief qualitative description of the following reactions:  1.) Fe(NO3)3 + Na2SO4: ? 2.) Fe(NO3)3/Na2SO4 + NaC2H3O2: ? 3.) Ba(N03)2 + KSCN: ?
The company estimated that the machine : On January 2, 2010, Lapar Corporation purchased a machine for $50,000. Lapar paid shipping expenses of $500, as well as installation costs of $1,200.
How many proton for h : How many proton for H? Electron?what is DNA made of in the human body?
Describe the biosecurity program used by farmer william : Describe the biosecurity program used by Farmer William. Why are most chickens raised indoors? Discuss why barn ventilation important. What feedstuffs are fed to chickens? Name four ingredients
Define average or mean : In numerical analysis the average and standard deviation is often calculated
The neutralization reaction between aqueous potassium : Chemistry The neutralization reaction between aqueous potassium hydroxide and aqueous acetic acid would be written as which of the following?
If you do not believe you would do so, explain why not? : do you believe you would bring forth such an allegation and, if so, under what circumstances? If you do not believe you would do so, explain why not?
What are the main features of kinked demand curve : What is industrial economics and outline the salient features of the structure - conduct - Performance (SCP) Model
What would his temperature rise be in one day : An average man (mass = 70 kg, specific heat - same as water) produces about 10^4 kJ of heat each day through metabolic activity.i) If he were an isolated system, what would his temperature rise be in one day?

Reviews

Write a Review

Basic Computer Science Questions & Answers

  How does noise affect signals

How does noise affect signals? What happens if the level of noise becomes too high relative to the strength of the signal?

  Draw a state diagram for the state machine

Draw a state diagram for the state machine that checks if a binary number has an even or odd number of 0s.

  Explain the difference between data and information

Give your own best definition of information, and explain the difference between data and information. Your response should be at least 200 words in length. You are required to use at least your textbook as source material for your response. All sour..

  Php application programming with javascript

For this task, you will be creating 2 separate applications. One application will be using PHP, the other will be designed using Ruby on Rails.

  How can organizations in a global market utilize enterprise

How can organizations in a global market utilize Enterprise Content Management technology to maintain governance and control over content in ensuring regulatory compliance

  Functions of the universitys library electronic database

Develop a unit test plan for key functions of the university's library electronic database.

  Er diagram, normalization, relational structure only

The proprietors of BigM have approached you and asked if you could design a database to help them manage their business. The management has commissioned you (in your capacity as a Database Management System consultant) to analyse, design and devel..

  What some of the ways you would troubleshoot a dns problem

What are some of the ways you would troubleshoot a DNS problem

  How can you quickly investigate and collect digital evidence

Prepaid cell phones make forensic investigation much hard. Discuss how can you quickly investigate and collect digital evidence for a crime what involves a phone call.

  Convert the following two''s complement to decimal numbers

Convert the following two's complement representations to decimal numbers (assume 5 bit numbers). a. 11101 b. 01111 c. 10011

  What would programs have to do for each type of hardware

If an applications' requests for data did not go through the OS, what would programs have to do for each type of hardware?

  Review or appraisal based on careful analytical evaluation

Your analysis should explore the positives and negatives in each case and reach a balanced view of the strengths and weaknesses of the person you have selected.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd