2024-02-02
library(plotly)
## Loading required package: ggplot2
##
## Attaching package: 'plotly'
## The following object is masked from 'package:ggplot2':
##
## last_plot
## The following object is masked from 'package:stats':
##
## filter
## The following object is masked from 'package:graphics':
##
## layout
library(dplyr)
##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
What is Astrostatistics
- Astrostatistics help astrophysicists focus on the analysis and interpretation of data collected in the field of astronomy. Data from astronomy can sometimes have interference and noise and using statistical methods they are able to make sense of the data.
Lightcurves
- Light curves are used in astornomy to for many things such as exoplanet detection, supernovae identification, gamma ray burst detection, etc…
Exoplanet radii with random sample
- In reality, the frequency of detecting significantly larger exoplanets with respect to earth is much greater as the transit method is able to detect the variability of stellar brightness much easier.

Stellar Magnitude
- Stellar magnitude is described as the brightness of the star, the higher the number the fainter the star.

Code for Stellar Magnitude
{r} stars_data <- data.frame(magnitude = rnorm(100), temperature = rnorm(100, mean = 6000, sd = 1000)) stellar_scatter_plot <- ggplot(stars_data, aes(x = temperature, y = magnitude)) + geom_point(color = "darkblue") + labs(title = "Stellar Magnitudes vs. Temperature", x = "Temperature (K)", y = "Stellar Magnitude") print(stellar_scatter_plot)
Math for Light Curve
\[
sin(2*pi*time)
\] - This is the meat behind the light curve. The time variable is set as a vector from 0 to 10 with 100 evenly spaced units. The 2*pi sets the osciallation of the sine wave which is a semi representation of periodic variation in light emitted by celestial objects.
Math for Stellar Magnitude
\[
m-M = 5*log(d/10)
\] - This equation determines stellar magnitude which is a measure of the brightness of a star or celestial body measured at a standard distance from Earth. To determine the temperature of the star, the equation \[T = 4piR^2*\sigma*T^4\] is used. For this, you must know stellar luminsoity and radius. You are now able to plot Stellar Magnitude vs. Temperature.