Skip to main content

Posts

Showing posts from September, 2022

Probability - Module # 4 assignment

 A1  30/90 OR 1/3 A2  30/90 OR 1/3 A3  50/90 OR 5/9 A4  FALSE due to overlap since they seem to be not mutually exclusive due to them sharing a value B1 TRUE B2    You take when it does not rain and multiply it by when the weatherman predicts it will and doesn't. Then take when it does rain and multiply it by when the weatherman predicts it will rain. Then you multiply the days it rains by when the weather man is right and divide it by the previous. This will give us the asked outcome. C1 (8/10) ten times gets you .1073741824 or .1074 or 10.74%

Module # 3 assignment

 >first<- c(10,2,3,2,4,2,5) > second<- c(20,12,13,12,14,12,15) 1.CENTRAL TENDENCY > #Central Tendency for first > mean(first) [1] 4 > median(first) [1] 3 > #Central Tendency for second > mean(second) [1] 14 > median(second) [1] 13 2. VARIATION > #Variation for first > sd(first) [1] 2.886751 > range(first) [1]  2 10 > quantile(first)   0%  25%  50%  75% 100%  2.0  2.0  3.0  4.5 10.0 > var(first) [1] 8.333333 > #Variation for second > sd(second) [1] 2.886751 > range(second) [1] 12 20 > quantile(second)   0%  25%  50%  75% 100% 12.0 12.0 13.0 14.5 20.0 > var(second) [1] 8.333333  3.       Let's start with the differences, which are mostly centered around the Central tendency area of the things that were tested. The mean, median, and mode are all different by 10 each, and while the mode is not there since I couldn't figure out how to calc...

Week 2 Assignment - myMean

         My assignment is to evaluate the unction  myMean . The assignment contains the following data: 6, 18, 14, 22, 27, 17, 22, 20, 22  > assignment2<- c(6,18,14,22,27,17,22,20,22)    This line of code assigns the set of values in brackets to the variable Assignment 2, creating a vector. This variable could be set to a different name if I wanted to set it as "boing" > myMean <- function(assignment2) {return(sum(assignment2)/length(assignment2))} This line of code sets myMean as a function that can run assinment2 numbers and then also divides the sum of assinmehents2's values and the amount of numbers in it.     The result is [1] 18.66667             In conclusion, it is making a shorthand for a longer expression by allowing you to refer to it like this: myMean(assignment2).