Posts

Showing posts from September, 2025

Assignment #5: Matrix Algebra in R

Image
 1.) det(A) works because "A" which is 10x10 is a square so when det(A) is returned it is 0 meaning it is singular. That is why solve(A) does not work, it cannot invert a singular matrix. A zero determinant means the matrix is singular, so it does not have an inverse.  2.) Operations on B fail because "B" is 10x100, which is not a square, and determinants and inverses are defined by square matrices, hence why it did not work. A matrix has an inverse if two things are true its a square where it has the same rows and columns and its determinant is ≠ 0 3.) Since A has no inverse and B is not a square, both can still be used in a matrix multiplication with "%%". In numeric stability, if a determinant is close to 0 which is an example of A from solve() it can be unreliable due to rounding error.

Assignment #4: Visualizing and Interpreting Hospital Patient Data

Image
1.) In the first assessment, the low group has a much larger range of patients with higher blood pressure compared to the high group, which has a smaller range, and the blood pressure is not as high. In the second assessment, the low group is more compact compared to the high group, which has the most range from these tests. For the final test, the low group has more patients with lower blood pressure, as the range does not extend far. In contrast, the high group has higher blood pressure. 2.) As you can see in the histogram, there is an outlier all the way to the left. The blood pressure has a wide range, between 40 and 170, with 205 as the outlier. 3.) Potential clinical implications can be seen by watching out for outliers, as they are not common, so they may need more urgent help compared to those with regular blood pressure. This dataset is very simplified and does not provide in-depth information, which is highly important in the real world. 4.) Handling NA changed the averag...

Module #3 Assignment #3 Analyzing 2016 data "Poll" Data in R

Image
  1.) Looking at the candidates' (Names) key patterns, I noticed that CBS was shown more throughout the candidates. Donald also has the highest poll numbers. Ted also has a mix of CBS and ABC, but more CBS.  2.) Using made-up data does have its limitations. This can introduce bias and distortion, as evident in the data. CBS is more used compared to ABC.  3.) In a real analysis, I would collect data by creating a survey and inserting polls in there. I could include poll questions that ask about candidate preferences or approval ratings, then record and organize the responses.

Module #2 Assignment Importing Dara Function Evaluation in R

Image
  1.) There was an error because "assignment" was not found. 2.) The function failed. The first line in R, assignment2, is a vector holding all the numbers. In the third line of code, "assignment" should be replaced with "assignment2", since that’s the vector we made earlier. We also want the length of "someData", but "someData" was never created, so that should also be changed to "assignment2". Lastly, we want to find the mean of assignment2, so we run myMean(assignment2)