When I encounter a new function, I usually graph it to gain intuition about how the function transforms its inputs. Recently, I needed to use the Rayleigh quotient function, which is connected to the estimation of eigenvalues and eigenvectors for symmetric matrices. It has been several years since I last thought about the Rayleigh quotient, so this article shows how to visualize the function in SAS for 2 x 2 and 3 x 3 symmetric matrices. What is the Rayleigh quotient? The Rayleigh quotien...| The DO Loop
The new school year had barely started when I got a call from a friend who is an elementary school principal. She told me that every morning she announces the names of students who are celebrating a birthday. "One student noticed that we've already had two days on which no student has a birthday," she said. "With 900 students in the school, she thought that at least one birthday should be announced every day. She wants to know more about the math for this situation." What a great question! Th...| The DO Loop
In probability and statistics, special numbers are used to compute probabilities by counting the number of ways certain events can occur.| The DO Loop
SAS provides procedures to fit common probability distributions to sample data. You can use PROC UNIVARIATE in Base SAS or PROC SEVERITY in SAS/ETS software to estimate the distribution parameters for approximately 20 common distributions, including normal, lognormal, beta, gamma, and Weibull. Since there are infinitely many distributions, you may eventually need to fit a distribution that SAS does not natively support. There are three often-used methods for fitting the parameters of a distri...| The DO Loop
Many common probability distributions contain terms that increase or decrease quickly, such as the exponential function and factorials. The numerical evaluation of these quantities can result in numerical overflow (or underflow). This is why we often work on the logarithmic scale: on the log-scale, the numerical computations for equations such as the log-likelihood function are more stable. This article demonstrates a different trick that is useful for computing a sum of exponential terms. I ...| The DO Loop
Newton's method was in the news this week.| The DO Loop