DS201_Lab8_rachelspence.ipynb - Colaboratory
pdf
keyboard_arrow_up
School
Iowa State University *
*We aren’t endorsed by this school
Course
201
Subject
Statistics
Date
Jan 9, 2024
Type
Pages
4
Uploaded by GrandResolvePanther40
11/2/22, 4:14 PM
DS201_Lab8_rachelspence.ipynb - Colaboratory
https://colab.research.google.com/drive/1F2M3ItuuNCgdRXWCS_gYq8cNn2mvoPPJ#scrollTo=dpS-EBP3_fgR&printMode=true
1/4
import numpy as np
import pandas as pd
lemon = pd.read_csv('
/content/Lemonade_Lab8.csv')
lemon.head
<bound method NDFrame.head of
Date Location
Lemon
Orange
Temperature
Leaflets
Price
0
7/1/16
Park
97
78
70
90
0.25
1
7/2/16
Park
98
67
72
90
0.25
2
7/3/16
Park
110
54
71
104
0.25
3
7/4/16
Beach
134
56
76
98
0.25
4
7/5/16
Beach
159
90
78
135
0.25
..
...
...
...
...
...
...
...
58
8/27/16
Park
129
100
83
90
0.35
59
8/28/16
Park
68
56
80
104
0.35
60
8/29/16
Park
63
77
82
98
0.35
61
8/30/16
Park
66
90
81
135
0.35
62
8/31/16
Beach
57
65
82
90
0.35
[63 rows x 7 columns]>
Date
Location
Lemon
Orange
Temperature
Leaflets
Price
0
False
False
False
False
False
False
False
1
False
False
False
False
False
False
False
2
False
False
False
False
False
False
False
3
False
False
False
False
False
False
False
4
False
False
False
False
False
False
False
...
...
...
...
...
...
...
...
58
False
False
False
False
False
False
False
59
False
False
False
False
False
False
False
60
False
False
False
False
False
False
False
61
False
False
False
False
False
False
False
62
False
False
False
False
False
False
False
63 rows × 7 columns
lemon.isnull()
lemon.duplicated()
11/2/22, 4:14 PM
DS201_Lab8_rachelspence.ipynb - Colaboratory
https://colab.research.google.com/drive/1F2M3ItuuNCgdRXWCS_gYq8cNn2mvoPPJ#scrollTo=dpS-EBP3_fgR&printMode=true
2/4
0
False
1
False
2
False
3
False
4
False
...
58
False
59
False
60
False
61
False
62
False
Length: 63, dtype: bool
from bokeh.models import ColumnDataSource
source_Q4 = ColumnDataSource(lemon)
from bokeh.io import output_notebook, show
output_notebook()
from bokeh.plotting import figure
p1 = figure(title= 'Lemon and Orange Sales by Temperature')
p1.circle('Temperature','Lemon', source= source_Q4, color='green', size=8, legend= dic
p1.triangle('Temperature','Orange', source= source_Q4, color='orange', size=8, legend=
p1.legend.location= 'top_left'
show(p1)
11/2/22, 4:14 PM
DS201_Lab8_rachelspence.ipynb - Colaboratory
https://colab.research.google.com/drive/1F2M3ItuuNCgdRXWCS_gYq8cNn2mvoPPJ#scrollTo=dpS-EBP3_fgR&printMode=true
3/4
You can see there is an increase in the number of oranges and lemons as the tempature increases.
There is more plotted symbols on the right side of the graph.
avg = lemon.groupby('Temperature')['Lemon'].mean()
std = lemon.groupby('Temperature')['Lemon'].std()
temperatures = list(lemon.groupby('Temperature').groups)
from bokeh.models import ColumnDataSource, CDSView, GroupFilter
source_Q6 = ColumnDataSource(lemon)
park = CDSView(source=source_Q6, filters=[GroupFilter(column_name='Location
beach = CDSView(source=source_Q6, filters=[GroupFilter(column_name='Locatio
p2 = figure(title='Temperature Vs Lemon Sales (Beach and Park)')
p2.circle('Temperature', 'Lemon', source=source_Q6, color='red', size=8, vi
p2.triangle('Temperature', 'Lemon', source=source_Q6, color='blue', size=8,
p2.vbar(x=temperatures, top=avg+std, width=0.8, bottom=avg-std, fill_alpha=
p2.legend.location = 'top_left'
show(p2)
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
11/2/22, 4:14 PM
DS201_Lab8_rachelspence.ipynb - Colaboratory
https://colab.research.google.com/drive/1F2M3ItuuNCgdRXWCS_gYq8cNn2mvoPPJ#scrollTo=dpS-EBP3_fgR&printMode=true
4/4
0s
completed at 3:54 PM
Colab paid products
-
Cancel contracts here
From this ±gure I can infer that no one id going to the beaach when the weather is below 74
degrees. I can also infer that more lemons and organges are bought when the temperature is
warmer outside. When it is hot outside there is an equal about of people buying at the park and the
beach.
Related Documents
Related Questions
estnavclient.psonsvc.net/#/question/1429fac6-f27b-4c12-86d0-e9ffb3f15887/d5138119-f806-4fd4-bd04-cbe9aa7c6acc
Review -
A Bookmark
Paiz Guevar
S Math 1 Unit 3 Test 2020 / 3 of 11
II Paus
If B is the midpoint of AC, with point A at (5, 2) and point C at (9, 0), what is the equation of the line perpendicular to AC that passes through B?
O A. y=-½x- 13
O B. y= 2x– 13
O C. y=-½ x + 5
O D. y = 2x + 5
čms
US
arrow_forward
A myopenmath.com/assess2/?cid 105227&ad- 7513019#/skip/6
DVID-19 Mitigatin.
G what is product dev..
O Republc of the Phi...
COSRX Salcylic Ac..
Repub
Science and techno...
> Next question
Get a similar question
You can retry this question below
For each value below, enter the number correct to four decimal places.
Suppose an arrow is shot upward on the moon with a velocity of 39 m/s, then its height in meters after t
seconds is given by h(t) 39t-0.83t". Find the average velocity over the given time intervals.
[6, 7]:
16, 6.5]:
[6, 6.1]:
16, 6.01]:
16, 6.001]:
Question Helo: 9
Subow Cuesti
arrow_forward
We can make a causal claim from the results of the chi-square test ? tru or false
arrow_forward
i have submitted this question before but the answer i was provided was wrong, I answered twice i only have one submission left.
arrow_forward
ate.edu/portal/site/f37b0c28-85a3-43ae-a924-af41e3081543/tool/fc0d7e39-8282-4530-8f9a-bd537563ef5f/jsf/delivery/deliverAssessment
TESTS & QUIZZES
% Link
? Help
TIme Remaining: 00:16:31
A Hide Time Remaining A
Part 4 of 4
Question 6 of 7
1.5 Points
A math class has 70 students enrolled. A survey of those students indicated that 22 had taken a calculus class before and 29 had taken a statistics
class before. Further, 10 had taken both calculus and statistics before. The number of students who had taken neither calculus nor statistics
before is
Previous
Next
Save
11:58
图
1/19/
Mort sc
delete
home
end
is
144
num
backspace
8.
6.
lock
5
arrow_forward
p^2 +2pq +q^2 with A=p frequency a=q frequency Aa x Aa heterozygous cross
Assume there is a heterozygous survival advantage, where an AA type egg has probability 0.8 of mating and an aa type egg has probability 0.2 of mating, but Aa type eggs have 1.0 probability of mating. Explain why the new ‘total’ frequency of all chromosomes in reproducing adults (i.e., in the next generation born) will not be 100% but instead will be F(p) = 0.8p^2+ 1.0 ∙2pq + 0.2q^2 This is called the balance equation.
Find p1, the frequency of A in the adult population, if an AA type egg has probability 0.8 of mating and an aa type egg has probability 0.2 of mating, but Aa type eggs have 1.0 probability of mating. Remember that the frequency is the proportion out of the total and use the balance equation you derived above.
Note I think finding p1 involves implicit differentiation. Frequency of A is described as variable p.
arrow_forward
• https://virtualse.geniussis.c
• https://virtualse.geniussis.
nsus at School - United
E My statement ProbStat - G x
in Unit 4 Test DUE 11/23 (pag
a scde-genius.mrooms.net/mod/quiz/attempt.php?attempt= 10548286&cmid= 13041088page=1
D
E VSC
Dy Mond Hughes
obability and
0.2
atistics CP Fall 2021
larward)
adges
0.1
ompetencies
00
1
ades
Number of Objects
1. What is the probability distribution? (Enter the exact values by using fractions. Use / as the division bar. Do not use spaces in
nit 00: Course
your answers.)
verview and
Croduction DUE 9/10
Number of Objects z0
4
mit 1 DUE 9/28
Probability P(z)
0.1 I
mit 2 DUE 10/14
2. What is the probability of selecting 4 objects from the container? P(z- 4) =
pject Phase 1 DUE
/18
3. What is the probability of selecting less than 2 objects from the container? P(z 2) =
4. What is the probability of selecting between 3 and 4 objects, inclusive? P(3
s ezS.
4) 03
ait 3 DUE 11/3
5. What is the mean and standard deviation? J= 1.95
and o 1.12
Round to the…
arrow_forward
OMail-Robinson, Judy, Studen
https://virtualsc.geniussis.con x
n Unit 1 Test (TG) (page 5 of 8)
scde-genius.mrooms.net/mod/quiz/attempt.php?attempt=10723446&cmid%3D1346416&page%3D4#question-107979*
Sample Space and Probability
A bag has 2 baseballs (B), 5 tennis balls (T), and 3 whiffle balls (W)
What is the probability of pulling out a baseball? Enter your answers in this order: reduced fraction,
decimal, and then percent.
P(B)
2/10
(reduced fraction) =
1/5
(decimal) =
20
This is an example of experimental probability.
How many outcomes are in the sample space? Outcomes
In this case, choosing a baseball is the
What is the probability of pulling out a tennis ball?
P(T) =
(reduced fraction) =
(decimal) =
%.
Which is more likely to occur?
tennis
Why? Because the probability is closer to 1
Please answer all parts of the question.
arrow_forward
Study Finds Benefit of Tablet
Every Other. Day Is Much
Greater Than Expected
Ву HAROLD M.SCHMECK Jr.
A major nationwide study shows that
a single aspirin tablet every other day
can sharply reduce a man's risk of
heart auack and death from heart at-
tack.
The lifesaving effects were so dra-
matic that the study was halted in mid-
December so that the results could be
reported as soon as possible to the par-
|ticipants and to the medical profession
in general.
The magnitude of the beneficial ef-
fect was far greater than expected, Dr.
Charles H. Hennekens of Harvard,
principal investigator in the research,
said in a telephone interview. The risk
of myocardial infarction, the technical
name for heart attack, was cut aimosi
in half.
'Extreme Beneficial Effect
A special report said the results
showed "a statistically extreme benefi-
ciał effect" from the use of aspirin. The
report is to be published Thursday in
The New England Journal of Medicine.
In recent years smaller studies have…
arrow_forward
https://www.myopenmath.com/assessz/?cid%3D86
6715&aid=D6636/48#/skip/11
Question 11
Next Question
arrow_forward
estnavclient.psonsvc.net/#/question/1429fac6-f27b-4c12-86d0-e9ffb3f15887/d5138119-f806-4fd4-bd04-cbe9aa7c6acc
Paiz Guevara, Zay-
Review -
ABookmark
II Pause
S Math 1 Unit 3 Test 2020 / 4 of 11
Clara created a coordinate grid of her city. The bowling alley is located at (10, 12) and the skating rink is located at (6, -4). Halfway
between the bowling alley and skating rink is the movie theater. Clara's house is halfway between the movie theater and skating rink.
What are the coordinates of Clara's house?
OA. ("4, 0)
о в. (-2, 0)
о с. (2, 4)
O D. (6, 8)
cms
US
1 7:37
arrow_forward
A sample of 120 employees of a company is selected, and the average age is found to be 37 years. Parameter or stasistic?
arrow_forward
The mean score for scrabble players at the neighborhood center is \mu =215 points. The players read a book that claims it can raise scores significantly. After reading the book, a team of 25 players obtains a score of M=218 points, with s=25. Does the data indicate that reading the book leads to increases in the players' scores? Test with \alpha =.05
arrow_forward
The article "Why We Fall for This"† described a study in which a business professor divided his class into two groups. He showed students a mug and then asked students in one of the groups how much they would pay for the mug. Students in the other group were asked how much they would sell the mug for if it belonged to them. Surprisingly, the average value assigned to the mug was quite different for the two groups! Indicate whether the study is an observational study or an experiment. Give a brief explanation for your choice.
arrow_forward
Unfortunately, arsenic occurs naturally in some ground water†. A mean arsenic level of μ = 8.0 parts per billion (ppb) is considered safe for agricultural use. A well in Texas is used to water cotton crops. This well is tested on a regular basis for arsenic. A random sample of 31 tests gave a sample mean of x = 6.9 ppb arsenic, with s = 2.5 ppb. Does this information indicate that the mean level of arsenic in this well is less than 8 ppb? Use ? = 0.05.
What is the value of the sample test statistic? (Round your answer to three decimal places.)
(c) Find the P-value. (Round your answer to four decimal places.)
arrow_forward
Section 4.1 Introduction to Probability
Progress saved
Score: 4.67/15
4/15 answered
Question 8
>
A poll showed that 59.6% of Americans say they believe that some psychics can help solve murder cases.
What is the probability of randomly selecting someone who does not believe that some psychics can help
solve murder cases.
- Evaluations
Probability =
Submit Question
pic_16131095275...jpg
Zoomday17bsp21.docx
pic_1615670389...jpg
46...jpg
pic_16131095275..jpg
17
MacBook Air
F10
20 F3
888
F7
F4
#
$
%
&
*
@
7
8
9
2
3
4
5
W
E
Y
w/
arrow_forward
SEE MORE QUESTIONS
Recommended textbooks for you

MATLAB: An Introduction with Applications
Statistics
ISBN:9781119256830
Author:Amos Gilat
Publisher:John Wiley & Sons Inc

Probability and Statistics for Engineering and th...
Statistics
ISBN:9781305251809
Author:Jay L. Devore
Publisher:Cengage Learning

Statistics for The Behavioral Sciences (MindTap C...
Statistics
ISBN:9781305504912
Author:Frederick J Gravetter, Larry B. Wallnau
Publisher:Cengage Learning

Elementary Statistics: Picturing the World (7th E...
Statistics
ISBN:9780134683416
Author:Ron Larson, Betsy Farber
Publisher:PEARSON

The Basic Practice of Statistics
Statistics
ISBN:9781319042578
Author:David S. Moore, William I. Notz, Michael A. Fligner
Publisher:W. H. Freeman

Introduction to the Practice of Statistics
Statistics
ISBN:9781319013387
Author:David S. Moore, George P. McCabe, Bruce A. Craig
Publisher:W. H. Freeman
Related Questions
- estnavclient.psonsvc.net/#/question/1429fac6-f27b-4c12-86d0-e9ffb3f15887/d5138119-f806-4fd4-bd04-cbe9aa7c6acc Review - A Bookmark Paiz Guevar S Math 1 Unit 3 Test 2020 / 3 of 11 II Paus If B is the midpoint of AC, with point A at (5, 2) and point C at (9, 0), what is the equation of the line perpendicular to AC that passes through B? O A. y=-½x- 13 O B. y= 2x– 13 O C. y=-½ x + 5 O D. y = 2x + 5 čms USarrow_forwardA myopenmath.com/assess2/?cid 105227&ad- 7513019#/skip/6 DVID-19 Mitigatin. G what is product dev.. O Republc of the Phi... COSRX Salcylic Ac.. Repub Science and techno... > Next question Get a similar question You can retry this question below For each value below, enter the number correct to four decimal places. Suppose an arrow is shot upward on the moon with a velocity of 39 m/s, then its height in meters after t seconds is given by h(t) 39t-0.83t". Find the average velocity over the given time intervals. [6, 7]: 16, 6.5]: [6, 6.1]: 16, 6.01]: 16, 6.001]: Question Helo: 9 Subow Cuestiarrow_forwardWe can make a causal claim from the results of the chi-square test ? tru or falsearrow_forward
- i have submitted this question before but the answer i was provided was wrong, I answered twice i only have one submission left.arrow_forwardate.edu/portal/site/f37b0c28-85a3-43ae-a924-af41e3081543/tool/fc0d7e39-8282-4530-8f9a-bd537563ef5f/jsf/delivery/deliverAssessment TESTS & QUIZZES % Link ? Help TIme Remaining: 00:16:31 A Hide Time Remaining A Part 4 of 4 Question 6 of 7 1.5 Points A math class has 70 students enrolled. A survey of those students indicated that 22 had taken a calculus class before and 29 had taken a statistics class before. Further, 10 had taken both calculus and statistics before. The number of students who had taken neither calculus nor statistics before is Previous Next Save 11:58 图 1/19/ Mort sc delete home end is 144 num backspace 8. 6. lock 5arrow_forwardp^2 +2pq +q^2 with A=p frequency a=q frequency Aa x Aa heterozygous cross Assume there is a heterozygous survival advantage, where an AA type egg has probability 0.8 of mating and an aa type egg has probability 0.2 of mating, but Aa type eggs have 1.0 probability of mating. Explain why the new ‘total’ frequency of all chromosomes in reproducing adults (i.e., in the next generation born) will not be 100% but instead will be F(p) = 0.8p^2+ 1.0 ∙2pq + 0.2q^2 This is called the balance equation. Find p1, the frequency of A in the adult population, if an AA type egg has probability 0.8 of mating and an aa type egg has probability 0.2 of mating, but Aa type eggs have 1.0 probability of mating. Remember that the frequency is the proportion out of the total and use the balance equation you derived above. Note I think finding p1 involves implicit differentiation. Frequency of A is described as variable p.arrow_forward
- • https://virtualse.geniussis.c • https://virtualse.geniussis. nsus at School - United E My statement ProbStat - G x in Unit 4 Test DUE 11/23 (pag a scde-genius.mrooms.net/mod/quiz/attempt.php?attempt= 10548286&cmid= 13041088page=1 D E VSC Dy Mond Hughes obability and 0.2 atistics CP Fall 2021 larward) adges 0.1 ompetencies 00 1 ades Number of Objects 1. What is the probability distribution? (Enter the exact values by using fractions. Use / as the division bar. Do not use spaces in nit 00: Course your answers.) verview and Croduction DUE 9/10 Number of Objects z0 4 mit 1 DUE 9/28 Probability P(z) 0.1 I mit 2 DUE 10/14 2. What is the probability of selecting 4 objects from the container? P(z- 4) = pject Phase 1 DUE /18 3. What is the probability of selecting less than 2 objects from the container? P(z 2) = 4. What is the probability of selecting between 3 and 4 objects, inclusive? P(3 s ezS. 4) 03 ait 3 DUE 11/3 5. What is the mean and standard deviation? J= 1.95 and o 1.12 Round to the…arrow_forwardOMail-Robinson, Judy, Studen https://virtualsc.geniussis.con x n Unit 1 Test (TG) (page 5 of 8) scde-genius.mrooms.net/mod/quiz/attempt.php?attempt=10723446&cmid%3D1346416&page%3D4#question-107979* Sample Space and Probability A bag has 2 baseballs (B), 5 tennis balls (T), and 3 whiffle balls (W) What is the probability of pulling out a baseball? Enter your answers in this order: reduced fraction, decimal, and then percent. P(B) 2/10 (reduced fraction) = 1/5 (decimal) = 20 This is an example of experimental probability. How many outcomes are in the sample space? Outcomes In this case, choosing a baseball is the What is the probability of pulling out a tennis ball? P(T) = (reduced fraction) = (decimal) = %. Which is more likely to occur? tennis Why? Because the probability is closer to 1 Please answer all parts of the question.arrow_forwardStudy Finds Benefit of Tablet Every Other. Day Is Much Greater Than Expected Ву HAROLD M.SCHMECK Jr. A major nationwide study shows that a single aspirin tablet every other day can sharply reduce a man's risk of heart auack and death from heart at- tack. The lifesaving effects were so dra- matic that the study was halted in mid- December so that the results could be reported as soon as possible to the par- |ticipants and to the medical profession in general. The magnitude of the beneficial ef- fect was far greater than expected, Dr. Charles H. Hennekens of Harvard, principal investigator in the research, said in a telephone interview. The risk of myocardial infarction, the technical name for heart attack, was cut aimosi in half. 'Extreme Beneficial Effect A special report said the results showed "a statistically extreme benefi- ciał effect" from the use of aspirin. The report is to be published Thursday in The New England Journal of Medicine. In recent years smaller studies have…arrow_forward
- https://www.myopenmath.com/assessz/?cid%3D86 6715&aid=D6636/48#/skip/11 Question 11 Next Questionarrow_forwardestnavclient.psonsvc.net/#/question/1429fac6-f27b-4c12-86d0-e9ffb3f15887/d5138119-f806-4fd4-bd04-cbe9aa7c6acc Paiz Guevara, Zay- Review - ABookmark II Pause S Math 1 Unit 3 Test 2020 / 4 of 11 Clara created a coordinate grid of her city. The bowling alley is located at (10, 12) and the skating rink is located at (6, -4). Halfway between the bowling alley and skating rink is the movie theater. Clara's house is halfway between the movie theater and skating rink. What are the coordinates of Clara's house? OA. ("4, 0) о в. (-2, 0) о с. (2, 4) O D. (6, 8) cms US 1 7:37arrow_forwardA sample of 120 employees of a company is selected, and the average age is found to be 37 years. Parameter or stasistic?arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- MATLAB: An Introduction with ApplicationsStatisticsISBN:9781119256830Author:Amos GilatPublisher:John Wiley & Sons IncProbability and Statistics for Engineering and th...StatisticsISBN:9781305251809Author:Jay L. DevorePublisher:Cengage LearningStatistics for The Behavioral Sciences (MindTap C...StatisticsISBN:9781305504912Author:Frederick J Gravetter, Larry B. WallnauPublisher:Cengage Learning
- Elementary Statistics: Picturing the World (7th E...StatisticsISBN:9780134683416Author:Ron Larson, Betsy FarberPublisher:PEARSONThe Basic Practice of StatisticsStatisticsISBN:9781319042578Author:David S. Moore, William I. Notz, Michael A. FlignerPublisher:W. H. FreemanIntroduction to the Practice of StatisticsStatisticsISBN:9781319013387Author:David S. Moore, George P. McCabe, Bruce A. CraigPublisher:W. H. Freeman

MATLAB: An Introduction with Applications
Statistics
ISBN:9781119256830
Author:Amos Gilat
Publisher:John Wiley & Sons Inc

Probability and Statistics for Engineering and th...
Statistics
ISBN:9781305251809
Author:Jay L. Devore
Publisher:Cengage Learning

Statistics for The Behavioral Sciences (MindTap C...
Statistics
ISBN:9781305504912
Author:Frederick J Gravetter, Larry B. Wallnau
Publisher:Cengage Learning

Elementary Statistics: Picturing the World (7th E...
Statistics
ISBN:9780134683416
Author:Ron Larson, Betsy Farber
Publisher:PEARSON

The Basic Practice of Statistics
Statistics
ISBN:9781319042578
Author:David S. Moore, William I. Notz, Michael A. Fligner
Publisher:W. H. Freeman

Introduction to the Practice of Statistics
Statistics
ISBN:9781319013387
Author:David S. Moore, George P. McCabe, Bruce A. Craig
Publisher:W. H. Freeman