Questions
In Unity with C#, I need to implement a dice simulator in my character generator(D&D). I...

In Unity with C#, I need to implement a dice simulator in my character generator(D&D). I have 6 sides of UI images(2D). With my code, I am able to roll and get the number in my console text(randomly).

But, I need help for rolling 5 dices, not the 1 dice. Also, I need to add all the three highest rolls with 5 dices and get a result in my display.

Ex) 1. Players must roll 5d6 and add the three highest rolls to compute each of the six Abilities. Note make all modifiers default to +2.

In: Computer Science

I. Answer part A,B, C and D. 1a) Count the number of times a given char...

I. Answer part A,B, C and D.

1a)

Count the number of times a given char occurs in a given range of a String parameter (i.e. starting at a given start index, and up to but not including and end index). If end is greater than the length of the String, then the method should stop looking at the end of the String.


countCharsInRange("java", "v", 1, 2) → 0
countCharsInRange("java", "v", 0, 2) → 0
countCharsInRange("java", "v", 0, 3) → 1

1b)

Return a new String that removes all copies of the given char ch from the given String

removeChar("dog", "o") → "dg"
removeChar("cat", "o") → "cat"
removeChar("aaa", "a") → ""

1c)

Return the number of times the letter 'a' is directly followed by the letter 'b' in the given String.


countAB("abc") → 1
countAB("wxyz") → 0
countAB("bcaca") → 0

1d)

Return a new String that is a copy of the given String with each character copied the given number of times. Assume that n is 0 or more.


eachCharNTimes("abc", 2) → "aabbcc"
eachCharNTimes("xyz", 3) → "xxxyyyzzz"
eachCharNTimes("a", 5) → "aaaaa"

In: Computer Science

In baseball a teams success is often thought to be a function of the team's hitting...

In baseball a teams success is often thought to be a function of the team's hitting and pitching performance. One measure of hitting performance is the number of home runs that team hits, and one measure of pitching performance is the earned run average for the teams pitching staff. It is generally believed that teams that hit more home runs and have a lower earned run average will win a higher percentage of games played. The following data show the proportion of games won, the number of home runs (HR), and the earned run average (ERA) for the 16 teams in the National League for the 2003 Major League Baseball season.

Team Won HR ERA
Arizona 0.519 152 3.857
Atlanta 0.623 235 4.106
Chicago 0.543 172 3.842
Cincinnati 0.426 182 5.127
Colorado 0.457 198 5.269
Florida 0.562 157 4.059
Houston 0.537 191 3.880
Los Angeles 0.525 124 3.162
Milwaukee 0.420 196 5.058
Montreal 0.512 144 4.027
New York 0.410 124 4.517
Philadelphia 0.531 166 4.072
Pittsburgh 0.463 163 4.664
San Diego 0.395 128 4.904
San Francisco 0.621 180 3.734
St Louis 0.525 196 4.642
Determine the estimated regression equation that could be used to predict the proportion of games won given the number of team home runs.

1. Could someone please help me calculate the critical value of the model?

2. Also, I need to find the conclusion. I limited it down to these two. Could you please explain the reason for a or b?

a. Do not reject null hypothesis. there is not significant relationship between HR and wins

b. Do not reject null hypothesis. There is a significant relationship between ERA and wins

Thanks so much for your help. Will give you 5 stars

In: Statistics and Probability

The manager of a music store has kept records of the number of CDs bought in...

The manager of a music store has kept records of the number of CDs bought in a single transaction by customers who make a purchase at the store. The accompanying table gives six possible outcomes and the estimated probability associated with each of these outcomes for the chance experiment that consists of observing the number of CDs purchased by a randomly selected customer at the store.

Number of CDs purchased 1 2 3 4 5 6 or more
Estimated probability 0.30 0.30 0.15 0.15 0.06 0.04

(a) What is the estimated probability that the next customer purchases three or fewer CDs?


(b) What is the estimated probability that the next customer purchases at most three CDs?


How does this compare to the probability computed in part (a)?

greater than part (a)less than part (a)     the same as part (a)


(c) What is the estimated probability that the next customer purchases five or more CDs?


(d) What is the estimated probability that the next customer purchases one or two CDs?


(e) What is the estimated probability that the next customer purchases more than two CDs?

What are the answer to these?

In: Statistics and Probability

In a typical month, an insurance agent presents life insurance plans to 40 potential customers. Historically,...

  1. In a typical month, an insurance agent presents life insurance plans to 40 potential customers. Historically, one in four such customers chooses to buy life insurance from this agent. You may treat this as a binomial experiment.
    1. What is the probability of success for this problem?
    2. What is the total number of trials in this problem?
    3. Create a probability distribution table which includes the value for the random variable and the probability of each possible outcome of the random variable. Also create the cumulative probability column.
    4. What is the probability that exactly five customers will buy life insurance from this agent in the coming month?
    5. What is the probability that no more than 10 customers will buy life insurance from this agent in the coming month?
    6. What is the probability that at least 20 customers will buy life insurance from this agent in the coming month?
    7. Determine the mean and standard deviation of the number of customers who will buy life insurance from this agent in the coming month?
    8. What is the probability that the number of customers who buy life insurance from this agent in the coming month will lie within two standard deviations of the mean?

show in excel

In: Math

A sample of 16 Triple-A minor league baseball teams were selected for statistical analysis. The following...

A sample of 16 Triple-A minor league baseball teams were selected for statistical analysis. The following data show the average attendance for the 16 teams selected. Also shown are the teams’ records; W denotes the number of games won, L denotes the number of games lost, and PCT is the proportion of games played that were won.  Additionally, each teams’ major league association was given. The data are contained in the file named AAA.

Team Name

League

W

L

PCT

Attendance

Buffalo Bisons

American

66

77

0.462

8812

Lehigh Valley IronPigs

National

55

89

0.382

8479

Pawtucket Red Sox

American

85

58

0.594

9097

Rochester Red Wings

American

74

70

0.514

6913

Scranton-Wilkes Barre Yankees

American

88

56

0.611

7147

Reno Aces

National

80

62

0.563

5765

Charlotte Knights

American

63

78

0.447

4526

Durham Bulls

American

74

70

0.514

6995

Nashville Sounds

American

72

68

0.514

8823

Norfolk Tides

American

64

78

0.451

6286

Richmond Braves

National

63

78

0.447

4455

Columbus Clippers

American

69

73

0.486

7795

Indianapolis Indians

National

68

76

0.472

8538

Louisville Bats

National

88

56

0.611

9152

Toledo Mud Hens

American

75

69

0.521

8234

  1. Report your results in a summary
    1. Introduction:  In your own words, briefly discuss the motivation of this research (why would a study on credit card charges be of interest?).
    2. Graph and Summary statistics:  present a graph that summarizes the data along with a table of summary statistics for each variable in the data set.  An interpretation must accompany any graph, chart, or table that you use.
    3. Methods:  
      1. Develop estimated regression equations, first using attendance as the dependent variable and then using number of wins as the independent variable. Discuss your findings.
      2. Develop an estimated regression equation with attendance as dependent variable and both league and wins as the independent variables.  Discuss your findings.
      3. What is the predicted attendance for an America league AAA team with 72 wins?
  1. Discussion:  Interpret the statistical decision you arrived at in terms that would be useful for sport organizations.  This section should also include suggestions for further research and/or discussion of additional variables that may provide more precise results.  

In: Statistics and Probability

A sample of 16 Triple-A minor league baseball teams were selected for statistical analysis. The following...

A sample of 16 Triple-A minor league baseball teams were selected for statistical analysis. The following data show the average attendance for the 16 teams selected. Also shown are the teams’ records; W denotes the number of games won, L denotes the number of games lost, and PCT is the proportion of games played that were won.  Additionally, each teams’ major league association was given. The data are contained in the file named AAA.

Team Name

League

W

L

PCT

Attendance

Buffalo Bisons

American

66

77

0.462

8812

Lehigh Valley IronPigs

National

55

89

0.382

8479

Pawtucket Red Sox

American

85

58

0.594

9097

Rochester Red Wings

American

74

70

0.514

6913

Scranton-Wilkes Barre Yankees

American

88

56

0.611

7147

Reno Aces

National

80

62

0.563

5765

Charlotte Knights

American

63

78

0.447

4526

Durham Bulls

American

74

70

0.514

6995

Nashville Sounds

American

72

68

0.514

8823

Norfolk Tides

American

64

78

0.451

6286

Richmond Braves

National

63

78

0.447

4455

Columbus Clippers

American

69

73

0.486

7795

Indianapolis Indians

National

68

76

0.472

8538

Louisville Bats

National

88

56

0.611

9152

Toledo Mud Hens

American

75

69

0.521

8234

  1. Report your results in a summary (see sample outline on Blackboard under Start Here).
    1. Introduction:  In your own words, briefly discuss the motivation of this research (why would a study on credit card charges be of interest?).
    2. Graph and Summary statistics:  present a graph that summarizes the data along with a table of summary statistics for each variable in the data set.  An interpretation must accompany any graph, chart, or table that you use.
    3. Methods:  
      1. Develop estimated regression equations, first using attendance as the dependent variable and then using number of wins as the independent variable. Discuss your findings.
      2. Develop an estimated regression equation with attendance as dependent variable and both league and wins as the independent variables.  Discuss your findings.
      3. What is the predicted attendance for an America league AAA team with 72 wins?

  1. Discussion:  Interpret the statistical decision you arrived at in terms that would be useful for sport organizations.  This section should also include suggestions for further research and/or discussion of additional variables that may provide more precise results.  

In: Statistics and Probability

Problem 6.082 SI Steam undergoes an isentropic compression in an insulated piston–cylinder assembly from an initial...

Problem 6.082 SI

Steam undergoes an isentropic compression in an insulated piston–cylinder assembly from an initial state where T1 = 120°C, p1 = 1 bar to a final state where the pressure p2 = 50 bar.


Determine the final temperature, in °C, and the work, in kJ per kg of steam.

In: Mechanical Engineering

3.0 kg of air initially occupying a volume of 0.01 m3 at a pressure of 95.0...

3.0 kg of air initially occupying a volume of 0.01 m3 at a pressure of 95.0 bar expands in a piston-cylinder assembly isothermally and without irreversibilities until the volume is 0.05 m3. Using the Redlich-Kwong equation of state, determine the

1. temperature during the process, in K

2. final pressure, in bar

In: Mechanical Engineering

A piston-cylinder has a volume of 1 ft3 and contains a substance initially at 50 °F...

A piston-cylinder has a volume of 1 ft3 and contains a substance initially at 50 °F and 1 atm. The system is then heated until the temperature becomes 300 °F. Determine the total heat added (Btu) and final volume (ft3) assuming the substance is: a) water, b) copper, c) neon, d) air.

In: Mechanical Engineering