SlideShare a Scribd company logo
Computing and Data Analysis for Environmental
Applications/Uncertainty in Engineering
Statistics Assignment Help
For any Statistics related queries, Call us at - +1 678 648 4277
You can mail us at - info@statisticsassignmenthelp.com, or reach us at - https://www.statisticsassignmenthelp.com/
Problem 1
Go to the US census bureau web site at http://www.census.gov/statab/www/ranks.html todownload data giving personal income and other
information by state. To do this click on the “Personal Income Per Person” Excel link on the web site and save an Excel file containing the desired (1999)
income data as well as various other things in your own working directory. Open the file in Excel and copy all lines in column 2: income per capita for
each of the 50 states plus DC. Go into MATLAB and open a new file. Paste the income data in the file and save it as a .txt file. The file should consist of
one column of numbers, with no text. Use the find and replace … option under edit to remove all commas (the commas confuse MATLAB). You can use
another editor if you prefer.
After you have simplified the file in this way save it.
You should write a MATLAB script in a file called census.m to process the census data.To bring the data into MATLAB you can use the load command:
load filename.txt
Now repeat the entire download process for the “Energy Consumption Per Person” link in the census web site, creating a new array called energy in
your script. Pick two
other variables of interest to you from the list provided on this site. In your script create arrays for each of these indicators with appropriate names, just
as you did for income andenergy. Be sure to divide totals by population if you want to compare per capita values.
Now include in your MATLAB script the ability to plot histograms and CDFs for each ofthe four data sets you downloaded from the census site. Also
compute the mean, median,and variance for each data set. Plot a scatter diagram of energy consumption vs. income.Plot two other scatter diagrams of
interest to you, selecting from the variables offered on the web site. Briefly indicate what each of these three scatter diagrams suggest to you.
In your discussion pay particular consideration to outliers that may violate a generaltrend.
0
Be sure to include labels on the plots you produce. The preferred approach is to createthese labels from within the script, by using the xlabel, ylabel,
and title functions (seeMATLAB Help and the example from Recitation 1). Be sure also to turn in the MATLAB output giving the values you calculated for
mean, median, and variance in addition to the plots and your program.
Statistics Assignment Help
% Problem 1
close all
clear all
load income.txt % per capita income in 1996 dollars
load energy.txt % per capita energy use in mil Btu
load fed_aid.txt % per capita federal aid in 1996 dollars
load unemployment.txt % percent unemployment
mean(income)
median(income)
var(income)
mean(energy)
median(energy)
var(energy)
mean(fed_aid)
median(fed_aid) Problem 1
var(fed_aid)
mean(unemployment)
median(unemployment)
var(unemployment)
Statistics Assignment Help
plot histograms and cdf's for each
figure
hist(income,6)
xlabel('Average Per Capita Income in 1996 USD')
ylabel('Number of States in Range')
title('Histogram of Per Capita Income for the 50 States and DC')
figure
cdfplot(income)
xlabel('Average Per Capita Income in 1996 USD')
ylabel('F(income)')
title('Cumulative Distribution Function of Per Capita Income for the 50 States and DC')
figure
hist(energy,6)
xlabel('Per Capita Energy Use in mil Btu')
ylabel('Number of States in Range')
title('Histogram of Per Capita Energy Use for the 50 States and DC')
figure
cdfplot(energy)
xlabel('Per Capita Energy Use in mil Btu')
ylabel('F(energy)')
title('Cumulative Distribution Function of Per Capita Energy Use for the 50 States and DC')
Statistics Assignment Help
figure
hist(fed_aid,5)
xlabel('Per Capita Federal Aid in 1996 USD')
ylabel('Number of States in Range')
title('Histogram of Per Capita Federal Aid for the 50 States and DC')
figure
cdfplot(fed_aid)
xlabel('Per Capita Federal Aid in 1996 USD')
ylabel('F(Aid)')
title('Cumulative Distribution Function of Per Capita Federal Aid for the 50 States and DC')
figure
hist(unemployment,6)
xlabel('Unemployment Rate [%]')
title('Histogram of Unemployment Rate for the 50 States and DC')
figure
cdfplot(unemployment)
xlabel('Unemployment Rate [%]')
ylabel('F(Unemployment)')
title('Cumulative Distribution Function of Unemployment Rate for the 50 States and DC')
Statistics Assignment Help
figure
plot(income,energy,'*')
title('Per Capita Energy Use vs Income')
xlabel('Income [1996 USD]')
ylabel('Energy [mil BTU]')
figure
plot(income,fed_aid,'o')
title('Per Capita Federal Aid vs Income')
xlabel('Income [1996 USD]')
ylabel('Federal Aid [1996 USD]')
figure
plot(income,unemployment,'x')
title('Unemployment Rate vs Per Capita Income')
xlabel('Income [1996 USD]')
ylabel('Unemployment Rate [%]')
Statistics Assignment Help
Problem 2
Write a MATLAB script that computes tidal elevation h (in m) from the following threeterm series:
h(t) = 0.2Sin(0.5w t) + 3.0Sin(w t) + 1.0Sin(2w t)
where w = 2p/24 hr-1. Define a vector time with 1001 values [0. 0.1 0.2 ….. 100.0.] spaced every 0.1 hours from t = 0 to t = 100 hrs. Use the vector
capabilities of the MATLAB sin function to compute a vector of 1001 corresponding tidal elevations with asingle equation. Read the MATLAB help
discussion of the sin(X) function to make surethat you understand how it provides element-wise evaluations of vector arguments. Plot the tidal elevations
from vs. time. Label both axes and include a plot title.
Statistics Assignment Help
Problem 2
close all
clear all
compute tidal elevation
omega=2*pi/24; % [hr^-1]
time=0:.1:100;
h=0.2*sin(0.5*omega*time)+3*sin(omega*time)+sin(2*omega*time);
figure
plot(time,h)
title('Tidal Elevation vs Time')
xlabel('Time [hr]')
ylabel('Tidal Elevation [m]')
Statistics Assignment Help

More Related Content

PPTX
Programming Assignment Help
PDF
Broom: Converting Statistical Models to Tidy Data Frames
PPTX
Data visualization using R
PDF
Data Visualization With R
PDF
Curvefitting
PPTX
Math Exam Help
PPTX
R and Visualization: A match made in Heaven
PDF
Interpolation and-its-application
Programming Assignment Help
Broom: Converting Statistical Models to Tidy Data Frames
Data visualization using R
Data Visualization With R
Curvefitting
Math Exam Help
R and Visualization: A match made in Heaven
Interpolation and-its-application

What's hot (18)

PPT
R studio
PDF
Introduction to R Graphics with ggplot2
PDF
Functions
PDF
QMC: Undergraduate Workshop, Tutorial on 'R' Software - Yawen Guan, Feb 26, 2...
PPTX
Data visualization with R
PDF
Assignment 1
PPTX
Variables in matlab
PPT
Matlab on basic mathematics
PDF
NCCU: Statistics in the Criminal Justice System, R basics and Simulation - Pr...
PPT
2 simple regression
PPTX
Unit 2.1
PDF
Matlab plotting
DOCX
Image Processing Homework 1
PPTX
Graph Plots in Matlab
DOCX
Principal Component Analysis
PPTX
2. data types, variables and operators
R studio
Introduction to R Graphics with ggplot2
Functions
QMC: Undergraduate Workshop, Tutorial on 'R' Software - Yawen Guan, Feb 26, 2...
Data visualization with R
Assignment 1
Variables in matlab
Matlab on basic mathematics
NCCU: Statistics in the Criminal Justice System, R basics and Simulation - Pr...
2 simple regression
Unit 2.1
Matlab plotting
Image Processing Homework 1
Graph Plots in Matlab
Principal Component Analysis
2. data types, variables and operators
Ad

Similar to Computing and Data Analysis for Environmental Applications (20)

PPT
Devry bis-155-final-exam-guide-new
DOCX
Chapter 2
DOCX
Week 2 Project - STAT 3001Student Name Type your name here.docx
DOC
Devry bis 155 final exam guide (music on demand) new
DOCX
Itm310 problem solving #7 complete solutions correct answers key
PPT
Environmental Engineering Assignment Help
DOC
Dervy bis 155 final exam guide music on demand new
PPT
Dervy bis-155-final-exam-guide-music-on-demand-new
DOCX
Sheet1 Intermediate Business StatisticsExcel Exercise - Enter your.docx
DOCX
Cover PageComplete and copy the following to Word for your cover p.docx
DOCX
MAT 240 Random Sampling in Excel Tutorial This tutorial wi
DOCX
MAT 240 Random Sampling in Excel Tutorial This tutorial wi
DOCX
1. Question #2 - Page # 88, Use data P02_03.xlsx.The file P02_03.docx
PDF
Cheat Sheet for Stata v15.00 PDF Complete
DOC
Bis 155 Education Organization / snaptutorial.com
DOCX
LabsLab5Lab5_Excel_SH.htmlLab 5 SpreadsheetsLearning Outcomes.docx
PDF
Stata Cheat Sheets (all)
DOCX
John MacLean, Supply Chain Manager of the YearPurchasingBy Pau.docx
PDF
Bis 155 Exceptional Education / snaptutorial.com
DOC
Bis 155 Effective Communication / snaptutorial.com
Devry bis-155-final-exam-guide-new
Chapter 2
Week 2 Project - STAT 3001Student Name Type your name here.docx
Devry bis 155 final exam guide (music on demand) new
Itm310 problem solving #7 complete solutions correct answers key
Environmental Engineering Assignment Help
Dervy bis 155 final exam guide music on demand new
Dervy bis-155-final-exam-guide-music-on-demand-new
Sheet1 Intermediate Business StatisticsExcel Exercise - Enter your.docx
Cover PageComplete and copy the following to Word for your cover p.docx
MAT 240 Random Sampling in Excel Tutorial This tutorial wi
MAT 240 Random Sampling in Excel Tutorial This tutorial wi
1. Question #2 - Page # 88, Use data P02_03.xlsx.The file P02_03.docx
Cheat Sheet for Stata v15.00 PDF Complete
Bis 155 Education Organization / snaptutorial.com
LabsLab5Lab5_Excel_SH.htmlLab 5 SpreadsheetsLearning Outcomes.docx
Stata Cheat Sheets (all)
John MacLean, Supply Chain Manager of the YearPurchasingBy Pau.docx
Bis 155 Exceptional Education / snaptutorial.com
Bis 155 Effective Communication / snaptutorial.com
Ad

More from Statistics Assignment Help (20)

PPTX
Calculating Expected Values and Variances in Statistics
PPTX
Bayesian Inference and Maximum Likelihood
PPTX
Method of Moments and Maximum Likelihood Estimation
PPTX
Statistical Analysis of Corneal Thickness in Glaucoma Patients
PPTX
Get Accurate and Reliable Statistics Assignment Help - Boost Your Grades!
PPTX
Statistics Assignment Help
PPTX
Pay For Statistics Assignment
PPTX
Probability Assignment Help
PPTX
Data Analysis Assignment Help
PPTX
R Programming Assignment Help
PPTX
Hypothesis Assignment Help
PPTX
The Data of an Observational Study Designed to Compare the Effectiveness of a...
PPTX
T- Test and ANOVA using SPSS Assignment Help
PPT
Linear Regression Analysis assignment help.ppt
PPTX
Stata Assignment Help
PPTX
MyStataLab Assignment Help
PPTX
Probability and Statistics Assignment Help
PPTX
Mathematical Statistics Assignment Help
PPTX
Statistics Assignment Help
PPTX
Statistics Coursework Assignment Help
Calculating Expected Values and Variances in Statistics
Bayesian Inference and Maximum Likelihood
Method of Moments and Maximum Likelihood Estimation
Statistical Analysis of Corneal Thickness in Glaucoma Patients
Get Accurate and Reliable Statistics Assignment Help - Boost Your Grades!
Statistics Assignment Help
Pay For Statistics Assignment
Probability Assignment Help
Data Analysis Assignment Help
R Programming Assignment Help
Hypothesis Assignment Help
The Data of an Observational Study Designed to Compare the Effectiveness of a...
T- Test and ANOVA using SPSS Assignment Help
Linear Regression Analysis assignment help.ppt
Stata Assignment Help
MyStataLab Assignment Help
Probability and Statistics Assignment Help
Mathematical Statistics Assignment Help
Statistics Assignment Help
Statistics Coursework Assignment Help

Recently uploaded (20)

PPTX
PPH.pptx obstetrics and gynecology in nursing
PPTX
Pharma ospi slides which help in ospi learning
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PDF
O7-L3 Supply Chain Operations - ICLT Program
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PPTX
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PDF
Pre independence Education in Inndia.pdf
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PDF
Insiders guide to clinical Medicine.pdf
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PPTX
Lesson notes of climatology university.
PDF
Classroom Observation Tools for Teachers
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PDF
Complications of Minimal Access Surgery at WLH
PPH.pptx obstetrics and gynecology in nursing
Pharma ospi slides which help in ospi learning
O5-L3 Freight Transport Ops (International) V1.pdf
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
Pharmacology of Heart Failure /Pharmacotherapy of CHF
O7-L3 Supply Chain Operations - ICLT Program
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
human mycosis Human fungal infections are called human mycosis..pptx
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
Pre independence Education in Inndia.pdf
Renaissance Architecture: A Journey from Faith to Humanism
Insiders guide to clinical Medicine.pdf
STATICS OF THE RIGID BODIES Hibbelers.pdf
Lesson notes of climatology university.
Classroom Observation Tools for Teachers
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
Complications of Minimal Access Surgery at WLH

Computing and Data Analysis for Environmental Applications

  • 1. Computing and Data Analysis for Environmental Applications/Uncertainty in Engineering Statistics Assignment Help For any Statistics related queries, Call us at - +1 678 648 4277 You can mail us at - info@statisticsassignmenthelp.com, or reach us at - https://www.statisticsassignmenthelp.com/
  • 2. Problem 1 Go to the US census bureau web site at http://www.census.gov/statab/www/ranks.html todownload data giving personal income and other information by state. To do this click on the “Personal Income Per Person” Excel link on the web site and save an Excel file containing the desired (1999) income data as well as various other things in your own working directory. Open the file in Excel and copy all lines in column 2: income per capita for each of the 50 states plus DC. Go into MATLAB and open a new file. Paste the income data in the file and save it as a .txt file. The file should consist of one column of numbers, with no text. Use the find and replace … option under edit to remove all commas (the commas confuse MATLAB). You can use another editor if you prefer. After you have simplified the file in this way save it. You should write a MATLAB script in a file called census.m to process the census data.To bring the data into MATLAB you can use the load command: load filename.txt Now repeat the entire download process for the “Energy Consumption Per Person” link in the census web site, creating a new array called energy in your script. Pick two other variables of interest to you from the list provided on this site. In your script create arrays for each of these indicators with appropriate names, just as you did for income andenergy. Be sure to divide totals by population if you want to compare per capita values. Now include in your MATLAB script the ability to plot histograms and CDFs for each ofthe four data sets you downloaded from the census site. Also compute the mean, median,and variance for each data set. Plot a scatter diagram of energy consumption vs. income.Plot two other scatter diagrams of interest to you, selecting from the variables offered on the web site. Briefly indicate what each of these three scatter diagrams suggest to you. In your discussion pay particular consideration to outliers that may violate a generaltrend. 0 Be sure to include labels on the plots you produce. The preferred approach is to createthese labels from within the script, by using the xlabel, ylabel, and title functions (seeMATLAB Help and the example from Recitation 1). Be sure also to turn in the MATLAB output giving the values you calculated for mean, median, and variance in addition to the plots and your program. Statistics Assignment Help
  • 3. % Problem 1 close all clear all load income.txt % per capita income in 1996 dollars load energy.txt % per capita energy use in mil Btu load fed_aid.txt % per capita federal aid in 1996 dollars load unemployment.txt % percent unemployment mean(income) median(income) var(income) mean(energy) median(energy) var(energy) mean(fed_aid) median(fed_aid) Problem 1 var(fed_aid) mean(unemployment) median(unemployment) var(unemployment) Statistics Assignment Help
  • 4. plot histograms and cdf's for each figure hist(income,6) xlabel('Average Per Capita Income in 1996 USD') ylabel('Number of States in Range') title('Histogram of Per Capita Income for the 50 States and DC') figure cdfplot(income) xlabel('Average Per Capita Income in 1996 USD') ylabel('F(income)') title('Cumulative Distribution Function of Per Capita Income for the 50 States and DC') figure hist(energy,6) xlabel('Per Capita Energy Use in mil Btu') ylabel('Number of States in Range') title('Histogram of Per Capita Energy Use for the 50 States and DC') figure cdfplot(energy) xlabel('Per Capita Energy Use in mil Btu') ylabel('F(energy)') title('Cumulative Distribution Function of Per Capita Energy Use for the 50 States and DC') Statistics Assignment Help
  • 5. figure hist(fed_aid,5) xlabel('Per Capita Federal Aid in 1996 USD') ylabel('Number of States in Range') title('Histogram of Per Capita Federal Aid for the 50 States and DC') figure cdfplot(fed_aid) xlabel('Per Capita Federal Aid in 1996 USD') ylabel('F(Aid)') title('Cumulative Distribution Function of Per Capita Federal Aid for the 50 States and DC') figure hist(unemployment,6) xlabel('Unemployment Rate [%]') title('Histogram of Unemployment Rate for the 50 States and DC') figure cdfplot(unemployment) xlabel('Unemployment Rate [%]') ylabel('F(Unemployment)') title('Cumulative Distribution Function of Unemployment Rate for the 50 States and DC') Statistics Assignment Help
  • 6. figure plot(income,energy,'*') title('Per Capita Energy Use vs Income') xlabel('Income [1996 USD]') ylabel('Energy [mil BTU]') figure plot(income,fed_aid,'o') title('Per Capita Federal Aid vs Income') xlabel('Income [1996 USD]') ylabel('Federal Aid [1996 USD]') figure plot(income,unemployment,'x') title('Unemployment Rate vs Per Capita Income') xlabel('Income [1996 USD]') ylabel('Unemployment Rate [%]') Statistics Assignment Help
  • 7. Problem 2 Write a MATLAB script that computes tidal elevation h (in m) from the following threeterm series: h(t) = 0.2Sin(0.5w t) + 3.0Sin(w t) + 1.0Sin(2w t) where w = 2p/24 hr-1. Define a vector time with 1001 values [0. 0.1 0.2 ….. 100.0.] spaced every 0.1 hours from t = 0 to t = 100 hrs. Use the vector capabilities of the MATLAB sin function to compute a vector of 1001 corresponding tidal elevations with asingle equation. Read the MATLAB help discussion of the sin(X) function to make surethat you understand how it provides element-wise evaluations of vector arguments. Plot the tidal elevations from vs. time. Label both axes and include a plot title. Statistics Assignment Help
  • 8. Problem 2 close all clear all compute tidal elevation omega=2*pi/24; % [hr^-1] time=0:.1:100; h=0.2*sin(0.5*omega*time)+3*sin(omega*time)+sin(2*omega*time); figure plot(time,h) title('Tidal Elevation vs Time') xlabel('Time [hr]') ylabel('Tidal Elevation [m]') Statistics Assignment Help