Posts

Showing posts from September, 2023

Calculating Variance and Standard Deviation in Sample

  Calculating Variance and Standard Deviation in Sample  A. a. To compute the mean of the population, you sum up all the values and divide by the number of values: Population Mean = (8 + 14 + 16 + 10 + 11) / 5 = 59 / 5 = 11.8 b. To select a random sample of size 2 from the population, you can use the `sample` function in R: ``` population <- c(8, 14, 16, 10, 11) sample_size <- 2 sample_data <- sample(population, size = sample_size) ``` The sample in this case can be (14, 11) c. To compute the mean and standard deviation of your sample, the following code can be used: ``` sample_mean <- mean(sample_data) sample_std_dev <- sd(sample_data) ``` For the sample (14, 11), the sample mean is 12.5, and the sample standard deviation is approximately 2.12. d. Population Mean: 11.8 (calculated in part a) Sample Mean: 12.5 (calculated in part c) Population Standard Deviation: Approximately 2.24 (calculated using sd(population)) Sample Standard Deviation: Approximately 2.12 (...

Hypothesis Testing & Correlation Analysis

Amanda Hidalgo  LIS 4273: Adv Stats & Analytics  Hypothesis Testing & Correlation Analysis Part 1   A. State the null and alternative hypothesis:    Null Hypothesis (H0): The machine is producing cookies according to the manufacturer's specifications, i.e., the population mean (μ) breaking strength is 70 pounds.    Alternative Hypothesis (Ha): The machine is not producing cookies according to the manufacturer's specifications, i.e., the population mean (μ) breaking strength is not equal to 70 pounds. B. Is there evidence that the machine is not meeting the manufacturer's specifications for average strength? Use a 0.05 level of significance:    To determine if there is evidence that the machine is not meeting the manufacturer's specifications, we need to perform a hypothesis test using the sample data.    We have:    - Sample mean (x̄) = 69.1 pounds    - Population standard deviation (σ) = 3.5 pounds ...

Probability Theory

Probability Theory   Calculating the Probabilities A1. P(Event A) = P(A) = 10 / (10 + 20) = 10 / 30 = 1/3 A2. P(Event B) = P(B) = 20 / (10 + 20) = 20 / 30 = 2/3 A3. P(Event A or B) = P(A) + P(B) = 1/3 + 2/3 = 3/3 = 1 (Because the events A and B are mutually exclusive, so the probability of either A or B happening is the sum of their individual probabilities.) B. Applying Bayes' Theorem: P(A1) = Probability of rain on Jane's wedding day = 5/365 P(A2) = Probability of no rain on Jane's wedding day = 360/365 P(B | A1) = Probability of the weatherman predicting rain when it actually rains = 0.9 P(B | A2) = Probability of the weatherman predicting rain when it doesn't rain = 0.1 P(A1 | B), the probability it will rain on the day of Jane's wedding given a forecast for rain by the weatherman using Bayes' Theorem: P(A1 | B) = P(A1) * P(B | A1) / [P(A1) * P(B | A1) + P(A2) * P(B | A2)] P(A1 | B) = (5/365) * (0.9) / [(5/365) * (0.9) + (360/365) * (0.1)] P(A1 | B) ≈ 0.0130...