Professional Documents
Culture Documents
Miniproject Smur Temperature
Miniproject Smur Temperature
Collect daily temperature data for a specific location. Calculate the mean,
median, and mode of the temperatures. Determine the probability of
having a temperature above or below a certain threshold.
Section: 20BCS34-A
Chandigarh University
JUNE 2024
ABSTRACT
This project delves into a comprehensive analysis of daily temperature data for a
particular region. By collecting data over a designated timeframe, the project aims to
extract meaningful insights into the temperature patterns of the region.
Data Acquisition: Daily temperature data will be meticulously gathered from reliable
sources such as weather websites, Application Programming Interfaces (APIs), or local
weather stations.
Descriptive Statistical Analysis: Essential statistical measures like mean, median, and
mode will be calculated to characterize the central tendency and dispersion of the
temperature data. This will provide a clear picture of the 'typical' temperature and its
variability within the dataset.
Temperature Distribution Analysis: To understand the likelihood of experiencing
specific temperature ranges, the project will determine the probability of
temperatures exceeding or falling below a user-defined threshold.
By employing these analytical techniques, the project will provide valuable insights
into the typical temperature range of a specific region, the extent of temperature
fluctuations, and the probability of encountering temperatures above or below a
specific value. This information can be beneficial for various purposes, such as
understanding the local climate, planning outdoor activities, or informing agricultural
decisions.
Aim : Collect daily temperature data for a specific location. Calculate the mean,
median, and mode of the temperatures. Determine the probability of having a
temperature above or below a certain threshold.
Description:
The project aims to collecting daily temperature data for a specific location and
computing statistical measures such as mean, median, and mode. This process
provides insights into the central tendencies of the temperature variations and Create
a line chart to visualize temperature trends
Algorithms:
2. Median:
3. Mode:
The mode is the value that appears most frequently in the dataset.
# Install package
install.packages("tidyverse")
# Statistical Analysis
mean_temperature <- mean(temperature_data$AvgTemperature)
median_temperature <- median(temperature_data$AvgTemperature)
mode_temperature <-
as.numeric(names(sort(table(temperature_data$AvgTemperature), decreasing =
TRUE)[1]))
# Probability Calculation
threshold <- 25
probability_above_threshold <- sum(temperature_data$AvgTemperature >
threshold) / nrow(temperature_data)
probability_below_threshold <- 1 - probability_above_threshold
# Summary
cat(paste("Mean Average Temperature: ", mean_temperature, "\n"))
cat(paste("Median Average Temperature: ", median_temperature, "\n"))
cat(paste("Mode Average Temperature: ", mode_temperature, "\n"))
cat(paste("Probability (Above ", threshold, "): ", probability_above_threshold,
"\n"))
cat(paste("Probability (Below ", threshold, "): ", probability_below_threshold,
"\n"))
OUTPUT:
DATASET:
GRAPHICAL REPRESENTATION:
References:
[1]. Frost, J. (n.d.). Measures of Variability: Range, Interquartile Range, Variance, and Standard
Deviation. Statistics By Jim.
[2]. Bhandari, P. (2020). Variability | Calculating Range, IQR, Variance, Standard Deviation. Scribbr.
[3]. Statology. (2021). How to Find Quartiles Using Mean & Standard Deviation.
[4]. R Tutorial - W3Schools