a. Tom designed a complete factorial experiment with 2 factors. One factor had 4 levels, the other had 5 levels. For each combination of levels of factors, there were 6 replicates. In the ANOVA table associated with this design, what were the degrees of freedom of the interaction?
a. 7, b. 12, c. 20, d. 24, e. 30.
b. In the above ANOVA table of the complete factorial experiment, suppose we want to test the significance of the main effect of the factor with 4 levels. What is the distribution we use to calculate p-values?
a. F(3, 100), b. F (4, 120), c. F (4, 100), d. F (5, 100), e. F (5, 120).
In: Statistics and Probability
Show all calculations in a neat and organized manner. Be sure that I understand your logic. For your experiment you must treat 1 X 109 cells with 5 nM cycloheximide (MW=281.35). Cycloheximide is both toxic and expensive. You have counted the cells with a hemocytometer and found the following numbers when counting 5 “4x4” sections (each 4x4 is 0.004 µl) of a 1:10 dilution of you chlamy stock: 90, 103, 123, 99, 107.
1) What is the concentration of the initial Chlamy culture in cell/ml? _______________________
2) How many mls of cells of the culture must you use for the experiment? _____________________
3) Describe how you will treat the cells with cyclohexamide. Clearly show all calculations.
In: Biology
USE R-studio TO WRITE THE CODES!
# 2. More Coin Tosses
Experiment: A coin toss has outcomes {H, T}, with P(H) = .6.
We do independent tosses of the coin until we get a head.
Recall that we computed the sample space for this experiment in class, it has infinite number of outcomes.
Define a random variable "tosses_till_heads" that counts the
number of tosses until we get a heads.
```{r}
```
Use the replicate function, to run 100000 simulations of this
random variable.
```{r}
```
Use these simulations to estimate the probability of getting a head
after 15 tosses. Compare this with the theoretical value computed
in the lectures.
```{r}
```
Compute the probability of getting a head after 50 tosses. What do
you notice?
```{r}
In: Computer Science
USE R TO WRITE THE CODES!
# 2. More Coin Tosses
Experiment: A coin toss has outcomes {H, T}, with P(H) = .6.
We do independent tosses of the coin until we get a head.
Recall that we computed the sample space for this experiment in class, it has infinite number of outcomes.
Define a random variable "tosses_till_heads" that counts the
number of tosses until we get a heads.
```{r}
```
Use the replicate function, to run 100000 simulations of this
random variable.
```{r}
```
Use these simulations to estimate the probability of getting a head
after 15 tosses. Compare this with the theoretical value computed
in the lectures.
```{r}
```
Compute the probability of getting a head after 50 tosses. What do
you notice?
```{r}
In: Computer Science
Sorry for the layman question, but it's not my field.
Suppose this thought experiment is performed. Light takes 8 minutes to go from the surface of the Sun to Earth. Imagine the Sun is suddenly removed. Clearly, for the remaining 8 minutes, we won't see any difference.
However, I am wondering about the gravitational effect of the Sun. If the propagation of the gravitational force travels with the speed of light, for 8 minutes the Earth will continue to follow an orbit around nothing. If however, gravity is due to a distortion of spacetime, this distortion will cease to exist as soon as the mass is removed, thus the Earth will leave through the orbit tangent.
What is the state of the art of research for this thought experiment? I am pretty sure this is knowledge that can be inferred from observation.
In: Physics
USE C++
Song struct to store the data for a single song (make it a private member), and you must have an array of Song structures as a member variable.
Player(string name, float size) a constructor
for the class. ’name' is a name for it
'size' is a maximum capacity in Mb.
addSong(string band, string title, string length, float size) a function for adding a new song.
'band' is a name of the band
'title' is a name of the song
'length' is a time length of that song in a '1:23' format (“mm:ss")
'size' is a size of the song in Mb
Return true if the song was added and false if there was not enough space (memory) for it or there was a song with the same band and title already in that device or if the device already has 1000 songs in it.
removeSong(string band, string title) a
function for removing a song 'band' is a name of the band
'title' is a name of the song
Return true if the song was successfully removed and false if it wasn't present on the device.
displaySongInfo(string band, string title) a
function to display a song’s info in the following format:
Band:
Length:
Number of songs:
Total length:
Free space left:
The output must line up in two columns, but the labels may be right
justified.
In: Computer Science
Please add comments to this code!
JAVA Code:
import java.text.NumberFormat;
public class Item {
private String name;
private double price;
private int bulkQuantity;
private double bulkPrice;
/***
*
* @param name
* @param price
* @param bulkQuantity
* @param bulkPrice
*/
public Item(String name, double price, int
bulkQuantity, double bulkPrice) {
this.name = name;
this.price = price;
this.bulkQuantity =
bulkQuantity;
this.bulkPrice =
bulkPrice;
}
public Item(String name, double price) {
if (price < 0) {
throw
new IllegalArgumentException();
}
this.name = name;
this.price = price;
}
/***
*
* @param quantity
* @return
*/
public double priceFor(int quantity) {
double actual = 0;
if (quantity < 0) {
throw
new IllegalArgumentException();
} else {
if
(bulkQuantity!=0) {
actual = (quantity / bulkQuantity) * bulkPrice
+ (quantity % bulkQuantity) * price;
} else
{
actual = quantity * price;
}
}
return actual;
}
public boolean equals(Item ietm) {
return
this.name.equals(ietm.name);
}
@Override
public String toString() {
NumberFormat format =
(NumberFormat) NumberFormat.getCurrencyInstance();
format.setMinimumFractionDigits(2);
format.setMaximumFractionDigits(2);
String str = "";
str = name + ", " +
format.format(price);
if (bulkPrice != 0) {
str +=
" ( " + bulkQuantity + " for " + format.format(bulkPrice)
+ " )";
}
return str;
}
}
Thanks!!
In: Computer Science
'''
Problem 1: Formin' Functions
Define and complete the functions described below.
The functions are called in the code at the very bottom. So you
should be
able simply to run the script to test that your functions work as
expected.
'''
'''
* function name: say_hi
* parameters: none
* returns: N/A
* operation:
Uhh, well, just say "hi" when called. And by "say" I mean
"print".
* expected output:
>>> say_hi()
hi
'''
'''
* function name: personal_hi
* parameters: name (string)
* returns: N/A
* operation:
Similar to say_hi, but you should include the name argument in the
greeting.
* expected output:
>>> personal_hi("Samantha")
Hi, Samantha
'''
'''
* function name: introduce
* parameters: name1 (string)
name2 (string)
* returns: N/A
* operation:
Here you are simply including the two names in a basic
introduction.
* expected output:
>>> introduce("Samantha","Jerome")
Samantha: Hi, my name is Samantha!
Jerome: Hey, Samantha. Nice to meet you. My name is Jerome.
'''
# FUNCTIONS ARE CALLED BELOW HERE...NO NEED TO TOUCH ANYTHING
# UNLESS YOU WANT TO COMMENT SOMETHING OUT TO TEST THINGS
# ALONG THE WAY...
say_hi()
personal_hi("Larry")
personal_hi("Naomi")
introduce("Larry","Naomi")
In: Computer Science
Write a function called format_name that accepts a string in the format of first name followed by last name as a parameter, and then returns a string in reverse order (i.e., last name, first name). You may assume that only a first and last name will be given.
For example, format_name("Jared Smith") should return "Smith, Jared"
Hint: The following String Methods will be useful:
# Returns the lowest index in the string where substring is # found. Returns -1 if substring is not found my_string = “eggplant” index = my_string.find(“plant”) # returns 3 # Returns all the characters after the specific index my_string = "hello world!" print my_string[1:] # returns "ello world!" print my_string[6:] # returns "world!" # Returns all the characters before the specific index my_string = "hello world!" print my_string[:6] # returns "hello" print my_string[:1] # returns "h"
Your program should include:
PLEASE HELP PYTHON COMPUTER SCIENCE
In: Computer Science
'''
Problem 1: Formin' Functions
Define and complete the functions described below.
The functions are called in the code at the very bottom. So you
should be
able simply to run the script to test that your functions work as
expected.
'''
'''
* function name: say_hi
* parameters: none
* returns: N/A
* operation:
Uhh, well, just say "hi" when called. And by "say" I mean
"print".
* expected output:
>>> say_hi()
hi
'''
'''
* function name: personal_hi
* parameters: name (string)
* returns: N/A
* operation:
Similar to say_hi, but you should include the name argument in the
greeting.
* expected output:
>>> personal_hi("Samantha")
Hi, Samantha
'''
'''
* function name: introduce
* parameters: name1 (string)
name2 (string)
* returns: N/A
* operation:
Here you are simply including the two names in a basic
introduction.
* expected output:
>>> introduce("Samantha","Jerome")
Samantha: Hi, my name is Samantha!
Jerome: Hey, Samantha. Nice to meet you. My name is Jerome.
'''
# FUNCTIONS ARE CALLED BELOW HERE...NO NEED TO TOUCH ANYTHING
# UNLESS YOU WANT TO COMMENT SOMETHING OUT TO TEST THINGS
# ALONG THE WAY...
say_hi()
personal_hi("Larry")
personal_hi("Naomi")
introduce("Larry","Naomi")
In: Computer Science