For this project, we’re going to observe how the intensity of a bulb changes over time. We are going to create a scatter plot that compares the bulb intensity as a percent of the original lumen to time in hours. The scatter plot will measure the intensity or brightness of a bulb at 44 different points of time, ranging from 0-5000 hours.

To load the package that contained the data set for light bulbs into the current R session, I had to run this code.

library(data4led)

I started by running function that would produce data from a random bulb from the bulb data set, and I was assigned a seed number of 92239. I ran the code below which displays data from 6 different time points of that randomly selected bulb.

bulb <- led_bulb(1,seed = 92239)
head(bulb)
##       id hours intensity normalized_intensity percent_intensity
## 5897 135     0  803.4310            1.0000000         100.00000
## 5898 135    26  802.2730            0.9985586          99.85586
## 5899 135    91  807.8311            1.0054766         100.54766
## 5900 135   192  807.7975            1.0054348         100.54348
## 5901 135   293  799.8234            0.9955096          99.55096
## 5902 135   403  805.1320            1.0021171         100.21171

This data provides the following information about the bulb:

  1. The identification number for each randomly selected bulb (id)

  2. the amount of hours the bulb has been turned on (hours)

  3. The amount of input given by the lumen of the bulb (intensity)

  4. The lumen at a specific time divided by the lumen of that bulb at time 0. (normalized_intensity)

  5. normalized intensity times 100 to give it as a percent (percent_intensity)

\(~\)
\(~\)
\(~\)

I created a scatter plot with the data set and time in hours was the x axis and, “perccent_intensity” was the y axis. I labeled the x-axis, “time (hours)” and the y-axis as “bulb intensity (normalized to initial intensity)”. This is the code I ran to create that, and below that is the scatter plot.

plot(bulb$hours,bulb$percent_intensity,pch=19,xlab = 'time (hours)', ylab = 'bulb intensity (normalized to initial intensity)')

The Correlation isn’t very strong, but from this sample size we can generally observe as time increases, the percentage of intensity increases as well. In between 4000 and 5000 hours since the bulb has been turned on, the intensity fluctuates quite a bit as ig goes from high to low pretty quickly.