## Midpoint formula: (Mx, My) where Mx=(x2-x1)/2, My=(y2-y1)

Be creative in providing instruction and ask user to provide input for x1, x2, y1, y2. You also need to create button to perform calculation.

A simple form for inputs and calculations would be created, but another program already exists that provides background on the midpoint calculation. The plugin can be purchased for $29.99, or you can link to a very nice already built calculator.

The requestor of custom programming, using on page, on site programming should be swayed to link to calculators outside their site, to find already written embeddable code, or to purchase already created and tested code because ‘recreating’ common functionality is not good time spent, besides it’s highschool mathematics and any time programming is requested on page or on-site, more information about how the data is used and stored should be considered before fulfilling the job or programming request because data is not just useful for on screen presentation and money is better spent on ‘applications’ that use the calculations for good purpose, not just on screen results. Those are offered free:

https://www.omnicalculator.com/math/midpoint

## Statistics Calculators – Omni

## The Mean & Median

Finding the Mean and Median

## What is mean and median

The mean, median, and mode are three of the most common measures of the **center of a distribution** (whether it’s a binomial distribution, Poisson distribution or any other distribution), also called the **central tendency**.

**Mean, median, and mode definitions:**

- The
**mean**is the average of all numbers. - The
**median**is the “middle” number, where there is an equal number of values less than and greater than the median.

## How to find the mean

When people talk about **the mean**, they are usually referring to the **arithmetic mean**, which is the average of all numbers in the dataset.

The formula for the mean (arithmetic) is:

`μ = ∑X / N`

where:

**μ**represents the population mean (you can use the letter**M**to represent the mean of a sample instead, but the calculation is the same),**∑X**represents the sum of all numbers,**N**is the total number of numbers.

For example, you would calculate the mean for the numbers **2, 5, 6, 8, 9** as follows:

`μ = (2 + 5 + 6 + 8 + 9) / 5`

`μ = 30 / 5`

`μ = 6`

**Try it yourself**

Enter your numbers into the mean median mode calculator and select **mean** in the **steps to show** option to see the calculation steps for the mean.

Although the arithmetic mean is the most common mean calculation, you can learn about other types of means by checking out the geometric mean calculator, the harmonic mean calculator, and the weighted mean calculator.

You might also be interested in knowing that mean plays an important role in calculating the dispersion of data.

## Median definition

The **median** is defined as the “middle” number in a sorted list of numbers. There is an equal amount of numbers above and below the median.

When determining how to calculate median, we need to know if the dataset is **even** or **odd**:

- If there is an
**odd**number of numbers, such as the dataset**4, 6, 9**, the median is simply the middle number, in this case,**6**. - If there is an
**even**number of numbers, such as the dataset**3, 6, 7, 9**, the median is the average of the two middlemost numbers, in this case,**6**and**7**, so the median is**6.5**.

## How to find the median

As an example, let’s find the median of the set of numbers **2, 7, 4, 8, 6, 9**:

**1. Sort the numbers from least to most**

Our list, from least to more, is:

**2, 4, 6, 7, 8, 9**

Note that sorting from most to least is also acceptable.

**2. Determine the “center” of the numbers**

You can probably see at a glance that the middle two numbers are **6** and **7**, but, in a large dataset, it will help to know how many numbers there are.

To find out the “center” of the dataset, use the equation:

`center = (N + 1) / 2`

Since there are 5 numbers, the center is calculated as follows:

`center = (5 + 1) / 2 = 3.5`

Since the “middle” number is **3.5**, the median will be the average of the 3^{rd} and 4^{th} numbers in our list.

**3. Find the median**

Counting from left to right (or right to left), we find that the 3rd and 4th numbers are **6** and **7**:

2, 4, **6, 7**, 8, 9

The median is the average of 6 and 7. Therefore, the median is **6.5**.

**The Variance**

## What is the definition of variance?

**Variance** is a measure of the **variability of the values** in a dataset.

A **high** variance indicates that a dataset is **more spread out**.

A **low** variance indicates that the data is more tightly clustered around the mean, or **less spread out**.

Learning how to calculate variance is a key step in finding the standard deviation. These two measures are the foundation to calculating relative standard deviation, and confidence interval!

## Example calculation

Let’s calculate variance of eight students’ quiz scores: **5, 5, 5, 7, 8, 8, 9, 9**. Follow these steps:

**1. Calculate the mean**

To calculate the mean (x̄), divide the sum of all numbers by the number of data points:

`x̄ = (5 + 5 + 5 + 7 + 8 + 8 + 9 + 9) / 8`

`x̄ = 7`

**2. Calculate the difference from the mean, and the squared differences from the mean**

Now that we know the mean is **7**, we will calculate the difference from the mean using the formula:

`x`

_{i} - x̄

The first point has a value of **5**, so the difference from the mean is **5 – 7 = -2**.

The squared difference (or “squared deviation”) from the mean is simply the square of the previous step:

`(x`

_{i} - x̄)^{2}

so, the squared deviation would be:

`(5 - 7)`

^{2} = (-2)^{2} = 4

We show the calculated squared deviations from the mean for all quiz scores in the table below. The “Deviation from the mean” column is the score minus 7, and the “Squared deviation” column is the previous column squared.