SAS Blogs
blogs.sas.com · Company blog · on HN since 2009
Statisticians at SAS write about statistics, data visualization, SAS programming and Python, with examples such as Mahalanobis distance and Wordle.
What HN saysHN commenters link its posts on random points in a triangle and comparing data distributions, and one shares a SAS project-flow example.
40HN people shared it
23linked it in comments
21stories submitted
28story points
6 months agolast shared
2009people per year2026
Most-shared posts
- 1How men and women rate one another on dating websites (2014)4 people · 4 points · first shared 2016 · discussion on HN
- 2Saturday, March 14, 2015 at 9:26:53 (2015)4 people · 1 points · first shared 2018 · discussion on HN
- 3So, 27 US states are farther north than Canada, eh? (2017)1 people · 2 points · first shared 2020 · 1 comments on HN
- 4Visiting All 30 Major League Baseball Stadiums with Python and SAS Viya1 people · 2 points · first shared 2024 · discussion on HN
- 5Programming the Wordle Game in SAS1 people · 2 points · first shared 2022 · discussion on HN
- 6What is Mahalanobis distance?1 people · 2 points · first shared 2016 · discussion on HN
- 7Using synthetic data to bridge production and development1 people · 2 points · first shared 2025 · discussion on HN
- 8Python Virtual Environments: How to Create and Manage Them1 people · 1 points · first shared 2025 · discussion on HN
- 9That distribution is quite PERT1 people · 1 points · first shared 2023 · discussion on HN
- 10Communications’ innovation killers1 people · 1 points · first shared 2009 · discussion on HN
- 11Can analytics create people who can lead?1 people · 1 points · first shared 2011 · discussion on HN
- 12Goodness-of-fit tests: A cautionary tale for large and small samples1 people · 1 points · first shared 2016 · discussion on HN
- 13Reflecting on 50 years of environmental innovation1 people · 1 points · first shared 2026 · discussion on HN
- 14Student enrollment goals by optimizing your financial aid strategy1 people · 1 points · first shared 2019 · 1 comments on HN
- 15Install VS Code Extensions Offline: Step-by-Step Guide1 people · 1 points · first shared 2025 · 1 comments on HN
What HN people wrote when they linked it
ArtWomb · 2021-12-27
Love comp prob & geom ;) Coolest part is the algo to generate uniform random points bounded within any triangle. I feel like its useful in loads of applications: FEM, monte carlo rendering, etc.
https://blogs.sas.com/content/iml/2020/10/19/random-points-in-triangle…
shagie · 2021-04-26
> Why would we have gone for inferior distribution mediums?
Higher data density, easier to manufacture, portable.
While we often phrase it as "vinyl vs CD" it was more a "tape vs CD". And CD is arguably the better technology there.
In https://www.soundguys.com/vinyl-better-than-streaming-20654/ - there is a chart of "Music sales by media" and you will see that CD - it replaced cassette tapes. Another view of similar data - https://blogs.sas.com/content/graphicallyspeaking/2019/11/11/will-viny…
And even with that, "the best technology wins" isn't always the case. One could make a reasonable argument laser disks were better than video tapes and that Beta was better than VHS.
There are forces beyond the pure technology comparison at work in market dominance.
gtani · 2013-07-02
http://blogs.sas.com/content/iml/2013/06/10/compare-data-distributions… is pretty good about box plots and historgrams (static) and mentions Chambers' visualization book (besides Cleveland's classic text)
SatvikBeri · 2012-03-10
I've been thinking exactly the same thing! My workaround so far has been to use IDEs that have some project management features, and separate the code into separate files.
For example, SAS Enterprise Guide lets you create a project flow like this: http://blogs.sas.com/sasdummy/uploads/egparallel4.png
Note some of the advantages: nice code structure, easy (minor) parallelization, easy code segmentation, ability to examine intermediate data, etc.
I haven't found anything nearly as useful for SQL or more general languages. I would love to see something similar in Clojure/Python.
DiogenesKynikos · 2020-08-26
Industry groups like RIAA obviously massively overstate their case when they claim every pirated mp3 is a lost sale, but Napster et al. did cost the music industry dearly.
If you look at a graph of music sales over time, you can see that the 1990s were a great time for the music business.[1] CDs brought in increasing revenue until the early 2000s, when they precipitously declined. Legal downloads did not make up for the decline in CD sales. Streaming eventually halted the decline, but revenue only stabilized around 2010-2015. In other words, the music industry had a really tough decade.
Of course, the music industry also has itself to blame. CDs were expensive, and who wants to pay $20 for an album that only has one song worth listening to? The industry only embraced downloads and streaming once they had no other choice.
There's a good documentary on this: System Shock.[2]
1. https://blogs.sas.com/content/graphicallyspeaking/files/2019/11/record…
2. https://vimeo.com/336427561
sqrt17 · 2019-03-22
> and your evidence for this is ....?
If we look at other professions (business, law, medicine), we'd find more discrimination but also more women. So discrimination is unlikely as a sole cause.
> Only when the job became prestigious were they pushed out by men.
I clearly recall the days when programming was thought as the domain of the pimple-faced nerds with the thick glasses, way before the brogrammers and other "cool" nerd types came along. Law and medicine are all more prestigious and by your reasoning would have pushed out women even more. So there's something you're missing, and actively missing it even when reality waves its hand to you.
Just one google query gives something more nuanced, such as this: https://austinstartups.com/the-tech-gender-gap-a-2016-progress-report-…
which rightly points out that the percentage of women was rising in CS as much as in medical and law until around 1985. And if you look at the graphic here https://blogs.sas.com/content/sascp/2018/12/05/booming-enrollments-and… you notice that it's not women leaving the field, it's more men coming to CS while the number of women stays the same until they leave in troves at the following bust cycle.
You keep using evidence from the 50s (i.e., 70 years back) as explanation of today's state of affairs, but the evidence points that the 50s don't tell us anything about why we don't have more women programmers. Instead, ask why women got…
bigger_cheese · 2017-03-06
From experience I've found the "core" parts SAS Base, SAS GRAPH, OR, ETS etc are very stable. other parts we have had issues with in the past - Stored processes, LSF for scheduled jobs.
SAS tech support have been pretty good though I believe my workplace pays a lot for the privilege of being able to contact them direct.
One thing I have found is you can usually throw something together in a pretty "hackish" manner but typically there is a better and more optimal method of doing it which will be much more stable. Sometimes it doesn't hurt to ask tech support "What is the recommended method for doing..." Code which abuses the SAS macro language is especially notorious and a good candiate for asking this.
A quick google tells me first class JSON support is pretty new (dec 2016).
http://blogs.sas.com/content/sasdummy/2016/12/02/json-libname-engine-s…
I don't know much about this all the A2A messaging is XML based in my org.
dredmorbius · 2015-06-07
Why do companies seek more information on customers? Read their own fucking marketing collateral.
Companies aren't falling over themselves to grab every last piece of personal data available in order to push their own prices through the floor. Don't be ridiculous.
They're doing it:
⚫ To find prospects who can't see their way out of a bad deal.
⚫ To find prospects who are highly inclined to spend. A wonderful Spanish proverb I discovered recently is "Buy from desperate people, and sell to newlyweds." Find those who absolutely need cash (even at pennies on the dollar) for their belongings, and buy from them. Find those with stars in their eyes, and sell to them. Look at the office furniture market: fire/liquidation sales (buy) and startups (sell).
⚫ To sow market confusion to the point that meaningful distinctions simply cannot be made.
⚫ To upsell, to increase conversions, to tack on additional fees, to tie people into service contracts. All that bullshit.
Aon on Retail and Insurance:
Retailers have a chance to improve operating margins by 60 percent, McKinsey projects.
...
"Data has always been important in the underwriting process, but now the depth and breadth of available data has led to a dramatic increase in focus. The quality of data can be a key factor in securing coverage, in obtaining the best possible terms and conditions, and in setting equitable premiums. On behalf of our clients, we collect and collate data that we then present to insurance markets and…
daturkel · 2025-12-16
Thanks! Optimization was something I'd played with in previous rounds of coding up AYTO simulations, but not in the most recent version. (See the bottom section of this notebook [0]). There's also a very thorough treatment of the problem in a blog post from 2018 by SAS (the software company) [1]. It's surprising how many people have been drawn in by the allure of AYTO!
[0]: https://github.com/daturkel/pyto/blob/master/AYTO_S8.ipynb [1]: https://blogs.sas.com/content/operations/2018/08/14/are-you-the-one/
sponaugle · 2024-08-28
I believe they do.
https://blogs.sas.com/content/iml/2015/03/12/digits-of-pi.html
mikhailfranco · 2024-03-02
The title words remind of an unrelated fact, Gershgorin Disks:
The eigenvalues of any N x N matrix, A, are contained in the union of N discs in the complex plane. The center of the i_th disc is the i_th diagonal element of A. The radius of the i_th disc is the absolute values of the off-diagonal elements in the i_th row. https://blogs.sas.com/content/iml/2019/05/22/gershgorin-discs-location…
It's rather remarkable, unexpected, and perhaps shocking, when you first hear it. There does not seem to be enough information to make it true. But it is.
I used it in a real project to cancel noise.
elijahparker · 2023-12-21
Map of paraquat usage in the US: https://blogs.sas.com/content/graphicallyspeaking/2021/05/07/creating-…
eigenvalue · 2023-08-23
Yeah, there are some good survey articles that review various methods. Here are some links you can check out:
https://cloud.r-project.org/web/packages/correlation/vignettes/types.h…
https://juniperpublishers.com/bboaj/pdf/BBOAJ.MS.ID.555795.pdf
https://www.stats.ox.ac.uk/~cucuring/Lecture_2_Correlations_Dependence…
https://blogs.sas.com/content/iml/2021/04/28/compute-hoeffding-d-stati…
Essentially, cosine similarity just measures the extent to which the vectors point in the same direction in N dimensional space. That turns out to be quite discriminative when N is very high (i.e., over 1000). But it is not as good for finding complex non-linear relationships.
jejeyyy77 · 2023-06-07
The truth is Canada is actually not very big when you consider only a tiny strip above the US border is livable, and over 50% of the population live below this line: https://blogs.sas.com/content/graphicallyspeaking/files/2021/10/canada…
apwheele · 2023-02-09
Due to the curse of dimensionality, more of the points are pushed toward the hull in higher dimensions. So I don't think this is likely to be very effective as a data exploration technique as stated.
There may be more general expected value formulas for higher dimensions, I only know of examples in two-dimensions offhand, https://blogs.sas.com/content/iml/2021/12/06/expected-number-points-co…
There may be smarter reduced form embeddings though to make pretty pictures, e.g. https://www.youtube.com/watch?v=sD-uDZ8zXkc&ab_channel=CynthiaRudi…
gadders · 2022-09-01
Bostonian · 2022-07-22
The sweep algorithm for computing least-squares multiple regression coefficients for all subsets of predictor variables -- see https://blogs.sas.com/content/iml/2018/04/18/sweep-operator-sas.html .
istjohn · 2022-04-01
Maybe. The digits of pi appear to be completely random, in which case it would contain every finite sequence of digits, but it hasn't been proven. See: https://blogs.sas.com/content/iml/2015/03/12/digits-of-pi.html
lm28469 · 2020-02-11
> Why we can't stop travelling?
Way too many things/people depend on traveling. You can't stop the world for such a small thing. We should take precautions, probably more than what we do now, but stopping the world isn't going to work.
Don't fall for the fear mongering too, it kills less than the flu: https://blogs.sas.com/content/graphicallyspeaking/files/2019/03/flu_in… and has a death rate of 2%. It's serious but not end of the world serious.
arayh · 2018-09-21
Here's a brief look into the distribution of the digits of pi if you're interested: https://blogs.sas.com/content/iml/2015/03/12/digits-of-pi.html
Summary: It's "seems" quite random, but has yet to proven as such.
barry-cotter · 2017-12-10
IQ is fat tailed.
https://en.m.wikipedia.org/wiki/Fat-tailed_distribution
I regret I can’t find anything on Bing but the below but Google’s blocked where I am.
https://blogs.sas.com/content/iml/2014/10/13/fat-tailed-and-long-taile…
There are some other cases where it is generally thought that the distribution is normal, but it is not (in real samples). IQ has too many people in both far ends and has a different shaped tail on the right and left (the maximum is 200 or so, but the minimum is about 40). Weight of adults also has too many in the right tail and is not fully symmetric, but its right tail is also long (unlike that for IQ).
avar · 2024-04-07
Air conditioning wasn't invented until 1902, and didn't start seeing wide deployment in the US until the 1960s[1].
I'll leave the comparison to the historical population of the states you mentioned as an exercise for the reader. I'll just say that I don't think you can convincingly argue that AC is required for human habitation in those places.
Have you traveled much outside the US? There's plenty of places (e.g. in Africa and the middle-East) that are much hotter than that, and where AC is a rare luxury.
If you don't have AC there's plenty of places in the US where you wouldn't really need heating either, or perhaps only a small space heater.
Once you're at that point you'd drop all the fixed cost of having a heat pump setup. So no ducting etc. Don't take my word for it, read the article we're discussing here.
But yes, if you've already paid for the fixed cost of installing all of the infrastructure required to have AC throughout your house the marginal cost of adding just the cooling component itself is trivial.
But that's a really strange point to make, why would anyone want that if we're discussing dropping AC (for cost comparison purposes)?
If you only want heating then running water-heated radiators on a closed loop is much cheaper. That's what we do in the parts of Europe that only really need heating, and not cooling.
That or electric radiators, as is ubiquitous e.g. in Norway. The water-based systems are better if you're heating them with gas.
Having said…
bordercases · 2018-06-15
Personal observation? Shucks. What do you think is distinct about your local sample (your network) that would not make it representative? What about all the data that dating websites have been sitting on for ages?
https://blogs.sas.com/content/sastraining/2014/10/16/how-do-men-rate-w…
Observations like that have been rotating in that market for awhile, including with big players like OKCupid. Women are picky, men are not, but with contraception women can afford to share, resulting in skew.
What you're observing is the criterion for attraction looks like they're grounded in compassion, but that doesn't serve as an explanation against the distribution and is instead subservient to it. For example, it could potentially reflect to what extent men are compassionate is somehow on a Pareto distribution, which isn't out of the question. But considering that this trend holds on websites such as Tinder as well as OKCupid, it seems to be general to all female preference regardless if they're going for carnal or intimate pleasures.