<jupyter_start><jupyter_text>Instructor Turn: Activity 1 Mean Median Mode  PricesThe best measure for summarizing the price of electronics is the **median**, 425.The mean is a poor choice, because the extreme prices of 4 and 2932 skew the average. The mode is also insufficient, as all prices occur exactly once. Bootcamp AgesThe best measures for summarizing the ages of Bootcamp students are the **mean**, 36, and the **median**, also 36.The mean is a good choice, because the lowest and highest ages are not substantially higher or lower than the average. The median is also a good choice, as it returns the same result, and would not change if there _were_ extreme ages in the data set. Children's Party AgesThe best measure for summarizing the ages of children and chaperones at a birthday party is the **mode**.The mean, 19, is a poor choice, because it characterizes the average attendee as a teenager, when no one at the party is older than 6 or younger than 35.The median, 6, works well in this case. _But_, it is fragile: If we had just one more 34 year old parent, the median would be 34, _not_ 6. Geography Test ScoresThe best measure for summarizing this test score data is the **mean**, since the lowest and highest scores are close to the average. The median is also a good choice.The mode is not particularly informative, because all test scores occur exactly once. Quantum Mechanics Test ScoresFinally, the best measures for summarizing this test score data are the **median** and the **mode**.The median, 58, gives a fairly good description of how the test went for the class. Some students scored very low (scores of 8 and 13); one scored very high (98); and the rest were somewhere in the middle, which the median detects.In this case, the mean, 45, would reveal similar information — that the class mostly did poorly — but does not give the best picture as to what scores students actually ended up with.  Dependencies from the stats.py provided```pythonfrom collections import Counterdef mean(arr):    """    Calculates the mean of a list of numbers.    Usage: mean([3, 4, 5, 6, 7])  5 """    return sum(arr) / len(arr)def median(arr):    """Calculates the median of a list of numbers.    Usage: median([3, 4, 5, 6, 7])  5"""    arr.sort()    if len(arr) % 2 == 1:        return arr[len(arr) // 2]    else:        mid1 = len(arr) // 2        mid2 = mid1 - 1        return (arr[mid1] + arr[mid2])/2def mode(arr):    """Calculates the mode of a list of numbers as a tuple containing the    most frequently occurring element in the first slot, and the number    of times it occurs in the second. If there are multiple modes,    returns only one.    Usage: mode([1, 1, 2, 3])  (1, 2)"""    return Counter(arr).most_common(1)[0]def multi_mode(arr):    """Calculates the mode of a list of numbers as an array of tuples    containing the most frequently occurring elements. Each tuple    contains the item itself in the first slot, and the number of times    it occurs in the second. If there are multiple modes, returns all.    Usage: mode([1, 1, 2, 2, 3])  [(1, 2), (2, 2)]"""     Count items    counter = Counter(arr)     Get number of times most frequently occurring item appears    freq = counter.most_common(1)[0][1]     Return list of tuples containing most frequently occurring elements    return [(key, val) for key, val in counter.items() if val == freq]```<jupyter_code># Dependencies
# this is imported from the stats.py file already created it is not a built in python function 
from stats import mean, median, mode, multi_mode
# Prices of random electronics at Best Buy
prices = [4, 425, 984, 2932, 49]
print(f"Median Price: {median(prices)}")
# Ages of students in bootcamp
bootcamp_classroom_ages = [27, 35, 42, 52, 36, 28]
print(f"Mean Bootcamp Age: {mean(bootcamp_classroom_ages)}")
print(f"Median Bootcamp Age: {median(bootcamp_classroom_ages)}")
# Ages of children and parents at child's party# Ages  
birthday_party_ages = [6, 5, 6, 6, 35, 42, 34]
print(f"Mode of Birthday Party Ages: {mean(birthday_party_ages)}")
# Test score from a 2nd grade geography test
geo_grades = [87, 89, 91, 93, 95]
print(f"Mean of Geography Test Scores: {mean(geo_grades)}")
# Test scores from a graduate quantum mechanics midterm
quantum_grades = [63, 63, 98, 13, 58, 13, 8]
print(f"Median of QM Grades: {median(quantum_grades)}")
print(f"Modes of QM Grades: {multi_mode(quantum_grades)}")
print(mean(quantum_grades))<jupyter_output>Median of QM Grades: 58
Modes of QM Grades: [(13, 2), (63, 2)]
45.142857142857146<jupyter_text>Instructors Turn Activity 2 Variance and Z Score* Consider these two lists: [3, 4, 5, 6, 7] and [-1525, -200, 5, 745, 1000].    * For both of these data sets, the mean and median are 5 — but they are obviously different!    * Data sets are different in how spread out the data is, something that the mean, median, and mode cannot capture.* Variance of a data set is a single number that describes how "far apart" its values are. * The average of the squared differences from the Mean.![alt text](http://www.statisticshowto.com/wp-content/uploads/2009/08/usual.png) Example [17, 15, 23, 7, 9, 13 ]  Step 1: Calculate mean mean: 14 Step 2:  Subtract the mean from each data point.  x1 - x:  (17 - 14)   =  3 x2 - x: (15 - 14)    =  1 x3 - x: (23 - 14)    =  9 x4 - x: (7 - 14)      = -7 x5 - x: (9 - 14)      = -5 x6 - x: (13 - 14)    = -1 Step 3: Square each result (x1 - x )^2 = (17 - 14)^2 = 3^2 = 9 (x2 - x )^2 = (15 - 14)^2 = 1^2 = 1 (x3 - x )^2 = (23 - 14)^2 = 9^2 = 81 (x4 - x )^2 = (7 - 14)^2 = -7^2 = 49 (x5 - x )^2 = (9 - 14)^2 = (-5^2) = 25 (x6 - x )^2 = (13 - 14)^2 = -1^2 = 1 Step 4: Find the sum of the squared values.  9 + 1 + 81 + 49 + 25 + 1 = 166 Step 5: Divide by n - 1, where n is the number of data points. 166 / (7 - 1) = 33.2<jupyter_code>import math
# Step 1 
data = [17, 15, 23, 7, 9, 13]
mean = sum(data) / len(data)
print(mean)

# Step 2
step2 = []
for d in data:
    step2.append(d - mean)
print(step2)

# Step 3
step3 = []
for d in step2:
    step3.append(d ** 2)
print(step3)

# Step 4
sum(step3)

# Step 5 
variance = sum(step3)/(len(step3) - 1)
print(variance)


# Standard Deviation
math.sqrt(variance)<jupyter_output>14.0
[3.0, 1.0, 9.0, -7.0, -5.0, -1.0]
[9.0, 1.0, 81.0, 49.0, 25.0, 1.0]
33.2<jupyter_text>Dependencies from spread.py provided ```python from math import sqrt this is imported from the stats.py from statistics import meandef variance(arr):    _mean = mean(arr)    normalized = [x - _mean for x in arr]    squares = [x ** 2 for x in normalized]    return sum(squares) / len(arr)def standard_deviation(arr):    return sqrt(variance(arr))def z_score(arr, index):    return (arr[index] - mean(arr)) / standard_deviation(arr)def z_scores(arr):    return [z_score(arr, ind) for ind in range(0, len(arr))]def zipped_z_scores(arr):    return list(zip(arr, z_scores(arr)))sample = [-2, -1, 0, 1, 2]print(variance(sample))print(standard_deviation(sample))print(zipped_z_scores(sample))```<jupyter_code># Dependencies
from spread import variance, standard_deviation, zipped_z_scores
def summarize(title, arr):
    print(f"Summarizing {title}")
    print(f"Variance: {variance(arr)}")
    print(f"Standard Deviation: {standard_deviation(arr)}")
    print(f"Z-Scores: {zipped_z_scores(arr)}")
    print("======")
# Prices of random electronics at Best Buy
prices = [4, 425, 984, 2932, 49]
summarize("Prices", prices)
# Ages of students in bootcamp
bootcamp_classroom_ages = [27, 35, 42, 52, 36, 28]
summarize("Bootcamp Ages", bootcamp_classroom_ages)
# Ages of children and parents at child's party
birthday_party_ages = [6, 5, 6, 6, 35, 34, 42]
summarize("Birthday Party Ages", birthday_party_ages)
# Test score from a 2nd grade geography test
geo_grades = [87, 89, 91, 93, 95]
summarize("Geograph Grades", geo_grades)
# Test scores from a graduate quantum mechanics midterm
quantum_grades = [63, 63, 98, 13, 58, 13, 8]
summarize("Quantum Mechanics Grades", quantum_grades)
# Prices
summarize("Prices", [30, 31, 31, 32, 32, 40, 41, 41, 1000])<jupyter_output>Summarizing Prices
Variance: 92039.55555555556
Standard Deviation: 303.3802161571442
Z-Scores: [(30, -0.36917371019996403), (31, -0.36587751635889293), (31, -0.36587751635889293), (32, -0.3625813225178218), (32, -0.3625813225178218), (40, -0.33621177178925293), (41, -0.33291557794818183), (41, -0.33291557794818183), (1000, 2.82813431563901)]
======<jupyter_text>Instructors Turn Activity 3 Quartiles and Outliers Outliers are one of those statistical issues that everyone knows about, but most people aren’t sure how to deal with.  Most parametric statistics, like means, standard deviations, and correlations, and every statistic based on these, are highly sensitive to outliers.  And since the assumptions of common statistical procedures, like linear regression and ANOVA, are also based on these statistics, outliers can really mess up your analysis.Despite all this, as much as you’d like to, it is NOT acceptable to drop an observation just because it is an outlier.  They can be legitimate observations and are sometimes the most interesting ones.  It’s important to investigate the nature of the outlier before deciding.  * If the outliers _create_ trends that wouldn't exist without them, you _should_ drop them.    ![In this plot, the outlier creates a trend, and we should ignore it.](http://www.theanalysisfactor.com/images/graph-3.gif)* The outliers do _not_ change your results. In this case, it is okay to drop them, but it is best to make a note of having done so.  ![In this plot, the outlier does not change the line we draw.](http://www.theanalysisfactor.com/images/graph-1.gif)* If your outlier _does_ change your results, you _should not_ drop it.  ![In this plot, the outlier affects the line we draw, and so is significant.](http://www.theanalysisfactor.com/images/graph-2.gif)* The above plots are from an article on removing outliers on [The Analysis Factor](http://www.theanalysisfactor.com/outliers-to-drop-or-not-to-drop/).while useful, these essentially graphical guidelines are a little "fuzzy".* There are multiple ways to remove outliers from data sets that rely on "hard numbers".  * The simplest of these relies on removing data that is "far away" from the median.  * To quantify this, we need to understand the idea of **quartiles**.* **quartiles** are a way to divide our data into well-defined regions.  * The median is the midpoint of a data set — it divides the list in two.* Think of everything above the median and everything below the median as two separate data sets.* The median of the upper list is called the **upper quartile**, and the median of the lower list is called the **lower quartile**.* To remove outliers is to throw away anything _above_ the upper quartile, and everything _below_ the lower quartile.<jupyter_code># Dependencies
import numpy as np

numbers = [3, 3, 4, 5, 5, 6, 7, 7, 8, 8, 9]

median = 6
lower_quartile = 4
upper_quartile = 8

# Dependencies
import matplotlib.pyplot as plt
from stats import median
import numpy as np

# Find the median
mid = median(numbers)
print(mid)

# Use numpy to create quartiles
q1 = np.percentile(numbers, 25)
q3 = np.percentile(numbers,75)

# Print the quartiles
print(f"Q1 is {q1}")
print(f"Q3 is {q3}")


# Create box plot# Create 
plt.boxplot(numbers, showmeans=True)
plt.grid()
plt.show()<jupyter_output>6
Q1 is 4.5
Q3 is 7.5<jupyter_text>Students Turn Activity 4 Quartiles and Outliers Instructions* Take a look at the list in the in the `samples` notebook. Identify the median, upper quartile, and lower quartiles by hand.* Use code to determine the lower and upper quartiles and be sure to account for both odd and even lengths of a data set.  * Reference [https://www.wikihow.com/Calculate-Outliers](https://www.wikihow.com/Calculate-Outliers) to choose a method for best handling this.  * Use [numpy.percentile](https://het.as.utexas.edu/HET/Software/Numpy/reference/generated/numpy.percentile.html) to help with the calculations.* The difference between the upper and lower quartile is called the **interquartile range**, or IQR.  * Like the standard deviation, the IQR describes how "spread out" the data set is.  * Calculate the IQR for this list.* Determine the outliers  * Lower outliers are points that fall below the result of the equation Q1 - 1.5 * IQR  * Upper outliers are points that above the result of the equation Q3 + 1.5 * IQR  * Finally create a box plot of that data.<jupyter_code># Dependencies
import matplotlib.pyplot as plt
from stats import median
import numpy as np
### Data Points
arr = np.array([2.3, 10.2,11.2, 12.3, 14.5, 14.6, 15.0, 15.1, 19.0, 24.0])
arr
# Find the median
median(arr)
# Use numpy to create quartiles
q1 = np.percentile(arr, 25)
q3 = np.percentile(arr, 75)
# Print the quartiles
print(q1)
print(q3)
# Calculate the interquartile range
iqr = (q3 - q1)
print(iqr)
# Find lower boundary
lower = q1 - 1.5 * iqr
print(lower)
# Find upper boundary
upper = q3 + 1.5 * iqr
print(upper)
# Check for any lower outliers
lower_outliers = []
for x in arr:
    if x < lower:
        lower_outliers.append(x)
print(lower_outliers)
#another way to check for lower outliers
arr[arr < lower]
# Check for any upper outliers
upper_outliers = []
for x in arr:
    if x > upper:
        upper_outliers.append(x)
print(upper_outliers)
# Create box plot
plt.boxplot(arr, showmeans=True)
plt.grid()
plt.show()<jupyter_output><empty_output><jupyter_text>Instructor Turn Activity 5 Standard Error* Establishing measures of trust, do we trust this data?<jupyter_code># Dependencies
from random import random
import matplotlib.pyplot as plt
import numpy as np
from scipy.stats import sem
# "Will you vote for a republican in this election?"
sample_size = 100
samples = [[True if random() < 0.5 else False for x in range(0, sample_size)]
           for y in range(0, 10)] #10 samples
x_axis = np.arange(0, len(samples), 1)
means = [np.mean(s) for s in samples]
standard_errors = [sem(s) for s in samples]
# Setting up the plot
fig, ax = plt.subplots()
print(fig)
print(ax)

ax.errorbar(x_axis, means, standard_errors, fmt="o")

ax.set_xlim(-1, len(samples) + 1)

ax.set_xlabel("Sample Number")
ax.set_ylabel("Proportion of People Voting Republican")
plt.show()<jupyter_output>Figure(432x288)
AxesSubplot(0.125,0.125;0.775x0.755)<jupyter_text>Students Turn Activity 6 Standard Error  Standard Error Instructions* Open the starter file provided, and begin by inspecting the data. Which column contains house prices?* Create a number of samples of house prices.  * If you work with the non `sample.ipynb` file, this step is done for you.* Calculate the means for each sample.* Calculate the standard error for each sample.* Create a plot displaying the means for each sample, with the standard error as error bars.<jupyter_code># Dependencies
from matplotlib import pyplot as plt
import numpy as np
import pandas as pd
# Read and shuffle data
housing_data = pd.read_csv("Resources/housing_data.csv")
housing_data = housing_data.sample(frac=1).reset_index(drop=True)
# Create a bunch of samples, each with div items
div = 20

# Floor division - division that results into whole number adjusted to the left in the number line 
#aka rounds down eliminating decimal. 3//2 = 1, while 3/2 = 1.5
lim = len(housing_data) // div

# Create samples
samples = [housing_data.iloc[(i * div):(i * div + div), 13]
           for i in range(0, lim)]
# Calculate means
means = [np.mean(s) for s in samples]
print(means)
# Calculate standard error on means
standard_errors = [sem(s) for s in samples]
print(standard_errors)
# Plot sample means with error bars
fig, ax = plt.subplots()
print(fig)
print(ax)

x_axis = np.arange(0, len(samples), 1)
print(x_axis)

ax.errorbar(x_axis, means, standard_errors, fmt="o")

ax.set_xlim(-1, len(samples) + 1)

ax.set_xlabel("Sample Number")<jupyter_output>Figure(432x288)
AxesSubplot(0.125,0.125;0.775x0.755)
[ 0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
 24]<jupyter_text>Instructor Turn Activity 7 T TestThe t-test is any statistical hypothesis test in which the test statistic<jupyter_code># Dependencies
import numpy as np
import pandas as pd
from scipy import stats

# Read data
housing_data = pd.read_csv("Resources/housing_data.csv")
housing_data = housing_data.sample(frac=1).reset_index(drop=True)

# Create two samples
s1 = housing_data.iloc[0:19, 13]
s2 = housing_data.iloc[20:40, 13]
# Run T test
(t_stat, p) = stats.ttest_ind(s1, s2, equal_var=False)
print("t-statistics is {}.".format(t_stat))
print("p-value is {}.".format(p))
# Silly sample T test 
# Dependencies
from random import randint
import matplotlib.pyplot as plt
import numpy as np
from scipy.stats import sem, ttest_ind
# Generate
high_prices = [randint(1, 5) * 1000 for x in range(1, 10)]
high_means = np.mean(high_prices)
high_sem = sem(high_prices)

medium_prices = [randint(1, 5) * 500 for x in range(1, 10)]
medium_means = np.mean(medium_prices)
medium_sem = sem(medium_prices)

low_prices = [randint(1, 5) * 200 for x in range(1, 10)]
low_means = np.mean(low_prices)
low_sem = sem(low_prices)

means = [high_means, medium_means, low_means]
sems = [high_sem, medium_sem, low_sem]
labels = ["High Prices", "Medium Prices", "Low Prices"]
# Plot
fig, ax = plt.subplots()

ax.errorbar(np.arange(0, len(means)), means, yerr=sems, fmt="o")

ax.set_xlim(-0.5, 2.5)
ax.set_xticklabels(labels)
ax.set_xticks([0, 1, 2])

ax.set_ylabel("Mean House Price")

plt.show()
# t-test
#use the comma in the variable bc this funciton returns 2 values
(t_stat, p) = ttest_ind(high_prices, low_prices, equal_var=False) 

if p < 0.05:
    print("The differences between the high and low prices are significant.")
else:
    print("The differences between high and low prices are due to chance.")<jupyter_output>The differences between the high and low prices are significant.<jupyter_text>Student Turn Activity 7 - "Student's T-Test" Instructions* Using the data, read both into a Pandas DataFrame.* Print the mean height of WBA players (last column in the DataFrame).* Print the mean height of women sampled.* Using a T-test, determine if difference in sample height means is significant or not and print a message stating the case.* Plot an error bar of the height means and include the standard error of the means.* Using an integer index starting at 0 for the X-axis and the list of means as the Y-axis create a final plot for for mean height.<jupyter_code># Dependencies
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from scipy import stats
from scipy.stats import sem, ttest_ind
# Read in data
general_heights = pd.read_csv("Resources/general_heights.csv")

wba_data = pd.read_csv("Resources/wba_data.csv")
wba_heights = wba_data.iloc[:, -1]
# Run the t-test
(t_stat, p) = stats.ttest_ind(wba_heights, general_heights, equal_var=False)
print("t-statistics is {}.".format(t_stat))
print("p-value is {}.".format(p))
# Report the data
mean_wba = np.mean(wba_heights)
mean_general = np.mean(general_heights["height"])

print("The mean height of WBA players is " + str(mean_wba))
print("The mean height of women players is " + str(mean_general))
print("p = " + str(p).format(p[0]))

if p < 0.05:
    print("The differences between the high and low prices are significant.")
else:
    print("The differences between high and low prices are due to chance.")
# Determine sample means with error bars
means = [mean_wba, mean_general]
sems = [sem(wba_heights), sem(general_heights)]
labels = ["WBA Height", "General Height"]
# Plot mean height of players
fig, ax = plt.subplots()

x_axis = np.arange(0, len(means), 1)
print(x_axis)

ax.errorbar(x_axis, means, yerr=sems, fmt="o")

ax.set_xlim(-0.5, 1.5)
ax.set_xticklabels(labels)
ax.set_xticks([0, 1])<jupyter_output>[0 1]<jupyter_text>Instructor Turn Activity 9 Regression LineRegression analyssis allows us to predict data by making a trend line<jupyter_code># Dependencies
from matplotlib import pyplot as plt
from scipy.stats import linregress
import numpy as np
# Set data
x_axis = np.arange(0, 10, 1)
fake = [1, 2.5, 2.75, 4.25, 5.5, 6, 7.25, 8, 8.75, 9.8]

# Set line
print(linregress(x_axis, fake))
(slope, intercept, _, _, _) = linregress(x_axis, fake) # the _ are blanks, we don't need them
fit = slope * x_axis + intercept #y = mx + b
# Plot data
fig, ax = plt.subplots()

fig.suptitle("Fake Banana Data!", fontsize=16, fontweight="bold")

ax.set_xlim(0, 10)
ax.set_ylim(0, 10)

ax.set_xlabel("Fake Banana Ages (in days)")
ax.set_ylabel("Fake Banana Weights (in Hundres of Kilograms)")

ax.plot(x_axis, fake, linewidth=0, marker='o')
ax.plot(x_axis, fit, 'b--') #pass in the linear regression

plt.show()<jupyter_output><empty_output><jupyter_text>Students Turn Activity 10   Fits and RegressionThis activity gives students an opportunity to use scipy to fit data, and matplotlib to display the fit. Instructions* Import `stats` from the scipy module, along with `numpy` and `pandas`.* Use Pandas to read the `crime_data.csv` provided in the Resources directory.* Use `iloc` to isolate the year column.* Use `iloc` to isolate the total violent crime rate, murder rate, and aggravated assault rate columns.* Use `stats.linregress` to perform a linear regression with the year and violent crime rate columns.* Use `stats.linregress` to perform a linear regression with the year and murder rate columns.* Finally, use `stats.linregress` to perform a linear regression with the year and aggravated assault rate columns.* Use the information returned by `stats.linregress` to create an equation for a line describing each of the linear regressions you performed (see the hint below).  * You should end up with three separate lines.* Use `subplots` to create a figure with subplots that share an x-axis.* Use `plot` to plot each of the lines you created against the year.* Display the plot. Bonus* Use the line you created for the total violent crime rate to determine what the violent crime rate will be in 2019. Hints* See the documentation for [stats.linregress](https://docs.scipy.org/doc/scipy-0.19.0/reference/generated/scipy.stats.linregress.html).* Recall that `stats.linregress` returns a slope, called `m`, and a y-intercept, called `b`. These let you define a line for each fit by simply writing: `fit = m * year + b`, for each linear regression you perform.<jupyter_code># Dependencies# Depen 
from matplotlib import pyplot as plt
from scipy import stats
import numpy as np
import pandas as pd
crime_data = pd.read_csv("Resources/crime_data.csv")
year = crime_data.iloc[:, 0]
crime_data.head()
# Grab violent crime rates# Grab  
violent_crime = crime_data.iloc[:, 3]
# Grab murder rate
murder_rate = crime_data.iloc[:, 5]
# Grab aggravated assault rate
assault_rate = crime_data.iloc[:, 11]
# Plot
#!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! take a look at example to see how to plot 3 at once sharing x
x_axis = np.arange(0, len(crime_data), 1)
print(x_axis)

(vc_slope, vc_intercept, _, _, _) = linregress(x_axis, violent_crime)
fit_violent = vc_slope * x_axis + vc_intercept
(m_slope, m_intercept, _, _, _) = linregress(x_axis, murder_rate)
fit_murder = m_slope * x_axis + m_intercept
(a_slope, a_intercept, _, _, _) = linregress(x_axis, assault_rate)
fit_assault = a_slope * x_axis + a_intercept

print(fit_murder)

fig, ax = plt.subplots()

fig.suptitle("Crime Stats", fontsize=16, fontweight="bold")

ax.set_xlabel("Year")
ax.set_ylabel("Rate")
ax.set_xticks(year)
ax.set_xticklabels(year, rotation=45)

ax.plot(year, violent_crime, linewidth=0, marker='o')
ax.plot(year, fit_violent, 'b--') #pass in the linear regression

ax.plot(year, murder_rate, linewidth=0, marker='o')
ax.plot(year, fit_murder, 'b--')

ax.plot(year, assault_rate, linewidth=0, marker='o')
ax.plot(year, fit_assault, 'b--')

labels = ["Violent Crime", "Murder", "Aggravated Assault"]
ax.legend(labels)

plt.show()
# Print results and save image
year = 2019
print("The violent crime rate in 2019 will be " str(vc_slope * year + vc_intercept))<jupyter_output>The violent crime rate in 2019 will be 262.213759398.
The murder rate in 2019 will be 3.23766917293.
The aggravated assault rate in 2019 will be 72.8703759399.
{'fraction_non_alphanumeric': 0.10754912099276112, 'fraction_numerical': 0.044177869700103414, 'mean_word_length': 4.56409666283084, 'pattern_counts': {'":': 0, '<': 41, '<?xml version=': 0, '>': 37, 'https://': 4, 'lorem ipsum': 0, 'www.': 7, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 1, 'word_list_counts': {'cursed_substrings.json': 5, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '11', 'dir': 'jupyter-structured-clean-dedup', 'id': '393803', 'license': 'MIT', 'n_tokens_mistral': 8751, 'n_tokens_neox': 7765, 'n_words': 3151, 'path': 'Activities Week 5 (matplotlib)/Matplotlib/Day3/Day3.ipynb', 'repo_name': 'lraynes/ClassActivities', 'size': '24175'}