# What is type i error

## What is Type I Error?

A Type I error is when you incorrectly reject the null hypothesis. That is, you think there is a difference when there isn’t. You might think that a new drug works when it really doesn’t.

### The definition of Type I Error

In statistics, a Type I error is when a researcher rejects a null hypothesis when it is true. The null hypothesis is the default assumption that nothing has changed or happened. A Type I error would be falsely concluding that something did happen when it really didn’t. For example, imagine you’re testing a new medication to see if it lowers blood pressure. The null hypothesis would be that the medication has no effect on blood pressure. If you test the medication and find that it does in fact lower blood pressure, you’ve committed a Type I error. You mistakenly concluded that the medication worked when it really didn’t.

Type I errors are also known as false positives and can be incredibly costly. Imagine you’re a drug company and you develop a new cancer drug. You test the drug on 100 people with cancer and the drug appears to work wonderfully, curing 95% of them. You put the drug on the market and it sells like hotcakes. But then, further studies find that the drug only works 10% of the time and causes severe side effects in some people. The drug is recalled, lawsuits are filed, and your company goes bankrupt. You committed a Type I error by releasing a faulty product onto the market.

Type I errors are often due to chance or to poor study design. They can be minimized by careful planning and analysis, but they can never be completely eliminated.

### The consequences of Type I Error

In statistics, a Type I error is when the null hypothesis (H0) is true, but is rejected. A Type II error is when the null hypothesis is false, but is not rejected.

Type I Error
If the null hypothesis is true, and you reject it, you have committed a Type I error. The consequences of a Type I error are that you may make decisions that are not supported by data, and may lead to bad outcomes.

Type II Error
If the null hypothesis is false, and you do not reject it, you have committed a Type II error. The consequences of a Type II error are that you may miss opportunities to make decisions that are supported by data, and may lead to bad outcomes.

## How to avoid Type I Error

### The importance of statistical power

Statistical power is the probability that a given statistical test will reject the null hypothesis when the alternative hypothesis is actually true. Power is inversely related to Type II Error; the more powerful a statistical test, the less likely it is to make a Type II Error.

Type I Error, also known as a false positive, occurs when the null hypothesis is rejected even though it is true. For example, imagine that you are testing the null hypothesis that there is no difference between two groups, when in fact there is a small but significant difference. If your statistical test has low power, you are more likely to make a Type I Error.

Type II Error, also known as a false negative, occurs when the null hypothesis is not rejected even though it is false. For example, imagine that you are testing the null hypothesis that there is no difference between two groups, when in fact there is a large difference. If your statistical test has low power, you are more likely to make a Type II Error.

Power can be increased by using larger sample sizes, increasing the magnitude of the difference between the groups being compared, or using more sensitive statistical tests.

### How to calculate statistical power

Statistical power is a measure of how likely a test is to detect an effect, if there is an effect present. Power is affected by several factors, including the size of the effect and the variability of the data.

To calculate statistical power, you need to know:
-The planned sample size
-The level of significance (alpha)
-The anticipated effect size

You can use a power calculator to help determine the sample size you need for your study.

### Ways to increase statistical power

Type I Error is when you falsely reject the null hypothesis. In other words, you think there’s a difference when there isn’t.

Type II Error is when you falsely retain the null hypothesis. You think there isn’t a difference, but there is.

So how do you avoid these errors? One way to reduce both type I and type II error rates is to increase the statistical power of your test. To do this, you need to increase one of three things:
-The sample size
-The effect size
-The significance level

It’s usually most practical to increase the sample size because it doesn’t change the design of your study. If you want to increase the effect size, you need to change your research question or your methodology. If you want to increase the significance level, you need more subjects or more measurements per subject.