Skip to main content

Posts

Showing posts from September, 2019

Random variable(s) & Probability Distribution(s)

Assignment # 5 1) Variance and Standard Deviation of a Discrete Random Variable We were given two probability distribution tables and asked to find the variance and standard distribution of each. Table #1 X p(x) 0 0.50 1 0.20 2 0.15 3 0.10 Table #2 x P(x) 1 0.10 3 0.20 5 0.60 4 0.20   R Studio Coding  Table #1 is represented by x and Table #2 is represented by y. x <- c(0.5, 0.2, 0.15, 010) y <- c(0.10, 0.2, 0.6, 0.2) Then simply find the variance and standard deviation of each vector by using the var and sd functions. varianceX <- var(x) standardX <- sd(x) varianceY <- var(y) standardY <- sd(y) You can print the results: varianceX varianceY standardX standardY R reports that the variance ...

Probability Theory

A. Based on Table 1 What is the probability of: B B1 A 10 20 A1 20 40 A1 . Event A A2 . Event B? A3.  Event A or B A4 . P(A or B) = P(A) + P(B) B. Applying Bayes' Theorem  Jane is getting married tomorrow, at an outdoor ceremony in the desert. In recent years, it has rained only 5 days each year. Unfortunately, the weatherman has predicted rain for tomorrow. When it actually rains, the weatherman correctly forecasts rain 90% of the time. When it doesn't rain, he incorrectly forecasts rain 10% of the time. What is the probability that it will rain on the day of Jane's wedding?  Solution: The sample space is defined by two mutually-exclusive events - it rains or it does not rain. Additionally, a third event occurs when the weatherman predicts rain. Notation for these events appears below. Event A1. It rains on Jane's wedding. Event A2. It does not rain on Marie's wedding. Event B. The weatherman predicts rain. In terms of probabilities, we know t...

Bivariate Analysis

1.  the association between boarding screeners and  security violations has sample size of n=20 with a Mean of  boarding screeners   =  261.2 and  Mean  security violations   =   252.5.  boarding <-c(287, 243,237,227,247,264,247,247,251,254,277,303,285,254,280,264,261,292,248,253) secruity<- c(271,261,230,225,236,252,243,247,238,274,256,305,273,234,261,265,241,292,228,252) cor.test(boarding, secruity) Pearson's product-moment correlation data:  boarding and secruity t = 6.5033, df = 18, p-value = 4.088e-06 alternative hypothesis: true correlation is not equal to 0 95 percent confidence interval:  0.6276251 0.9339189 sample estimates:       cor  0.8375321  plot(boarding, secruity)

Descriptive Statistics

In this week assignment i was task to compute the mean, mode, median,  range, interquartile, variance, standard deviation for two  set data with sample size of n=7.  from what observes the Y data have higher mean and median than the X data. the mode for both X and Y are numeric which mean both data doesn't have a mode because of the sample size. the variance of both data are the same occurrences  of deviation. the quantile for Y data is much higher than X data. below is my code for the X and Y data.  R Code