Regression Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

Two Types of Hypothesis Types

A
  • One sample Test
  • Two sample Test
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What does a One sample Test determine?

A

A one-sample test determines whether or not a population parameter, like a mean or proportion, is equal to a specific value

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What does a Two Sample Test determine?

A

A two-sample test determines whether or not two population parameters, such as two means or two proportions, are equal to each other

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Steps for performing a hypothesis test

A
  1. state the null hypothesis and the alternative hypothesis
  2. choose a significance level
  3. find the p-value
  4. reject or fail to reject the null hypothesis.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Null hypothesis

A
  • is a statement that is assumed to be true unless there’s convincing evidence to the contrary.
  • assumes that your observed data occurs by chance
  • There is no effect in the population.
  • Symbols: Equality =, ≤, ≥
  • Phrases: no effect, no difference, no relationship, or no change

H0: μ = 300 (the mean weight of all produced granola bags is equal to 300 grams)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Alternative hypothesis

A

is a statement that contradicts the null hypothesis, and is accepted as true only if there’s convincing evidence for it.

  • There is an effect in the population.
  • Symbols: ≠, <, >
  • Phrases: an effect, a difference, a relationship, a change

Ha: μ ≠ 300 (the mean weight of all produced granola bags is not equal to 300 grams)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

significance level (α)

A
  • significance level (α), represents the probability of making a Type I error.
  • A significance level of five percent means you are willing to accept a five percent chance you are wrong when you reject the null hypothesis.
  • typically use 5%
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

P-value

A
  • P-value refers to the probability of observing results as or more extreme than those observed when the null hypothesis is true.
  • lower p-value means there is stronger evidence for the alternative hypothesis
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

When to reject or fail to reject the null hypothesis?

A
  • If your p-value is less than your significance level, you reject the null hypothesis.
  • If your p-value is greater than your significance level, you fail to reject the null hypothesis.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

2 Types of Hypothesis Test Errors

A
  • Type I error
  • Type II error.
  • A statistically significant result cannot prove with 100 percent certainty that our hypothesis is correct.
  • Because hypothesis testing is based on probability, there’s always a chance of drawing the wrong conclusion about the null hypothesis.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Type I error

A
  • false positive
  • occurs when you reject a null hypothesis that is actually true.
  • In other words, you conclude that your result is statistically significant when in fact it occurred by chance.
  • you incorrectly conclude that the medicine relieves cold symptoms when it’s actually ineffective.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

The probability of making a Type I error

A

’- significance level (α), represents the probability of making a Type I error.
- α = 5% means you are willing to accept a 5% chance you are wrong when you reject the null hypothesis.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

How to reduce Type 1 Error

A

A significance level of five percent means you are willing to accept a five percent chance you are wrong when you reject the null hypothesis.

To reduce your chance of making a Type I error, choose a lower significance level.
- from 5% to 1%

  • reducing your risk of making a Type I error means you are more likely to make a Type II error, or false negative.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Type II error

A
  • false negative
  • This occurs when you fail to reject a null hypothesis, which is actually false.
  • In other words, you conclude your result occurred by chance when it’s in fact statistically significant.
  • ex. you incorrectly conclude that the medicine is ineffective when it actually relieves cold symptoms.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

differences between the null hypothesis and the alternative hypothesis

A
  • H0: typically assumes that there is no effect in the population, and that your observed data occurs by chance
  • Ha: typically assumes that there is an effect in the population, and that your observed data does not occur by chance and is statistically significant.

Example
- H0: the program had no effect on sales revenue.
- Ha: the program** increased** sales revenue.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

The probability of making a Type II error

A

is called beta (β), and beta is related to the power of a hypothesis test (power = 1- β). Power refers to the likelihood that a test can correctly detect a real effect when there is one.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

How to reduce Type II Error

A
  • by ensuring your test has enough power.
  • In data work, power is usually set at 0.80 or 80%.
  • The higher the statistical power, the lower the probability of making a Type II error.
  • To increase power, you can** increase your sample size** or your significance level.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

4 Outcomes of rejecting or failing to reject H0

A
  • Reject the H0 when it’s actually true (Type I error)
  • Reject the H0 when it’s actually false (Correct)
  • Fail to reject the H0 when it’s actually true (Correct)
  • Fail to reject the H0 when it’s actually false (Type II error)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

Potential risks of Type I errors

A

A Type I error means rejecting a null hypothesis which is actually true. In general, making a Type I error often leads to implementing changes that are unnecessary and ineffective, and which waste valuable time and resources.

For example, if you make a Type I error in your clinical trial, the new medicine will be considered effective even though it’s actually ineffective. Based on this incorrect conclusion, an ineffective medication may be prescribed to a large number of people. Plus, other treatment options may be rejected in favor of the new medicine.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

Potential risks of Type II errors

A

A Type II error means failing to reject a null hypothesis which is actually false. In general, making a Type II error may result in missed opportunities for positive change and innovation. A lack of innovation can be costly for people and organizations.

For example, if you make a Type II error in your clinical trial, the new medicine will be considered ineffective even though it’s actually effective. This means that a useful medication may not reach a large number of people who could benefit from it.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

One-Sample Hypothesis Test Applications

A
  • A data professional might conduct a one-sample hypothesis test to determine if a company’s average sales revenue is equal to a target value,
  • a medical treatment’s average rate of success is equal to a set goal,
  • or a stock portfolio’s average rate of return is equal to a market benchmark.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

One Sample Z-Test Assumptions

A
  • the data is a random sample of a normally-distributed population,
  • the population standard deviation is known.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

Test Statistics

A

The p-value is calculated from what’s called a test statistic.

In hypothesis testing, the test statistic is a value that shows how closely your observed data matches the distribution expected under the null hypothesis, so if you assume the null hypothesis is true and the mean delivery time is 40 minutes, the data for delivery times follows a normal distribution. The test statistic shows where your observed data, a sample mean delivery time of 38 minutes, will fall on that distribution.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

Z-Score (Hypothesis Test)

A
  • Since you’re conducting a z-test, your test statistic is a z-score.
  • Recall that a z-score is a measure of how many standard deviations below or above the population mean a data point is.
  • Z-scores tell you where your values lie on a normal distribution.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

Z-Score: Left-Tailed Test

A
  • For a normal distribution, the probability of getting a value less than your z-score of -2.82 is calculated by taking the area under the curve to the left of the z-score.
  • This is called a left-tailed test because yourp-value is located on the left tail of the distribution.
  • The area under this part of the curve is the same as your p-value
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

Z-Score: RIght-Tailed Test

A
  • For a normal distribution, the probability of getting a value less than your z-score of 2.82 is calculated by taking the area under the curve to the left of the z-score.
  • This is called a right-tailed test because yourp-value is located on the right tail of the distribution.
  • The area under this part of the curve is the same as your p-value
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

Z-Score: P-value

A

0.0023 or 0.23 %

This means there’s a 0.23 percent probability that the difference in mean delivery time would be 2 minutes or greater if the null hypothesis is true. In other words, it’s highly unlikely that their difference is due to chance.

28
Q

Two-sample Hypothesis T-tests: Means

A
  • A two-sample test determines whether or not two means are equal to each other.
  • the standard approach for comparing two means.
29
Q

Two-sample t-test for means assumptions

A
  • The two samples are independent of each other.
  • For each sample, the data is drawn randomly from a normally distributed population.
  • The population standard deviation is unknown.
30
Q

t-distribution

A

The graph of the t-distribution has a bell shape that is similar to the standard normal distribution, but the t-distribution has bigger tails than the standard normal distribution does.

The bigger tails indicate the higher frequency of outliers that come with small dataset.

As the sample size increases, the t-distribution approaches the normal distribution.

31
Q

Two-tailed test

A

Because you’re interested in values in both directions, either less than or greater than your test statistic, your p-value is the probability of getting a value less than the T-score -1.2508 or greater than the T-score positive 1.2508.

Your p-value corresponds to the area under the curve on both the left tail and the right tail of the distribution.

32
Q

Left vs Right vs Two Tailed Test and Alt. Hypothesis

A
  • In a left-tailed test, Ha < 30 (mean weight of the penguin population is less than 30 lbs.
  • In a right-tailed test, Ha < 30 (mean weight of the penguin population is greater than 30 lbs.)
  • In a two-tailed test, Ha ≠ 30 (mean weight of the penguin population is not equal to 30 lbs.
33
Q

A/B testing

A

compare two versions of something to find out which version performs better.

34
Q

A/B Testing Application

A

Data professionals use A/B testing to help business leaders
- optimize product performance,
- improve customer experience, and
- grow their online business.

35
Q

A/B test: 3 main features

A
  1. Test design
  2. Sampling
  3. Hypothesis testing
36
Q

A/B test: Test design

A

In a randomized controlled experiment, test subjects are randomly assigned to a control group and a treatment group.

  • The treatment is the new change being tested in the experiment.
  • The control group is not exposed to the treatment.
  • The treatment group is exposed to the treatment.
  • The difference in metric values between the two groups measures the treatment’s effect on the test subjects.
37
Q

A/B test: Sampling

A

Random selection helps you create a representative sample that reflects the characteristics of the overall user population.

  • choose a appropriate sample sizefor your A/B test.
  • The larger the sample size = more precise the results, and the more likely you’ll get results that are statistically significant when there is a difference between group A and group B.
  • However, can be expensive and time-consuming.
38
Q

A/B test: Hypothesis testing

A
  • H0: There is no difference in average revenue per user between A and B
  • Ha: There is a difference in average revenue per user between A and B
39
Q

Experimental Design

A

refers to planning an experiment in order to collect data to answer your research question.

40
Q

Experimental Design Steps

A
  1. Define your variables
  2. Formulate your hypothesis
  3. Assign test subjects to treatment and control groups
41
Q

Experimental Design: Define your variables

A

defining the independent and dependent variables

example
- independent variable is the medicine—the cause you want to investigate.
- *dependent variable** is recovery time—the effect you want to measure.

42
Q

independent variable

A

refers to the cause you’re interested in investigating. A researcher changes or controls the independent variable to determine how it affects the dependent variable.

43
Q

dependent variable

A

refers to the effect you’re interested in measuring. “Dependent” means its value is influenced by the independent variable.

44
Q

Experimental Design: Formulate your hypothesis

A
  • H0 is that the medicine has no effect.
  • Ha is that the medicine is effective.
45
Q

Experimental Design: Assign test subjects to treatment and control groups

A

In a randomized controlled experiment, test subjects are randomly assigned to a control group and a treatment group.

  • The treatment is the new change being tested in the experiment.
  • The control group is not exposed to the treatment.
  • The treatment group is exposed to the treatment.
  • The difference in metric values between the two groups measures the treatment’s effect on the test subjects.
46
Q

Randomization

A

helps control the effect of other factors on the outcome of an experiment.

47
Q

2 methods of Randomization

A
  1. completely randomized design
  2. randomized block design
48
Q

completely randomized design

A

test subjects are assigned to treatment and control groups using a random process.

49
Q

completely randomized design CONs

A
  1. Relativelylow accuracy due to lack of restrictions which allows environmental variation (nuisance) to enter experimental error.
  2. Not suited for** large numbers** of treatments because a relatively large amount of experimental material is needed which increases the variation.
50
Q

randomized block design

A

minimize the impact of known nuisance factors.

  • Blocking is the arranging of test subjects in groups, or blocks, that are similar to one another.
  • then randomly assign the subjects within each block to treatment and control groups.
51
Q

Hypothesis Test vs Chi-squared Test

A

hypothesis tests are used to see significant differences among groups.

Chi-squared tests are used to determine whether one or more observed categorical variables follow expected distribution(s)

52
Q

Chi-squared tests

A

used to determine whether one or more observed categorical variables follow expected distribution(s).

53
Q

2 main Chi-Squared Tests

A
  1. Goodness of Fit
  2. Test for Independence
54
Q

Chi-squared tests: Goodness of fit versus independence

A

is a hypothesis test that determines whether an observed categorical variable follows an expected distribution.

H0: The week you observed follows your boss’s expectations that the number of website visitors is equal on any given day

Ha: The week you observed does not follow your boss’s expectations; therefore, the number of website visitors is not equal across the days of the week

55
Q

Chi-Squared Tests Steps

A
  1. Identify the Null and Alternative Hypotheses
  2. Calculate the chi-square test statistic (X2)
  3. Calculate the p-value
  4. Make a conclusion
56
Q

The Chi-Squared Test for Independence

A

is a hypothesis test that determines whether or not two categorical variables are associatedwith each other.

H0: The type of device a website visitor uses to visit the website is independent of the visitor’s membership status.

Ha: The type of device a website visitor uses to visit the website is not independent of the visitor’s membership status.

57
Q

ANOVA testing

A

statistical technique used to check if the means of two or more groups are significantly different from each other
- compares continuous variables with categorical variables
can be applied to the results we get from a linear regression.

58
Q

Regression & ANOVA Relationship

A

Regression: IF and by HOW MUCH variables impact an outcome variable

ANOVA: Pairwise comparisions. Understance nuance among elements that fueld regression analysis

59
Q

One-way ANOVA

A

Compares the means of one continuous dependent variable based on three or more groups of one categorical variable.

60
Q

Two-way ANOVA

A

Compares the means of one continuous dependent variable based on three or more groups of two categorical variables.

61
Q

Post hoc test:

A

Performs a pairwise comparison between all available groups while controlling for the error rate.

  • If we run multiple hypothesis tests all with a 95% confidence level, there is an increasing chance of a false positive.
  • The post hoc test will control for this, and allows us to run many hypothesis tests while remaining confident with the accuracy of the results.
62
Q

ANOVA vs Post-hoc results

A

Since the p-value is very small and we
ANOVA tells us we can reject the null hypothesis that the mean price is the same for all diamond color grades but it doesnt specify which color and which price is different.

post hoc test is useful because the one-way ANOVA does not tell us which colors are associated with different prices. The post hoc test will give us more information.

63
Q

One-way ANOVA

A
  1. Build a simple linear regression model
  2. Check the results
  3. Run one-way ANOVA
64
Q

ANCOVA

A

is a statistical technique that test the difference of means between three or more groups while controlling for the effects of covariance.

65
Q

Covariates

A
  • Covariates are the variables that are not of direct interest to the question we are trying to address.
  • By taking the covariates into account, we can better isolate the relationship between the categorical variable we are interested in and the Y variable.
  • This allows us to draw more accurate conclusions about the relationships among the variables.
66
Q

MANOVA

A
  • manova or multi variant analysis of variance
  • that compares how two, or more continuous outcome variables, vary according to categorical independent variables.

The independent variable must be categorical

and the outcome variables must be continuous