Questions
In a standard deck of cards, there are 4 suits (Clubs, Hearts, Diamonds, and Spades) and...

In a standard deck of cards, there are 4 suits (Clubs, Hearts, Diamonds, and Spades) and 13 ranks

of each suit (2 through 10, Jack, Queen, King, Ace). The diamonds and hearts are red, spades and

clubs are black. Imagine drawing cards (without replacement) from a shuffled deck, so that any card

in the deck is equally likely to be drawn. What is the probability that

(a) If you draw 5 cards, no cards in your hand are red?

(b) If you draw 3 cards, you draw a club, a heart, and an ace (in that order)?

In: Statistics and Probability

An urn contains 4 white balls and 6 red balls. A second urn contains 7 white...

An urn contains 4 white balls and 6 red balls. A second urn contains 7 white balls and 3 red balls. An urn is selected, and the probability of selecting the first urn is 0.1. A ball is drawn from the selected urn and replaced. Then another ball is drawn and replaced from the same urn. If both balls are white, what are the following probabilities? (Round your answers to three decimal places.)

- (a) the probability that the urn selected was the first one

- (b) the probability that the urn selected was the second one

In: Statistics and Probability

Suppose that Pete enjoys painting purple people. He has very particular preferences and must have exactly...

Suppose that Pete enjoys painting purple people. He has very particular preferences and must have exactly 3 gallons of blue paint for each 2 gallons of red paint. Let R be the number of gallons of red paint and B be the number of gallons of blue paint. Also, let PR be the price of red paint. Suppose Pete has $15 to spend on paint. Also, the price of blue paint is PB=$2 per gallon.

Graph Pete's demand curve for red paint using the prices PR=$1, PR = $2, and PR =$3. Be sure to label your graph carefully and accurately.

In: Economics

Make sure your answers are written in red and you show your work. Some students are...

Make sure your answers are written in red and you show your work. Some students are able to write out their answers and then scan and upload them. If you cannot do this, you can create equations within WORD. DrawInk to Math

  1. Which distribution is used with small samples?
  1. The sheriff’s office samples in LEMAS (N = 827) reported that their agencies require new recruits to complete a mean of 599 hours of academy training (s=226). Construct a 99% confidence interval around this mean and interpret the interval in words.

  1. In the PPCS, respondents who say that they have been stopped by police while driving vehicles are asked to report the reason why they were stopped and the total length of time that the stop took. Among female drivers stopped for illegal use of a cellphone while driving (N=42), stops lasted a mean of 9.00 minutes (s=5.48). Construct a 95% confidence interval around this sample mean and interpret the interval in words.
  1. Respondents to the GSS (N=1,166) worked a mean of 40.27 hours per week (s=15.54). Construct a 99% confidence interval around this sample value and interpret the interval in words.
  1. In a random sample of prisons (N=30) from the COJ, the mean number of inmates per security-staff member was 4.34 (s=3.94). Construct a 95% confidence interval around this sample value and interpret the interval in words.

In: Statistics and Probability

A 45 year old male enters your office to discuss the use of oral medication that...

A 45 year old male enters your office to discuss the use of oral medication that will treat his fungal toenails, but has heard that the medication can cause problems with the liver.

While you explain to the patient that the liver is in fact a big filter where medications do pass through, what are some questions you can ask the patient about their past medical history, to ensure that oral medication is an option for him? What lab tests are performed on the patient to see if they are a candidate for oral medication?

In: Nursing

In your day to day travels, select two individuals with whom you have a casual acquaintance....

In your day to day travels, select two individuals with whom you have a casual acquaintance. This might be a clerk at your bank or someone who works on your campus. Do not use students for this journal assignment. Offer genuine praise to these two individuals. Notice their reactions; their posture; their eye contact, etc. How do you think these reactions would differ if you had offered insincere or false praise to these two individuals? What might you say in offering insincere praise? Describe your experience in detail. Do you think students can tell when teachers offer insincere or false praise? What are some examples of insincere praise that you have heard spoken to students?

In: Psychology

Hello, I need this done with Java and ran in Eclipse if possible. A university wants...

Hello, I need this done with Java and ran in Eclipse if possible.

A university wants to demonstrate its political correctness by applying the Supreme Court’s “Separate but equal is inherently unequal” doctrine to gender as well as race. As such, the university has decided that both genders will use the same bathroom facilities. However, in order to preserve some tradition, it decrees that when a woman is in the bathroom, only other women may enter, and when a man is in the bathroom, only other men may enter. Each politically correct bathroom will have a sign on the outside indicating what state the bathroom is in; Empty, Women Present, or Men Present.

Your job is to implement a multi-threaded simulation of this politically correct bathroom. You may use whatever counters and synchronization mechanisms you need to make sure that your politically correct bathroom works according to the university decree.

Your implementation must generate some status report whenever anyone enters or leaves the bathroom, which should include the sex of the person entering or leaving. This status report should include the state of the bathroom, the number of men and/or women waiting, and the number and sex of the occupants currently in the bathroom.

Once a person (thread) enters the bathroom, that person’s stay in the bathroom should be determined by a random number. The minimum stay should be 2 seconds, and the maximum stay should be 5 seconds.

Once a person (thread) has left the bathroom, use random numbers to determine when that thread will try to gain access again. I suggest that the wait should range from 4 seconds to 10 seconds.

Your program should start 5 male threads and 5 female threads. Each thread should visit the bathroom 10 times. Analyze the output to make sure things are working correctly. Capture a sample of your program’s status reports. Also, print out your source code. Demonstrate your program to the professor, and get a sign off.

Basic Program Structure for PCB (Politically Correct Bathroom)

PCB Class

This class really does all the work of synchronizing access to the PCB. The first question to ask is what information the PCB needs to keep. The PCB has a state, which reflects whether it is empty or whether there are males or females inside. It also must keep track of the number of occupants which are inside, and the number who are waiting to get inside. There can be males or females inside or waiting.

The PCB must also have a means of blocking a thread that is trying to gain access if the state of the PCB does not permit access for this thread at this time. In order to block a thread, the PCB can use the wait method, which will be used to block threads that must wait until the state of the PCB permits access. The PCB should keep a counter which indicates how many males or females are blocked and waiting to get into the PCB.

Since the PCB has multiple member variables which must be read and written by multiple threads, we must synchronize access to these member variables by making the methods of this class synchronized methods.

The constructor for the PCB class must initialize all member variables, including all the state and counter variables.

There should be a maleEnters( ) method and a femaleEnters( ) method. These methods check the state to see whether the male or female thread is allowed to enter or must be blocked. Remember, reading and/or writing the member variables must be done inside a critical section which is protected by the synchronized methods. State and/or counter variables must be updated appropriately. If the male or female must wait to enter, the wait method is used to block the thread. Returning from one of these methods indicates that the thread was successful in entering the PCB.

There should also be a femaleExits( ) method and a maleExits( ) method. These methods update the counter and state member variables appropriately. If the thread exiting the bathroom is the last one out, the state member variable must change, and any waiting threads must be unblocked so that they can attempt to enter again. The notifyAll method can be used to wake up all the threads that are blocked and waiting to get into the PCB.

Remember that something in your simulation must output the state and counter info frequently, or whenever any thread enters or exits the PCB.

MaleThread and FemaleThread Classes

These classes contain the code that simulates the actions of a male or female thread entering and exiting the PCB. These two classes can either inherit from the Thread class or implement the Runnable interface. The constructor for these two classes should accept a PCB object so that all the male and female threads are using the same PCB object. The run method of these two classes should contain a loop which is executed 10 times. Inside the loop, a thread would sleep for a random amount of time between 4 and 10 seconds, and then call the appropriate entry method on the PCB. Once that method returns, the thread has gained access to the PCB and should wait for between 2 and 5 seconds before calling the appropriate exit method on the PCB object.

Main Test Program

This program controls the simulation. The main program must create a PCB object to be used by the male and female threads. It must also create 5 MaleThread objects and 5 FemaleThread objects and start all the male and female threads executing.

It is up to you how to display the output from your simulation. You can use a console window and report the status every time a thread enters, starts waiting, stops waiting, or exits the PCB object. Or you can use a simple GUI and use the main thread to periodically (every 100 msec) update a display that shows in some way the threads that are in the PCB or that are waiting to get in, and whether they are male or female threads.

In: Advanced Math

Your aunt has a chronic healthcare condition that requires many visit to her healthcare provider. She...

Your aunt has a chronic healthcare condition that requires many visit to her healthcare provider. She recently changed jobs, which will require her family to move to a new state. She is afraid that she will not receive healthcare insurance from her new company for several months, and she is worried about finding a new provider to take care of her.

What advice would you give your stepmother about the new healthcare reform bill and how it will impact her situation?

Write your aunt an email or lengthy text message that offers her advice. Be thorough. This is your assessment for this week and counts as much as a quiz.

In: Nursing

let X be a random variable that represents the pH of arterial plasma for healthy adults...

let X be a random variable that represents the pH of arterial plasma for healthy adults the mean of the X distribution is Mew equals 7.4 a drug for arthritis has been developed however it is thought that this drug may change blood pH a random sample of 36 patients with arthritis took the drug for 3 months blood test showed that the bar x equals 8.4 with sample standard deviation s equals 2.8 use a 5% level of significance to test the claim that the drug has changed either way the mean pH level of the blood hey what is the level of significance State the null and alternative hypothesis what sampling distribution will you use explain the rationale for your choice of sampling distribution what is the value of the sample test statistic run answer to three decimal places estimate the p-value sketch the sampling distribution of show the area corresponding to the P value based on your answers in Parts a & C will you reject or fail to reject the null hypothesis are the data statistically significant at level a interpret your conclusion in the context of the

In: Statistics and Probability

The following table considers survey data about annual household income and whether or not a person...

The following table considers survey data about annual household income and whether or not a person vapes. <$35,000 $35,000-$99,999 $100,000+ Total Vape 47 57 19 123 Do Not Vape 381 659 362 1402 Total 428 716 381 1525 Problems Problem 1. Based on recent data, about 28% of Americans earn less than $35,000 annually, about 42% of Americans earn between $35,000 and $99,999 annually, and about 30% of Americans earn more than $100,000. Does it appear that the sample is representative of the population? In other words, does it appear that the total people in each income category matches the appropriate proportion? Conduct a chi-square goodness of fit test at the 5% significance level by completing the following steps: a. (2 points) State the null and alternative hypotheses in words. b. (2 points) Compute the expected frequencies for each of the three category. Be sure to show your work. c. (2 points) Compute the test statistic using the observed frequencies from the table and the expected frequencies you computed in part (b). d. (2 points) State the degrees of freedom and find the critical value. e. (2 points) Answer the question: does it appear that the sample is representative of the population? Justify using either the critical value method or p-value method. Problem 2. We now wish to decide if there “use of e-cigarettes” and “income category” are dependent. To assist with this process, the table from before has been augmented with most of the expected frequencies (listed in parentheses): <$35,000 $35,000-$99,999 $100,000+ Total Vape 47 (34) 57 (58) 19 (31) 123 Do Not Vape 381 (394) 659 (???) 362 (???) 1402 Total 428 716 381 1525 a. (2 points) Find the missing two expected frequencies, labeled as (???). For credit, be sure to show your work. b. (2 points) From a brief analysis of the frequencies, do you believe that there is convincing evidence of a dependence relationship between income category and whether or not a person vapes? Explain. c. (2 points) Based on the given information, the test statistic computes to be 10.47. Based on this, what is the conclusion of the hypothesis test at the 0.05 significance level? Be sure to justify your answer by using either the p-value or critical value method

statistics 10

In: Statistics and Probability