Question

In: Math

show all work 1) The following is a list of prices (in dollars) of birthday cards...

show all work
1) The following is a list of prices (in dollars) of birthday cards found in various drug stores:
2.45
1.20
0.85
1.33
2.25
2.25
2.09
2.99
1.00
0.88
1.42
2.36
2.15
2.85
1.52
1.99
2.38
0.85
2.22
2.75

a. Using R find the mean, median, mode, range, variance and standard deviation of the data. Attach your output from Excel/R.
b. Using /R, construct a frequency histogram of the data set. Use the guidelines in the class notes. Provide all the details (interval, width, etc.) on how you constructed the histogram. Make sure that you attach the histogram created by Excel/R. Comment on the shape of the frequency distribution (e.g., is the distribution skewed? Is the distribution approximately mound-shaped and symmetric?) for the data set based on your histogram.

c. Based on the results in part a, construct the intervals and for the data set. Be sure to show your interval below. Based on the results in part b what percentage of the measurements for the data set falls in each interval

Solutions

Expert Solution


#a. Using R find the mean, median, mode, range, variance and standard deviation of the data.

prices <- c(2.45, 1.20, 0.85, 1.33, 2.25, 2.25, 2.09, 2.99, 1.00, 0.88,
1.42, 2.36, 2.15, 2.85, 1.52, 1.99, 2.38, 0.85, 2.22, 2.75)


  
Mean <- mean( prices )

Median <- median( prices )
  
findmode <- function(v) {
uniqv <- unique(v)
uniqv[which.max(tabulate(match(v, uniqv)))]
}
  
Mode <- findmode(prices)
  
Range <- range( prices )
Variance <- round( var( prices ) , 3)
StandardDeviation <- round( sd( prices ), 3 )
  

#the mean, median, mode, range, variance and standard deviation of the data
print(Mean)
print(Median)
print(Mode)
print(Range)
print(Variance)
print(StandardDeviation )

#b. Using /R, construct a frequency histogram of the data set. Use the guidelines in the
#class notes. Provide all the details (interval, width, etc.) on how you constructed the
#histogram. Make sure that you attach the histogram created by Excel/R. Comment on the shape
#of the frequency distribution (e.g., is the distribution skewed? Is the distribution
#approximately mound-shaped and symmetric?) for the data set based on your histogram.

#Count the number of data points
length(prices)

#Calculate the number of bins by taking the square root of the number
#of data points and round up.
bins = ceiling(sqrt(length(prices)))
bins

#Calculate the bin width by dividing the specification tolerance or
#range (USL-LSL or Max-Min value) by the # of bins
width = range( prices)/ bins
width

hist( prices, breaks = 5, main = 'Histogram of prices')
# distribution is not mount shaped. It is skewed.


#c. Based on the results in part a, construct the intervals and for the data set.
#Be sure to show your interval below. Based on the results in part b what percentage
#of the measurements for the data set falls in each interval

factors <- factor(cut(prices, breaks=nclass.Sturges(prices)))
#Tabulate and turn into data.frame
out <- as.data.frame(table(factors))
#Add cumFreq and proportions
out <- transform(out, percentage = prop.table(Freq))
out


Related Solutions

SHOW ALL WORK 1) The following is a list of prices (in dollars) of birthday cards...
SHOW ALL WORK 1) The following is a list of prices (in dollars) of birthday cards found in various drug stores: 2.45 1.20 0.85 1.33 2.25 2.25 2.09 2.99 1.00 0.88 1.42 2.36 2.15 2.85 1.52 1.99 2.38 0.85 2.22 2.75 a. Using R find the mean, median, mode, range, variance and standard deviation of the data. Attach your output from Excel/R. b. Using R, construct a frequency histogram of the data set. Use the guidelines in the class notes....
Please show all work and all steps. 1.) Two cards are drawn from a standard 52-card...
Please show all work and all steps. 1.) Two cards are drawn from a standard 52-card playing deck. What is the probability that the draw will yield an ace and a face card? 2.) Articles coming through an inspection line are visually inspected by two successive inspectors. When a defective article comes through the inspection line, the probability that it gets by the first inspector is .1. The second inspector will "miss" five out of ten of the defective items...
The following data show the daily closing prices (in dollars per share) for a stock. Date...
The following data show the daily closing prices (in dollars per share) for a stock. Date Price ($) Nov. 3 83.71 Nov. 4 83.87 Nov. 7 83.40 Nov. 8 83.86 Nov. 9 83.24 Nov. 10 82.90 Nov. 11 84.66 Nov. 14 84.35 Nov. 15 85.74 Nov. 16 86.62 Nov. 17 86.74 Nov. 18 87.93 Nov. 21 87.98 Nov. 22 87.60 Nov. 23 88.22 Nov. 25 88.39 Nov. 28 88.94 Nov. 29 89.72 Nov. 30 89.77 Dec. 1 89.22 a. Define...
Show all your work Show all your work 3. Sales discount- allocate the following transactions into...
Show all your work Show all your work 3. Sales discount- allocate the following transactions into the correct part of the accounting equation and their correct T account a. Brown Company sold merchandise on account to Black Company $32,456 b. Black Company returned $10,121 worth of merchandise (account was credited) C. Brown Company received a check from Black Company less the returns with an 8% discount of 15/30 4. Purchase discount- allocate the following transactions into the correct part of...
Show all of your work in the space provided. Show all of your work to get...
Show all of your work in the space provided. Show all of your work to get full credit. All answers have to be in SI units(20 pints for each questions). 2.Following are the two sets of position and time data collected using a motion sensor and cart.        Table 1. table 2 Time (s) Position (m) V(instantaneous) (m/s) 0 10.0 0.25 13.0 0.50 16.5 0.75 21.0 1.00 26.5 1.25 32.3 1.50 38.0 1.75 44.5 2.00 52.0 2.25 60.0 2.50 68.5...
Show all work and answer steps in complete sentences please list them ex. Step 1 underline...
Show all work and answer steps in complete sentences please list them ex. Step 1 underline steps Use a two-tailed test and α = .05. Round up to two decimal places. Dependent t-test We want to test exercise on stress. A sample of participants reported their stress levels before and after exercising?Conduct four steps of hypothesis testing. Before      After                   D 25              10                     15 25              17                      8 21              15                      6...
Show all work and answer steps in complete sentences pls list them ex. Step 1 underline...
Show all work and answer steps in complete sentences pls list them ex. Step 1 underline steps A psychologist wants to compare the group of people who exercise regularly and the group of people who do not exercise regularly on the level of stress. She took a sample of 8 people from each population. These numbers indicate the participants’ stress levels. Can she conclude that there is a difference between two groups on the level of stress? Conduct four steps...
please show work on Question 3 2. The following table shows stock prices (May 1, 2017,...
please show work on Question 3 2. The following table shows stock prices (May 1, 2017, closing), EPS 2016 actual, 2017 forecast, 2018 forecast, and 2016 dividend for the three chemical companies. Stock Price EPS, 2016 Actual EPS, 2017 EPS, 2018 Dividend DuPont 79.49 2.77 3.84 4.09 1.52 Dow 62.52 3.52 4.07 4.41 1.84 PPG 109.46 5.82 6.26 6.92 1.56 Given the information above, calculate PE for the three definitions of EPS, dividend yield, and dividend payout. Price/Actual EPS Price/2017...
Sketch the curve of the following function and show all the work y=x/√(x²-1)
Sketch the curve of the following function and show all the work y=x/√(x²-1)
For the following reaction show all work: 1. Give the oxidation number for each element in...
For the following reaction show all work: 1. Give the oxidation number for each element in the following equation. Fe2O3 (s) + CO (g) = Fe (s) + CO2 (g) a. Write the balanced oxidation half reaction. b. Write the balanced reduction half reaction. c. What is the oxidizing agent? d. What is the reducing agent? e. What is the net ionic equation?
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT