Skip to main content

US government’s discretionary budget

 5. Here is some data on the US government’s discretionary budget (things that are not mandatory, like Social security, Medicare, interest on the national debt) Source: https://www.thebalance.com/how-trump-amended-obama-budget-4128986. I have summarized it in a csv file (it’s possible that there are errors in the data, since I typed these all in manually, but this shouldn’t affect your analysis). You can use these commands to download the data and analyze it:

import pandas as pd import numpy as np df = pd.read_csv("https://raw.githubusercontent.com/mathalexchen/Data/main/budget.csv") print(df) year2019 = np.array(df["2019"]) # extract a particular column; convert to a numpy array department = np.array(df["Department"]) education = np.array(df.loc[1,:]) # extract a particular row:

# 0 for defense, 1 for education, etc.

Answer the following questions (you may also use a spreadsheet program instead of python, if you prefer–just go to the following link to get the data: https://raw. githubusercontent.com/mathalexchen/Data/main/budget.csv). Be sure to either share your code or write down the commands you used to generate your results.

a) Make a pie chart of the 2019 budget and label the slices of the pie accordingly.

b) Which government agency (of the ones listed) had their budget expe- rience the highest percentage growth from 2007 to 2019?

c) Is it safe to conclude from this data that Defense is where most discretionary spending goes? Note: I don’t think there’s a “correct” answer here; just make sure you present some analysis and justify it.

6. Given a list of numbers, print the ordered pair (a, b) such that the absolute value of the difference |a − b| is the largest. For example, if nums = [1, 5, 2, 9, -2], then print (9, -2) or (-2, 9), since these result in the largest absolute value of the difference —9 - (-2)— = 11.

7. (bonus question, 10 points) Suppose 1 out of 1000 people in the LA area are infected with Covid. Suppose also that there is a rapid test with the following properties:

– 90% of infected people test positive. – 99% of non-infected test negative.

If someone tests positive, what is the probability that this person has Covid? You may do this problem analytically or by simulation. If you write code, here are some tips:

2

• – Run many trials, probably 1,000,000. • – On each trial, simulate the probability that someone has Covid (a 0.001 proba-

bility).

• – Then if the person has Covid, simulate the probability that the person tests positive (0.9 probability).

• – If the person does not have Covid, simulate the probability that the person tests positive (1 - 0.99 = 0.01 probability).

• – Count the number of times that someone tested positive and has Covid; also count the number of times someone tested positive; dividing the former by the latter gives the probability you’re looking for.

• – You can ignore any times the test comes back negative


WE HAVE DONE THIS ASSIGNMENT BEFORE, WE CAN ALSO DO IT FOR YOU

GET SOLUTION FOR THIS ASSIGNMENT, Get Impressive Scores in Your Class

NO PLAGIARISM (100% Sure)

CLICK HERE TO MAKE YOUR ORDER on US government’s discretionary budget 

TO BE RE-WRITTEN FROM THE SCRATCH

Comments

Popular posts from this blog

Identify and discuss a key milestone in the history of computers that interests you and why.

  Part 1Title: Lab ResponseDiscuss one feature of MS Word and one feature of MS Excel that you found challenging within the lab and why. Examples are WordArt, inserting shapes, adding borders, cell styles, etc. This response should be at least one paragraph in length. Part 2Title: History of Computers Identify and discuss a key milestone in the history of computers that interests you and why. This section should be at least one paragraph. Part 3Title: System Software vs. Application Software In your words, explain the difference between application software and system software as if to another coworker who has limited technical knowledge. Use examples to support your rationalization. This section should be at least two paragraphs. Part 4Title: Blockchain and Cryptocurrency In a minimum of one paragraph each: 1. Conduct some research on the internet and discuss one underlying technology of cryptocurrencies like blockchain, cryptography, distributed ledger technol...

Cybersecurity and Infrastructure Security (CISA)

 Develop a research paper that identifies a specific Department of Homeland Security (DHS) operating agency. Fully describe 1 DHS operating agency from the following list: Cybersecurity and Infrastructure Security (CISA) U.S. Customs and Border Protection (CBP) U.S. Citizenship and Immigration Services (USCIS) Federal Emergency Management Agency (FEMA) U.S. Coast Guard (USCG) U.S. Immigration and Customs Enforcement (ICE) U.S. Secret Service (USSS) Transportation Security Administration (TSA) The information must include a discussion of the selected DHS agency. Identify the agency’s mission, goals, objectives, and metrics. Conduct an analysis of how these mission areas address the threats or challenges. Recommend agency program priorities among the current set of goals, objectives, metrics, or budget items. Justification of all choices is an essential element of this assignment. Reference all source material and citations using APA format. WE OFF...

Discuss how the project

ord count : no idea 1. You are required to write a report on all project activities involved in all the 10 knowledge areas of project management for the entire project life cycle. You should also include a list of the respective PM documents, for example PM Plan, PM Quality Management Plan, Risk management, Procurement, etc. The report must include the activities that are considered before the project is closed out. 2. Discuss how the project quality management plan can provide adequate standards and controls in managing global teams in projects. Your discussion must provide adequate arguments for the need of cultural awareness and legal issues. Regards, The post Discuss how the project appeared first on My Assignment Tutor . Assignment status :  Resolved by our Writing Team Source@ PrimeWritersBay.com GET THIS PAPER COMPLETED FOR YOU FROM THE WRITING EXPERTS   CLICK HERE TO ORDER 100% ORIGINAL PAPERS AT PrimeWritersBay.com NO PLAGIARISM