Question

In: Statistics and Probability

To test whether my friend’s fish Googly had psychic powers, I wrote R code to display...

To test whether my friend’s fish Googly had psychic powers, I wrote R code to display two windows. I entered either “Left” or “Right” depending on which way Googly was facing. Then the random number generator in R selected either the left or the right window, with probability 0.5 for each, in which to display a star. Let p be the probability Googly guesses correctly on a given trial (assume this is constant.) In 80 trials, Googly correctly guessed the window with the star 41 times. (a) (3 points) Using mathematical notation, write down null and alternative hypotheses for a one-sided test. (b) (3 points) If the test statistic is the number of correct guesses (41) in 80 trials, write down R code to find the P-value of a one-sided test. (c) (2 points) Even without R, we can see that Googly’s success rate was close to its expected value under the null, so the one-tailed P-value will be close to 0.5. State your conclusion about the fish’s psychic powers. (d) (2 points) Continued from part (b). If you only known that the R code dbinom(40, 80, 0.5) gives the number 0.0889, how would you find the exact P-value of the test? (Hint: use the property of a symmetric probability distribution.)

Solutions

Expert Solution

Let be the probability Googly guesses correctly on a given trial . Here . Where is the number of correct guesses out of 80.

a) We have to test,

This is a left tailed binomial test.

b) The P-value of a test is . Where is the test statistic.

Here . . The probability,

The R command for finding the above probability is

> pbinom(40,80,0.5)
[1] 0.5444639

c) At significant level , since , we accept the null hypothesis. The conclusion is that fish has psychic powers.

d) Actually, the distribution is symmetric about . So we have using the property of symmetry

Which is the same as we calculated in part (b).


Related Solutions

My code is supposed to display a stacked bar chart of my average week. Can you...
My code is supposed to display a stacked bar chart of my average week. Can you help me locate my errors and fix them? I'm just so confused <!DOCTYPE html> <html lang = "en"> <head> <meta charset="UTF-8" /> <title>Assignment 3: My Weekly Schedule</title> <script src="https://d3js.org/d3.v3.min.js" charset="utf-8"></script> <style type="text/css"> svg { font: 10px sans-serif; shape-rendering: crispEdges; } .axis path, .axis line{ fill: none; stroke: #000; } path.domain { stroke: none; } .y .tick line{ stroke: #ddd; } </style> </head> <body> <script...
In R code please: Test the hypothesis whether the students smoking habit (Smoke) is independent of...
In R code please: Test the hypothesis whether the students smoking habit (Smoke) is independent of their exercise level (Exer) in dataset survey (MASS package) at 0.05 significance level. (Please include how to download the MASS package. Thanks.)
When I wrote this code in the Eclipse program, I did not see a output .....
When I wrote this code in the Eclipse program, I did not see a output .. Why? _______ public class AClass { private int u ; private int v ; public void print(){ } public void set ( int x , int y ) { } public AClass { } public AClass ( int x , int y ) { } } class BClass extends AClass { private int w ; public void print() { System.out.println (" u + v...
I wrote this code and just realized I need to put it into at least 6...
I wrote this code and just realized I need to put it into at least 6 different functions and I don't know how. No specific ones but recommended is: Read Data, Calculate Installation Price, Calculate Subtotal, Calculate Total, Print -> 1) Print Measurements & 2) Print Charges. Can somebody help? #include <stdio.h> // Function Declarations int length, width, area, discount; int main () { // Local Declarations double price, cost, charge, laborCharge, installed, amtDiscount, subtotal, amtTax, total; const double tax...
I wrote my start-up business plan for entrepreneurship class. Please loot at the my outline and...
I wrote my start-up business plan for entrepreneurship class. Please loot at the my outline and figure out what I don't have or What I can add more, and write about the part in detail. Executive Summary According to Wisconsin Farming bureau there are 77,000 farms in Wisconsin with a total of 14.4 million acres of land and agriculture in Wisconsin provides $88.3 billion to the states economy. With the advent of the organic foods trend younger households have seen...
In Python I have a code: here's my problem, and below it is my code. Below...
In Python I have a code: here's my problem, and below it is my code. Below that is the error I received. Please assist. Complete the swapCaps() function to change all lowercase letters in string to uppercase letters and all uppercase letters to lowercase letters. Anything else remains the same. Examples: swapCaps( 'Hope you are all enjoying October' ) returns 'hOPE YOU ARE ALL ENJOYING oCTOBER' swapCaps( 'i hope my caps lock does not get stuck on' ) returns 'I...
I. (a) On October 1, Sam wrote to Byron, “I offer to sell you my pickup...
I. (a) On October 1, Sam wrote to Byron, “I offer to sell you my pickup truck for $10,000 all cash payable on November 15, and will have it ready for delivery to you on November 15. This offer expires on October 20. [signed] Sam.” Byron received the letter on October 2. On October 17, Byron sent the following letter to Sam: “I am very much interested in your offer, but I am a little short of cash. I accept...
Python I want to name my hero and my alien in my code how do I...
Python I want to name my hero and my alien in my code how do I do that: Keep in mind I don't want to change my code except to give the hero and alien a name import random class Hero:     def __init__(self,ammo,health):         self.ammo=ammo         self.health=health     def blast(self):         print("The Hero blasts an Alien!")         if self.ammo>0:             self.ammo-=1             return True         else:             print("Oh no! Hero is out of ammo.")             return False     def...
I'm really confused Junit test case Here is my code. How can I do Junit test...
I'm really confused Junit test case Here is my code. How can I do Junit test with this code? package pieces; import java.util.ArrayList; import board.Board; public class Knight extends Piece {    public Knight(int positionX, int positionY, boolean isWhite) {        super("N", positionX, positionY, isWhite);    }    @Override    public String getPossibleMoves() {        ArrayList<String> possibleMoves = new ArrayList<>();               // check if squares where knight can go are available for it       ...
how do I write my case study for assignment work ? should I wrote in paraphrase...
how do I write my case study for assignment work ? should I wrote in paraphrase format or answered to every question sequentially.plz, give me an answer with example..thanks in advance.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT