Uploaded by POtato Cjeese

Intro to R and Statistics

advertisement
‭ ecap:‬
R
‭Tree Diagram‬
‭ he first branch separates the primary event into two (or more) possible outcomes‬
T
‭The second sets of branches are the outcomes for each of the conditions. They are conditional‬
‭probabilities.‬
‭Joint probabilities are at the end of the branches.‬
‭ Random Variable (RV) is a Quantitative (Q) variable whose value depends upon some‬
A
‭random event or on a random outcome of an experiment (i.e. chance). Use Capital Letter: X‬
‭Denote the Probability of a certain outcome as P(X = x)‬
‭ andom Experiments:‬
R
‭A probability distribution is a table (or a formula) giving the possible values (or intervals) of a RV‬
‭and. The graph of a probability distribution is called a probability histogram‬
‭ robability Distribution Characteristics:‬
P
‭A distribution of a probability is true if the x's are mutually exclusive and exhaustive, each value‬
‭of X is between 0 and 1, and sum of probabilities is 1‬
‭Mean of a Random Variable =‬‭Σ‬‭xi p(x))‬
‭The mean is a weighted average of the xi, The values are weighted by their probabilities‬
‭Standard Deviation of a Random Variable‬
‭ ean of a RV = Expected Value of X‬
M
‭The mean of a Random Variable X is also called the Expected Value of X , denoted E(X)‬
‭The EV (or mean) of x describes its long-run average outcome. The larger the number of trials,‬
‭the closer the average will be to μ‬
‭ trial is a Bernoulli trial if there are only 2 possible outcomes from each trial.‬
A
‭Called “Success” and “Failure”, trials are independent. The probability of getting a “Success”‬
‭remains constant from trial to trial‬
‭A common example is flip a coin.‬
‭X will be a Binomial Variable if it results from repeated Bernoulli trials of an experiment‬
‭ ormula‬
F
‭n=number of bernoulli trials‬
‭The Random Variable X = # of ‘successes‬
‭ ote: the n in (1-P)^n-x should be 1: so (1-P)^1-x‬
N
‭n is how many total combinations or total number of trails there are and x is number of trails that‬
‭are successes‬
‭ t Boston Logan Airport, 84% of the flights in Sep 2023 arrived on time (or early).‬
A
‭1. What is the random variable of interest?‬
‭What number of flights arrived on time‬
‭2. Why is it a binomial variable?‬
‭Because for each individual flight there are two options: arrive on time or don’t arrive on time,‬
‭and assuming that arriving or not doesn’t affect other flights.‬
‭3. What is the probability of ‘success’?‬
‭As the question says 84% of the time flights are arriving.‬
‭4. What is the probability flights arrival on time 12 times in a row‬
‭P(X=12) = .84^12 =0.123410307‬
‭5. What is the probability that exactly 10 were on time?‬
‭So what about the second half the *(1-p)^n-x‬
‭ e didn’t use it because the question didn’t ask for a delay. So like 3 arrivals then one delay‬
W
‭would use it.‬
‭But now we can: P(X=10)=(0.84^10)*(1-0.84)^(1-0.84)= 0.130452395‬
‭6. Would it be unusual for fewer than three of the flights to be on time?‬
‭ ind prob of 0 success, 1 success, 2, success, 3 success, add them and if its very small then it‬
F
‭could be unusual‬
‭Mean and SD of a Binomial Random Variable‬
I‭f 84% of all flights are on time,‬
‭7. Find the Expected number (mean number) of on-time flights in a sample of 12 flights‬
‭12*.84=10.08‬
‭8. Find the standard deviation‬
‭Use formula above‬
‭ requency Distribution and Probability distribution and Sampling Distribution: • Show how‬
F
‭observed or theoretical data behave‬
‭Histograms(bars) and Smooth curve can be discrete or continuous‬
‭ ontinuous Distributions‬
C
‭Often described by a formula rather than a table‬
‭Probability graph is a continuous curve which we call the Probability Density Function (PDF)‬
‭ roperties: The total area under the curve is equal to 100% or 1‬
P
‭The probability of something occurring is the portion of the area under the entire curve‬
‭That ism the probability is equal to the proportion of the population that falls within any given‬
‭interval‬
‭ s you can see while it is a bit skewed: you can tell that it still follows the bell curve somewhat‬
A
‭or a Normal Distribution. Under certain conditions‬
‭Conditions:‬
‭Symmetric • Bell-shaped • Mean = Median = Mode • Extends indefinitely in both directions,‬
‭approaching, but never touching, the horizontal axis • Completely described by its mean and‬
‭standard deviation‬
‭ ny Normal Distribution can be‬
A
‭transformed into the Standard Normal‬
‭Distribution by standardizing the‬
‭observations into a z-score!‬
Download