Question

In: Math

Install the `babynames` package with `install.packages()`. This package includes data from the Social Security Administration about...

Install the `babynames` package with `install.packages()`. This package includes data from the Social Security Administration about American baby names over a wide range of years. Generate a plot of the reported proportion of babies born with the name Angelica over time. Do you notice anything odd about the plotted data? (Hint: you should) If so, describe the issue and generate a new plot that adjusts for this problem. Make sure you show both plots along with all code that was used to generate them.


Using R. Thanks

Solutions

Expert Solution

R code with comments to plot the proportion of babies born with the name Angelica (all statements starting with # are comments and can be removed

#install the package for the first time
install.packages('babynames')

#load the package
library(babynames)
#print the variable names in the dataset babynames
names(babynames)

#create a subset of data with names Angelica
dat<-subset(babynames,name=="Angelica")
#plot the data
#create a window for 2 plots
par(mfrow=c(2,1))
plot(dat$year,dat$prop,xlab='Year',ylab="Proportion",main="Proportion vs Year")

#get this

It looks like some years have 2 proportion for the name Angelica. Let us print some of those years

dat[dat$year>1970,]

#get this

We can see that for years 1973, 1974, 1975 the name Angelica has been given to both Male and Female babies.

Since we are want the proportion of all babies with name Angelica, we will sum these up.

R code

#aggregate the proportion for a year
dat1<-aggregate(prop ~ year, dat, sum)
#plot
plot(dat1$year,dat1$prop,xlab='Year',ylab="Proportion",main="Proportion vs Year")

# get this

We can see that the name Angelica peaked at around year 1996


Related Solutions

Assignment: Install and load the ggplot2 package. load the "diamonds" dataset RCode: install.packages("ggplot2") library(ggplot2) ?diamonds 1....
Assignment: Install and load the ggplot2 package. load the "diamonds" dataset RCode: install.packages("ggplot2") library(ggplot2) ?diamonds 1. Explore the dataset & state insights 2. Create plots for dataset 3: Provide summary of descriptive stats) 4. Run the regressions, research, Investigate & comment on R^2 & on regression plots - 1 line each. #=========================================== # DV = Price, IV or IVs = your choice # Can we create and compare models to predict "Price"? # Question- Investigate & comment on R^2 &...
Assignment: Install and load the ggplot2 package. load the "diamonds" dataset RCode: install.packages("ggplot2") library(ggplot2) ?diamonds 1....
Assignment: Install and load the ggplot2 package. load the "diamonds" dataset RCode: install.packages("ggplot2") library(ggplot2) ?diamonds 1. Explore the dataset & state insights 2. Create plots for dataset 3: Provide summary of descriptive stats) 4. Run the regressions, research, Investigate & comment on R^2 & on regression plots - 1 line each. #=========================================== # DV = Price, IV or IVs = your choice # Can we create and compare models to predict "Price"? # Question- Investigate & comment on R^2 &...
Assignment: Install and load the ggplot2 package. load the "diamonds" dataset RCode: install.packages("ggplot2") library(ggplot2) ?diamonds 1....
Assignment: Install and load the ggplot2 package. load the "diamonds" dataset RCode: install.packages("ggplot2") library(ggplot2) ?diamonds 1. Explore the dataset & state insights 2. Create plots for dataset 3: Provide summary of descriptive stats) 4. Run the regressions, research, Investigate & comment on R^2 & on regression plots - 1 line each. #=========================================== # DV = Price, IV or IVs = your choice # Can we create and compare models to predict "Price"? # Question- Investigate & comment on R^2 &...
The Social Security Administration increased the taxable wage base from $107,200 to $109,100. The 6.2% tax...
The Social Security Administration increased the taxable wage base from $107,200 to $109,100. The 6.2% tax rate is unchanged. Joe Burns earned over $120,000 each of the past two years. a. What is the percent increase in the base? (Round your answer to the nearest hundredth percent.) Percent increase % b. What is Joe’s increase in Social Security tax for the new year? (Round your answer to the nearest cent.) Increase in social security tax $
2) According to the Social Security Administration, in 2018 the average wages and earnings in the...
2) According to the Social Security Administration, in 2018 the average wages and earnings in the US was $50,000, the median was $32,838 and σ=$10,200 based on 167 million wage earners. a) From the above data, are earnings normally distributed? Explain your reasoning. b) Regardless of you answer above, assume wages and earnings are normally distributed. Construct a 95% confidence interval for the mean using the above data. c) Regardless of you answer above, assume wages and earnings are normally...
1.) You work for the public relations department of the Social Security Administration. In an effort...
1.) You work for the public relations department of the Social Security Administration. In an effort to design better advertising campaigns, your department decides to conduct a survey to find out the opinions people in the United States have about the Social Security system. One of the questions asked and the results of each response and the respondents’ age are shown in the table (provided in the Table 1 below1 ). Your department believes that at most 40% of people...
The Transportation Security Administration (TSA) collects data on wait time at each of its airport security...
The Transportation Security Administration (TSA) collects data on wait time at each of its airport security checkpoints. For flights departing from Terminal 3 at John F. Kennedy International Airport (JFK) between 3:00 and 4:00 PM on Wednesday, the mean wait time is 12 minutes, and the maximum wait time is 16 minutes. [Source: Transportation Security Administration, summary statistics based on historical data collected between February 18, 2008, and March 17, 2008.] Assume that x, the wait time at the Terminal...
Probabilities of Death The US Social Security Administration collects information on the life expectancy and death...
Probabilities of Death The US Social Security Administration collects information on the life expectancy and death rates of the population. Table P.6 gives the number of US men out of 100,000 born alive who will survive to a given age, based on 2011 mortality rates.6 For example, 50,344 of 100,000 US males live to their 80th birthday. (a) What is the probability that a man lives to age 60? (b) What is the probability that a man dies before age...
When the Social Security Administration holds U.S. Treasury Bonds there is a balanced budget. interagency borrowing...
When the Social Security Administration holds U.S. Treasury Bonds there is a balanced budget. interagency borrowing has occurred and the government owes itself. the gross public debt has increased. an entitlement has occurred. QUESTION 12 In a fractional reserve banking system banks are required to keep all deposits on hand so that they can pay their depositors when they desire to withdraw funds. banks do not keep sufficient reserves on hand to cover 100 percent of their depositors' accounts. banks...
Research the current debates from the past 6 months about Social Security and Medicare. Identify one...
Research the current debates from the past 6 months about Social Security and Medicare. Identify one issue in the Social Security or Medicare debate and discuss two changes that would help address the issue you have identified.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT