MVA Office Hours

Office Hours and Homework Questions

  • Office hours are run until there are no more questions, but Jay Verkuilen is aware that Carla is planning to join later (00:00:05).
  • The discussion starts with a question about homework, specifically about a summit number 3 and the first patient (00:00:49).
  • Jay Verkuilen clarifies that it doesn’t matter which patient is chosen, as long as the concept is understood and the calculations are correct (00:01:07).
  • The goal of the exercises is to understand the differences and explain the concepts, not to pick the exact right or wrong place (00:01:18).
  • Jay Verkuilen emphasizes that he cares more about conceptual understanding than minor errors, such as picking the wrong patient number (00:01:31).
  • As a grader, Jay Verkuilen is more concerned with understanding the concepts than with minor arithmetic mistakes (00:01:53).
  • He provides examples of what he considers important, such as recognizing impossible calculations, like a negative variance or a probability greater than one (00:01:58).
  • Jay Verkuilen also mentions that he doesn’t care about minor errors, such as adding impossible matrices, as long as the student recognizes the mistake (00:02:33).
  • Aisha King confirms that she used person number 16 for group N, which was the first case value for the second group (00:03:35).
  • Jay Verkuilen reiterates that what he cares about is comparing the person to their own group, not the specific group or patient number chosen (00:04:02).
  • The purpose of a task is to compare a person to their own group, and it’s essential to be clear about what was selected for the comparison (00:04:18).
  • When working on tasks, it’s crucial to include notes and explanations of the steps taken, especially when calculations are involved (00:04:50).

Geometric Data Analysis and Calculations

  • A book titled “Real inference in Geometric data analysis” is mentioned as a resource for learning about geometric data analysis (00:05:16).
  • The math in this book is described as “quite heavy,” indicating that it may be challenging to understand (00:05:52).
  • When working on calculations, it’s essential to check for conceptual errors, such as distances that cannot be negative (00:06:24).
  • If a mistake is made, it’s better to acknowledge it and indicate that something went wrong, rather than trying to hide it (00:07:06).
  • A personal anecdote is shared about a graduate school exam, where a mistake was made, but the professor was understanding because the error was acknowledged and the rest of the work was correct (00:07:16).
  • In real-world applications, calculations are often double-checked to catch errors, but under time pressure, it’s not always possible to do so (00:08:01).
  • The importance of acknowledging and learning from mistakes is emphasized, rather than trying to hide them (00:08:10).
  • Jay Verkuilen advises to pick a group and be consistent with it, as the specific group chosen does not matter, and he only cares about consistency (00:08:57).

Matrix Operations and Calculations

  • Carla O asks if there is a way to compute the inverses by hand, and Jay Verkuilen explains that for 2x2 matrices, it is super easy, but for larger matrices, Gaussian elimination can be used (00:09:42).
  • Jay Verkuilen is fine with students using Gaussian elimination programs like WolframAlpha, as long as they understand what is happening and can determine if the inverse is defined or not (00:10:06).
  • Jay Verkuilen emphasizes that some matrices will invert, while others will not, and it is essential to understand why (00:10:19).
  • For 3x3 matrices, Jay Verkuilen suggests using Gaussian elimination, and there are many online resources available to help with this process (00:11:19).
  • If a matrix does not invert, Jay Verkuilen advises showing that it goes to a row of zeros, which is enough to demonstrate that the inverse does not exist (00:12:25).
  • Once a row of zeros is reached, no further manipulation is possible, as multiplying and adding will not produce any new information (00:12:37).
  • Aisha King confirms that there are two different 3x3 matrices, one of which inverts, and the other does not (00:12:17).
  • The calculation of matrices can be complex and difficult to understand, but working them out by hand can provide a clearer understanding of the process (00:12:59).
  • It is acceptable to work out matrices by hand and then scan or take a picture of the work to submit, as long as the work is legible and easy to understand (00:13:19).
  • The main thing is to make sure the work is put together in a clear and organized manner, such as in a Word document (00:13:42).
  • Adam is having trouble formatting matrices in Google Docs and is considering doing them by hand instead (00:14:04).
  • Jay suggests that Adam use an equation plugin for Google Docs, but notes that he himself hardly ever uses it (00:14:21).
  • Adam decides to do the matrices by hand and Jay is okay with that, as long as he can understand the work (00:14:40).
  • Jay suggests using a fixed-point font to prevent the matrices from becoming distorted (00:14:50).
  • Aisha notes that Google Docs can be difficult to use for formatting, especially for math problems (00:15:46).
  • Jay agrees that Google Docs and Word can be rough for math, especially for complex problems like matrices (00:15:59).
  • Aisha notes that it can take a long time to format math problems correctly on the computer, and it’s often faster to just do them by hand (00:16:21).

Using R and Wolfram Alpha for Matrix Operations

  • A student learned LaTeX while taking a class and received feedback from Jay Verkuilen, who provided suggestions for improvement (00:16:36).
  • Carla O asked about the matrix of X in R code, where x1, x2, and x3 should not be equal to 0, and Jay Verkuilen explained that values can be added to achieve this (00:17:12).
  • Carla O shared her approach to solving the problem by hand, adding values to x1, x2, and x3, and Jay Verkuilen explained that R can be used to test cases, but understanding the formula by hand is necessary (00:17:47).
  • Carla O asked if there’s a way to create a general variable in R, and Jay Verkuilen suggested using WolframAlpha (00:18:23).
  • Jay Verkuilen demonstrated how to use Wolfram Alpha to solve the problem, and Adam mentioned the use of symbolics in the process (00:19:05).
  • Jay Verkuilen shared an example of a 3x3 matrix and a 3x1 matrix, explaining how to calculate the result of their multiplication, breaking down the process step by step (00:19:50).
  • Jay Verkuilen emphasized the importance of understanding the pattern in the calculation, suggesting the use of a simpler example, such as a 1 0 0 1 1 0 1 1 matrix, to illustrate the concept (00:20:59).
  • Using software can be helpful in seeing patterns, but explaining the underlying concept is also important, as the question asks for an explanation of the matrix operation (00:21:13).
  • The given matrix is an example of a cumulative sum, where it takes the first observation, then the first and second observations, and so on, adding each subsequent observation to the previous sum (00:21:39).
  • Jay Verkuilen demonstrates how to use a matrix to perform a cumulative sum, using a specific example with the numbers 1, 0, 0, and 1 (00:22:32).
  • To determine the resulting vector, Jay Verkuilen checks if the product is defined and notes that the resulting vector will be 3 by 1 (00:23:05).
  • Multiplying by the matrix C picks up the first two observations, resulting in the sum of x1 and x2, then x2 and x3, and finally x3 and x4 (00:23:36).
  • Jay Verkuilen explains that different matrices perform different operations, such as summing or breaking down a matrix into simple components, as seen in singular value decomposition and eigenvalues (00:24:07).
  • Jay Verkuilen offers to show how to use WolframAlpha to perform matrix operations, but Adam mentions that he has already figured it out (00:24:37).

Cumulative Sum and Matrix Operations

  • Carla O asks about the different types of matrices described in the textbook and how the cumulative sum operation relates to these descriptions (00:24:54).
  • Jay Verkuilen explains that the cumulative sum is a description of what the matrix does to vectors, and that this terminology may not be used in the textbook (00:24:56).
  • A method for creating a matrix involves thinking about adding or subtracting specific numbers to achieve the desired outcome, such as adding 2 to certain numbers and then subtracting the middle number (00:25:26).
  • An example of this method is demonstrated with a matrix containing negative and positive numbers, which can be reordered to simplify the calculation (00:25:54).
  • The reordered matrix can be used to calculate specific values, such as 2x2 minus x1 minus x3, 2x3 minus x1 minus x2, and 2x1 minus x2 minus x3 (00:26:20).
  • The original matrix can be rewritten in a more natural order, such as 2 minus 1 minus 1 minus 1, 2 minus 1 minus 1 minus 1, 2 (00:27:00).
  • This method is similar to the centering matrix, which involves highlighting one value and subtracting the rest (00:27:15).
  • The centering matrix is a common tool used in statistics, particularly in contrast analysis, which is used to compare groups in a one-way Analysis of variance (00:27:24).
  • Contrast analysis involves comparing a control group to multiple treatment groups, and can be used to identify specific differences between groups (00:28:06).

Software for Matrix Operations (Mathematica and Wolfram Alpha)

  • Jay Verkuilen mentions that he has access to a software called Alpha, which has a pro version that offers additional features such as showing work and checking calculations (00:28:59).
  • To access the pro version, users need to log in with their CUNY Graduate Center credentials, not their City University of New York credentials (00:29:31).
  • Wolfram Mathematica is a software that can perform various tasks, including matrix operations, and is similar to WolframAlpha, which is also capable of performing these tasks (00:30:06).
  • To create a matrix in Mathematica, curly braces are used to embed vectors, and the software can then perform various operations such as calculating the transpose, trace, determinant, and inverse of the matrix (00:30:22).
  • Mathematica can also calculate eigenvalues and eigenvectors, and perform diagonalization, although this is not a topic that will be covered in the class (00:31:07).
  • Wolfram Alpha has a slightly different lingo than Mathematica, but both software programs are built off the same original program and can perform similar tasks (00:31:23).
  • When using Wolfram Alpha, it is sometimes necessary to correct the dimensions of the vectors, as the software may flip them (00:31:45).
  • Wolfram Alpha functions on vectors and can calculate various quantities such as vector length, but may not always get the dimensions correct (00:32:31).
  • Logging in with a CUNY Graduate Center credential may provide access to additional features, but it is unclear what the exact login process is, with some suggestions including single sign-on and City University of New York 1st login (00:33:11).
  • The discussion concludes with an offer to share a screen to demonstrate the software’s capabilities (00:34:35).
  • WolframAlpha is a useful tool that allows users to paste links into teams, emails, or other platforms, and the link will run and work as intended (00:34:47).

Future Homework Assignments and Learning from Mistakes

  • In future homework assignments, there will be less hand calculation and more focus on larger concepts that cannot be done by hand (00:35:34).
  • It is helpful to see patterns and cumulative sums, and trying test cases is a good habit to get into when working on problems (00:36:03).
  • Making mistakes is a natural part of the learning process, and it is often through mistakes that we learn and understand concepts better (00:36:45).
  • Aisha King spent an hour trying to figure out why her hand calculation of mileage distance was different from the function, and eventually realized it was because the function gives the square (00:36:23).
  • Aisha King is currently attending a HIV prevention conference in Lima, Peru, which is related to her research (00:37:44).
  • Jay Verkuilen’s first research experience was working on HIV modeling, and he notes that it is still an important area of research (00:38:06).

Data Visualization and Homework Discussion

  • When looking at descriptive statistics, Jay Verkuilen usually looks at mean, standard deviation, and correlations by group, and remembers showing a group scatter plot in class (00:38:37).
  • A discussion is taking place about data visualization, specifically about showing each group broken out, with Jay Verkuilen mentioning that he used a scatterplot matrix from the car package to overlay all groups at once (00:39:31).
  • Jay Verkuilen suggests that Aisha King can take his code and replicate it, and also encourages her to add or modify it as needed, as he hasn’t done every possible analysis (00:39:58).
  • Adam mentions that he hasn’t finished the homework add-ons yet, as he is a last-minute person and needs to finalize his work (00:40:40).
  • Jay Verkuilen mentions that the homework assignments are long, but they are where students learn to apply the concepts, and that the next topics to be covered will be singular value decomposition, Principal component analysis, correspondence analysis, and multi-dimensional scaling (00:41:00).
  • Jay Verkuilen also mentions that the homework assignments are all about the same in terms of length and difficulty, and that he tends to do three big assignments per class, but is open to trying other approaches (00:41:21).
  • Aisha King expresses her dislike for having assignments every week, and Jay Verkuilen responds that he used to cut assignments into smaller bits when classes were in person, but now prefers doing bigger ones due to online grading (00:41:53).
  • Jay Verkuilen asks if anyone has any last questions, and mentions that he will post the video in case anyone else has questions (00:42:37).
  • The deadline for the homework assignment has been extended by a week, but Jay Verkuilen doesn’t remember the new deadline, which is stated in the syllabus (00:42:59).

Homework Deadlines and Flexibility

  • The deadline for an assignment is discussed, with Jay Verkuilen initially unsure of the exact date, but later confirming it is the current day, and Aisha King aiming to submit her work by Thursday before class (00:43:14).
  • Jay Verkuilen mentions that he usually doesn’t start grading assignments immediately and is flexible with deadlines, but having assignments sprawl into the next semester would be a huge problem (00:43:35).
  • He emphasizes that he would rather have students do the assignment well and learn from it than meet a specific deadline, and that he builds in flexibility for his students (00:44:22).
  • Aisha King shares that she had a similar experience with Professor Waika, who was one of Jay Verkuilen’s students, and had a similar policy of prioritizing quality over meeting a specific deadline (00:44:33).
  • Jay Verkuilen explains that he gives his students as much flexibility as he can, but notes that there are limits to this flexibility, particularly at the end of the semester (00:44:57).
  • Aisha King asks about formatting for the assignment output, specifically whether it’s okay to screenshot it and put the code in an appendix, and Jay Verkuilen suggests copying and pasting the output into Word and changing the font to Courier (00:45:28).
  • Jay Verkuilen notes that copying and pasting the output is easier than screenshotting it, and that he doesn’t have a preference for either method, as long as the output is clear and readable (00:45:52).

Formatting and Markdown

  • Carla O has a question about formatting, specifically asking if markdown is allowed, as it can hide code, but Jay Verkuilen mentions that markdown users do use it and he has no problem with it, as long as the try function is used to handle errors (00:47:19).
  • Jay Verkuilen explains that using the try function allows R to execute code and throw an error if it fails, without stopping the rest of the code from running (00:47:43).
  • Carla O considers scanning her handwritten work and making a PDF, which Jay Verkuilen finds acceptable, as long as the work is in the right order and not squished together (00:48:06).
  • Jay Verkuilen emphasizes that he wants students to focus on doing the work, rather than getting hung up on formatting, and notes that future assignments will be mostly computer-based, making formatting less of an issue (00:48:21).
  • Jay Verkuilen mentions that homeworks 2 and 3 are mostly computer-based, and that everything from this assignment on will be all code (00:48:55).
  • Jay Verkuilen clarifies that he does not require students to use markdown, and that some people may have had experiences in other classes where markdown was mandatory, but he does not demand it (00:49:32).

Intentional Errors and Learning from Mistakes

  • Jay Verkuilen explains that he likes to give assignments with intentional errors to help students learn to troubleshoot and figure out what went wrong (00:50:06).
  • Jay Verkuilen believes that learning to deal with errors is an important part of the learning process, as things often go wrong in real-world applications (00:50:22).
  • The goal is to experience computer failures and understand how to come back from them in a low-stakes environment, rather than during a critical moment such as the night before a conference session (00:50:50).
  • This approach allows individuals to learn from their mistakes and develop problem-solving skills, which is essential for real-world applications where failures are inevitable (00:51:30).
  • Having experienced failures in a controlled environment helps individuals to better handle them when they occur in real-world situations, such as when working on a project or preparing for a conference (00:51:45).
  • Reviewers may also point out mistakes, and it’s essential to understand and learn from these criticisms, even if they are sometimes incorrect (00:52:30).
  • Aisha King shares a real-life example of a friend who accidentally filtered out 2% of their data without realizing it, highlighting the importance of being prepared for unexpected errors (00:52:12).

Food and Travel Discussion

  • The conversation shifts to a discussion about food, with Aisha King mentioning that Peruvian food is excellent, and the avocados are particularly good (00:53:08).
  • The group also talks about the quality of avocados in New York City, with Jay Verkuilen commenting that they are often hard and not very good (00:53:23).
  • Carla O asks if there is a recurring theme of discussing food at late hours, referencing a previous class where they also talked about food (00:53:44).
  • The conversation concludes with Adam describing a trip to an amazing place with nice people, and Aisha King inviting Jay Verkuilen to visit, although she notes that Lima is not particularly known for its natural beauty (00:54:06).