A comparison is made between two bus lines to determine if arrival times of their regular buses from Denver to Durango are off schedule by the same amount of time. For 51 randomly selected runs, bus line A was observed to be off schedule an average time of 53 minutes, with standard deviation 19 minutes. For 60 randomly selected runs, bus line B was observed to be off schedule an average of 62 minutes, with standard deviation 15 minutes. Do the data indicate a significant difference in average off-schedule times? Use a 5% level of significance.
In: Statistics and Probability
In Java create a program that does the following. Suppose you shop for rice in two different packages. You would like to write a program to compare the cost. The program prompts the user to enter the weight and price of each package and displays the one with the better price.
Here are two sample runs:
Enter the weight for package 1: 50
Enter the price for package 1: 24.59
Enter the weight for package 2: 25
Enter the price for package 2: 11.99
Package 2 has a better price. Enter the weight for package 1: 50
Enter the price for package 1: 25
Enter the weight for package 2: 25
Enter the price for package 2: 12.50
The two packages have the same price.
Please submit the following:
1. Your analysis: a. What information is required as input, information to be processed or output, and what corresponding variables and data types have you designed to represent them?
b. What selection structure or structures did you select and why?
2. Your flowchart
In: Computer Science
Question3(A) Exercise 2.4.29 (The gambler’s ruin problem) Two gamblers, A and B, bet on the outcomes of successive flips of a coin. On each flip, if the coin comes up heads, A collects from B $1.00, whereas if it comes up tails, A pays to B $1. They continue to do this until one of them runs out of money. If it is assumed that the successive flips of the coin are independent and each flip results in a head with probability 50%, what is the probability that A winds up with all the money if A starts with $5 and B starts with $3.
Question 3(B) Repeat #3(A) but assume both A and B start with $5.
Question 3(C) Repeat #3(A) but assume the probability of getting a head is 80%
In: Statistics and Probability
Write a progrm that accepts two strings as input, then indicates if the two strings are equal when the case of individual letters is ignored.
Sample runs are shown below. Use C++
Enter two strings. String 1: PROgraM String 2: proGram PROgraM and proGram are equal.
Enter two strings. String 1: litter String 2: LittLe litter and LittLe are not equal.
In: Computer Science
1) Decorative Doors, Inc. produces two types of doors, brass and copper. The company’s simple costing system has two direct-cost categories (materials and labor) and one indirect-cost pool. The simple costing system allocates indirect costs on the basis of machine-hours.
The owners are curious about how an ABC system would affect their product costing decisions. After analyzing the indirect-cost pool for Decorative Doors, the owners identify five activities as generating indirect costs: production scheduling, material handling, machine setup, assembly, and inspection.
Decorative Doors collected the following data related to the indirect-cost activities:
| Activity | Activity cost | Activity allocation base |
| Production scheduling | $135,000 | Production runs |
| Material handling | $ 67,500 | Material moves |
| Machine setup | $ 37,500 | Machine setups |
| Assembly | $ 90,000 | Machine-hours |
| Inspection | $120,000 | Number of inspections |
| Total indirect costs |
Decorative Doors collected the following data for each door model related to the indirect-cost activities:
| Brass doors | Copper doors | |
| Production runs | 40 | 60 |
| Material moves | 275 | 400 |
| Machine setups | 50 | 75 |
| Machine-hours | 3,000 | 12,000 |
| Number of inspections | 275 | 125 |
How much more overhead is allocated to brass doors if Decorative Doors changes its costing system from the existing simple system to activity-based costing?
2) Esther Baskets Company expects revenue of $100,000 in its sales of baskets in 2020. The company plans to produce 9,000. There are 7,000 baskets in beginning finished goods inventory and Esther has a target ending inventory of 8,000 baskets. The company keeps no work-in-process inventory.
How many baskets do Esther Baskets Company plan to sell?
In: Accounting
2. The data set `MLB-TeamBatting-S16.csv` contains MLB Team Batting
Data for selected variables. Load the data set from the given url
using the code below. This data set was obtained from [Baseball
Reference](https://www.baseball-reference.com/leagues/MLB/2016-standard-batting.shtml).
* Tm - Team
* Lg - League: American League (AL), National League (NL)
* BatAge - Batters’ average age
* RPG - Runs Scored Per Game
* G - Games Played or Pitched
* AB - At Bats
* R - Runs Scored/Allowed
* H - Hits/Hits Allowed
* HR - Home Runs Hit/Allowed
* RBI - Runs Batted In
* SO - Strikeouts
* BA - Hits/At Bats
* SH - Sacrifice Hits (Sacrifice Bunts)
* SF - Sacrifice Flies
Using the `mlb16.data` data, do the following:
i) use `filter` to select teams with the following arguments:
a) Cardinals team `STL`.
b) teams with Hits `H` more than 1400 last 2016 season.
c) team league `Lg` is National League `NL`.
ii) use `arrange` to select teams in decreasing number of home runs
`HR`.
iii) use `arrange` to display the teams in decreasing number of
`RBI`.
iv) use `group_by` to group the teams per league; and `summarise`
to compute the average `RBI` within each league. Use the pipe
`%>%` operator to string multiple functions.
### Code chunk
```{r}
# load the data set
mlb16.data <-
read.csv("https://raw.githubusercontent.com/jpailden/rstatlab/master/data/MLB-TeamBatting-S16.csv")
str(mlb16.data) # check structure
head(mlb16.data) # show first six rows
# last R code line
```
In: Math
American League baseball teams play their games with a designated hitter rule, meaning that pitchers do not bat. The league believes that replacing the pitcher, traditionally a weak hitter, with another playing in the batting order produces more runs and generally more interest among the fans. (I, being a non-sports fan, assume the National League does NOT use a designated hitter…someone correct me if this is not correct!) The average number of home runs hit per game for the 2011 season in the American and National Leagues are found in the file Baseball.
Baseball file:
|
American League |
National League |
|
1.500 |
1.354 |
|
1.267 |
1.314 |
|
1.230 |
1.160 |
|
1.186 |
1.110 |
|
1.144 |
1.095 |
|
1.060 |
1.062 |
|
1.037 |
0.987 |
|
0.987 |
0.950 |
|
0.913 |
0.948 |
|
0.903 |
0.941 |
|
0.880 |
0.919 |
|
0.789 |
0.862 |
|
0.786 |
0.799 |
|
0.708 |
0.774 |
|
0.735 |
|
|
0.596 |
a) Obtain boxplots of the two data sets. Be sure to display them on the same plot. Are both data sets normally distributed? Does the spread of the data look roughly the same in each group? In other words, can we use the pooled t-test legitimately?
b) State the null and alternate hypothesis we would use to test whether there is a significant difference in the number of home runs hit per game between the American and National Leagues.
c) Run the two sample t-test two ways. The un-pooled test and the pooled test. What is the p-value for each test?
d) Do both tests reach the same conclusion? Use a 5% level of significance. Did the American League’s use of a designated hitter make any difference to the number of home runs hit per game?
In: Statistics and Probability
Consider the hallmark question below
A) Use simulation with 1000 replications to determine the distribution of profit for 130 unit order quantity. CHART IT.
B) Use one way data table to determine the expected profit for each of order quantities 100, 110, 120, 130, and 140. Determine the optimal order quantity.
Hallmark sells “personal expression” cards and gifts worldwide through either its own stores or other retailers. Most products are single runs. A typical problem Hallmark faces is as follows: A Barbie stationery gift set—containing 16 notes, envelopes, and foil seals—is to be produced and marketed to celebrate the 60th year of Barbie. The price will be set at $14 per unit. The cost of production to Hallmark will be $7 per unit. The product manager, based on previous sales of Barbie stationery products, estimates that demand (in 1000s) and its probability for this product will be as follows: Demand 100 110 120 130 140 Probability 0.10 0.20 0.40 0.20 0.10 Hallmark will sell any units not sold through regular channels to discount retailers at $2 less than cost (i.e., $5 per unit). There is no penalty cost for being short.
In: Accounting
Problem 17-5A Pricing analysis with ABC and a plantwide overhead rate LO A1, A2, P1, P3
[The following information applies to the questions
displayed below.]
Sara’s Salsa Company produces its condiments in two types: Extra
Fine for restaurant customers and Family Style for home use. Salsa
is prepared in department 1 and packaged in department 2. The
activities, overhead costs, and drivers associated with these two
manufacturing processes and the company’s production support
activities follow.
| Process | Activity | Overhead cost | Driver | Quantity | ||
| Department 1 | Mixing | $ | 4,600 | Machine hours | 2,700 | |
| Cooking | 11,600 | Machine hours | 2,700 | |||
| Product testing | 114,300 | Batches | 600 | |||
| $ | 130,500 | |||||
| Department 2 | Machine calibration | $ | 340,000 | Production runs | 800 | |
| Labeling | 20,000 | Cases of output | 135,000 | |||
| Defects | 7,000 | Cases of output | 135,000 | |||
| $ | 367,000 | |||||
| Support | Recipe formulation | $ | 87,000 | Focus groups | 75 | |
| Heat, lights, and water | 54,000 | Machine hours | 2,700 | |||
| Materials handling | 83,000 | Container types | 8 | |||
| $ | 224,000 | |||||
Additional production information about its two product lines
follows.
| Extra Fine | Family Style | |||
| Units produced | 38,000 | cases | 97,000 | cases |
| Batches | 380 | batches | 220 | batches |
| Machine hours | 1,150 | MH | 1,550 | MH |
| Focus groups | 64 | groups | 11 | groups |
| Container types | 3 | containers | 5 | containers |
| Production runs | 290 | runs | 510 | runs |
Problem 17-5A Part 5
1. Using a plantwide overhead rate based on
cases, compute the overhead cost that is assigned to each case of
Extra Fine Salsa and each case of Family Style Salsa.
2. Using the plantwide overhead rate, determine
the total cost per case for the two products if the direct
materials and direct labor cost is $10 per case of Extra Fine and
$8 per case of Family Style.
3.a. If the market price of Extra Fine Salsa is
$18 per case and the market price of Family Style Salsa is $13 per
case, determine the gross profit per case for each product.
3.b. What might management conclude about the
Family Style Salsa product line?
5. If the market price is $18 per case of Extra Fine and $13 per case of Family Style, determine the gross profit per case for each product. (Round your intermediate calculations and final answers to 2 decimal places.)
In: Accounting
The Friendly Sausage Factory (FSF) can produce hot dogs at a rate of 5,000 per day. FSF supplies hot dogs to local restaurants at a steady rate of 240 per day. The cost to prepare the equipment for producing hot dogs is $64. Annual holding costs are 44 cents per hot dog. The factory operates 294 days a year.
a. Find the optimal run size. (Do not round intermediate calculations. Round your answer to the nearest whole number.) Optimal run size
b. Find the number of runs per year. (Round your answer to the nearest whole number.) Number of runs
c. Find the length (in days) of a run. (Round your answer to the nearest whole number.) Run length (in days)
In: Other