Monday, February 23, 2015

When are Statistics Jobs Posted?

One of the better websites that regularly posts Statistics jobs is this one at the Department of Statistics at the University of Florida. If you have ever looked for a postdoc, a faculty position, government job or applied statistician type-job in statistics, you have probably come across this website before.

As I am currently a postdoc, I was curious about two things: (1) What is the most frequent type job posted? Who is the target audience of this website? (2) If certain types of statistics jobs had a preferred target range over the academic year?

To do this, I enlisted the help of some wonderful R-packages from Hadley Wickham to help with the gathering of the data (rvest), cleaning the data (stringr, lubridate) and visualizing the data (ggplot2).  One caveat about this data is the website only posts the job postings from August 2014 until now.  The R code is available below in Rmarkdown and Markdown and in a gist.

For simplicity, I grouped the type of positions into four categories:

1. faculty = tentured or non-tenured faculty position including chairs, deans and department heads.
2. postdoc = postdoctoral fellows
3. lecturer = lecturer or instructor
4. statistican = a statistican whose primary role is data analysis or managing other data analysts.

The majority of statistics jobs posted on the UF website since August 2014 have been faculty positions.


Statistics job postings are fairly uniformly posted Mon-Fri on this UF website.


The frequency of the statistics job postings increase Sept - Nov.


This increase in the months Sept-Nov is mostly driven by academic faculty positions (not surprisingly).  If you are looking for postdoc positions, they tend to be more frequently posted after this time period.  Lecturer/Instructor positions are fairly uniform. Similarly, applied statistician jobs do not seem to have a peak range. 



Monday, February 16, 2015

Simple Sour Cream Muffins - Three Ways



Sour cream is an ingredient I love to use in baking. It can add a tart flavor and creamy texture to many, different baked goods! If you don't have sour cream on hand, I find greek yogurt is a good substitute too.

During the week day mornings, I'm always running behind schedule and do not have time to make oatmeal or eggs (which I love to do on the weekends).  I'm also one of those people that needs to eat something in the morning or otherwise I feel like lunch can never come soon enough.  Muffins have been my favorite breakfast because they are so portable and they freeze really well! Yes, you heard right! On the weekends I will make a batch or two of muffins and they will last me a good month.  Rather than paying $2-4 for a muffin every day, I take a muffin out of the freezer and pop it into the microwave for 30-45 seconds when I get to work.  Add a cup of coffee and I'm set until lunch!

Today I'm showcasing how sour cream can be used in a diverse set of muffins: blueberry, pumpkin and corn bread muffins.



Sour Cream and Blueberry Muffins

Ingredients:

- 3/4 cup granulated sugar
- 1/4 cup unsalted butter, room temp
- 2 large eggs
- 2 tsp vanilla extract
- 1/2 cup sour cream
- 2 1/4 cups all-purpose flour
- 1 1/2 tsp baking powder
- 1/2 tsp baking soda
- 1/2 tsp salt
- 1 1/2 cups blueberries, fresh or frozen



Recipe:

1) Pre-heat oven to 375. Grease 12 muffin tins or paper baking cups.

2) Mix sugar and butter. Add in vanilla extract, eggs and sour cream.

3) Mix together the flour, baking powder, baking soda and salt.  Add the dry ingredients to the wet ingredients, but do not over mix.

4) Fold in blueberries.  Spoon the muffin batter into the 12 muffin tins.

5) Bake at 375 for 18-22 mins. Let cool on a wire rack.

Optional: Add the zest of 1 lemon to make lemon blueberry sour cream muffins.  Add coarse white sparkling sugar for garnish.




Sour Cream and Pumpkin Muffins

Ingredients:

- 1/3 cup brown sugar
- 1/4 cup canola oil
- 1 tsp vanilla extract
- 3/4 cup pure pumpkin purée
- 1/2 cup sour cream
- 1 egg
- 1/2 cup all-purpose flour
- 1/2 cup whole-wheat flour
- 1/2 tsp baking powder
- 1/2 tsp baking soda
- 1/2 tsp ground cinnamon
- 1/4 tsp ground ginger
- 1/4 tsp salt
- 3 tbsp raw pumpkin seeds



Recipe:

1) Pre-heat oven to 350. Grease 12 muffin tins or paper baking cups.

2) Mix brown sugar and oil. Add in vanilla extract, egg, pumpkin puree and sour cream.

3) Mix together the flours, baking powder, baking soda, cinnamon, ginger and salt.  Add the dry ingredients to the wet ingredients, but do not over mix.

4) Spoon the muffin batter into the 12 muffin tins. Sprinkle on raw pumpkin seeds.

5) Bake at 350 for 20 mins. Let cool on a wire rack.




Sour Cream and Cornbread Muffins

Ingredients:

- 1/4 cup unsalted butter, room temp
- 3 tbsp granulated sugar
- 2 large eggs
- 1/2 cup sour cream
- 1/2 cup milk (I used almond milk as a substitute)
- 1 cup all-purpose flour
- 2/3 cup yellow cornmeal
- 1 1/2 tsp baking powder
- 1/2 tsp baking soda
- 1/2 tsp salt


Recipe:

1) Pre-heat oven to 425. Grease 12 muffin tins or paper baking cups.

2) Mix sugar and butter. Add in vanilla extract, eggs, milk and sour cream.

3) Mix together the flours, baking powder, baking soda and salt.  Add the dry ingredients to the wet ingredients, but do not over mix.

4) Spoon the muffin batter into the 12 muffin tins.

5) Bake at 425 for 15-17 mins. Let cool on a wire rack.





Finish with some jam or a big pad of butter!




Tuesday, January 27, 2015

Spicy Steamed Clams and Chorizo


Clams have to be one of the most classic New England dishes. Now that I'm living here, I've been exploring different recipes with clams. Sure, I could make traditional New England Chowdah, but I thought I would change things up a bit and make a recipe I came across the other day: Steamed Clams with Chorizo in White Wine Broth!  This not only sounded amazing, but let me tell you, it tasted even better! On a cold day, this will warm you right up.



Here's how you make it:

Ingredients: 
- olive oil, salt, pepper
- 2 chorizo links (each one around 3oz), diced into small piece
- 24 littleneck clams, soaked and scrubbed
- 1 onion, diced
- 4 garlic cloves, diced
- 1 sprig of rosemary, diced
- pinch of herbs de provenace 
- pinch of garlic powder
- pinch of cayenne pepper
- 3 large red potatoes (5-6 baby red potatoes), diced
- 1 cup white wine
- 2 cups of water (could add another 1 cup if you like more broth)
- parsley, chopped

Recipe: 

1) Soak and scrub the littleneck clams for 30 mins. Set aside the clean clams in a bowl. 


2) Dice the onion, chorizo, potatoes, rosemary, parsley and garlic. Set aside. 


3) Add 1 tablespoon of olive oil and brown the chorizo for 5 mins. When the chorizo is brown and crusty, spoon it out of the pan and set aside. 


4) In the same pan where the chorizo was browned, add the onion, rosemary and herbs de provence. Sauté for another 5 mins until the onions are soft.  Add the garlic and sauté for 1 min. 


At this point, it might be a good idea to get some bread toasting.  I make a wheat sourdough bread on the weekends and then pull out slices of it from the freezer whenever I want bread. Just pop it in the toaster and the bread is ready to go!


5) Next, add the white wine and let reduce by half.  Season with garlic powder, cayenne pepper, salt and pepper.  Add the water, potatoes and chorizo. Bring to a boil.


6) As soon as the white wine broth is boiling, add the clams to the pot.  Put the top on and let the clams steam for 8-10 mins.  


Finish with adding fresh parsley to the broth.  Serve with warm, crusty bread. Perfect for a cold, snowy day like today.




Thursday, December 11, 2014

Heath Bar Saltine Toffee Bark



We had a bake sale in the office a few weeks ago that inspired this post!  I tried this dessert which is essentially saltines covered in toffee, chocolate. That just sounds amazing, right? The good news it tastes just as amazing! The salty crackers pair so well with the crunchy toffee and sweet chocolate.  You can also top it with whatever topping you like! For this recipe, I topped the saltine toffee bark with heath bars and colored sugar.

As we are now in midst of the holiday season, I hope this inspires you to bring it to a holiday party or gathering.  It is even a perfect treat for gifts to the people you have no idea what to buy.

Ingredients: 
- 2 packs of salted saltine crackers 
- 1 cup unsalted butter (2 sticks)
- 1 cup brown sugar
- 2 cups semi-sweet chocolate chips
- optional toppings: heath bar, peanuts, pecans

Note: You can use unsalted saltines and salted butter or salted saltines and unsalted butter (not both!)

Recipe: 
1) Preheat the oven to 400F. Double line a cookie sheet with aluminum foil (you definitely want the double lined part, trust me).  Add saltine crackers to the cookie sheet in a flat layer. 


2) Melt the butter and sugar together in a sauce pan over medium heat.  Bring it to a boil and let it boil for 3 minutes.  You do not need to stir once the mixture comes to a boil.  At this point, the toffee is ready to go!


3) Pour the toffee over the saltines and spread it out evenly.  Bake for 6 minutes in a preheated oven at 400F.  This is what the toffee and saltines should look like when it comes out of the oven. Bubbly magic.


4)  At this point, the toffee is incredibly hot, so be careful to not burn yourself.  Add the chocolate chips evenly across the toffee while it is still hot.  After a few minutes, the chips will have started to melt.  


5) Spread the melted chocolate across with a knife. Let the chocolate cool for 5 minutes.


6) After five minutes, add a layer of toppings.  Here I used a chopped up heath bar and red & white sugar.  Let the pan cool at room temperature for 20-30 minutes. Afterward you can put the pan in the refrigerator to set up and firm up even more.




After the chocolate toffee has cooled, break it up into giant pieces of bark and enjoy! 


Friday, December 5, 2014

quantro

The last year Rafa (@rafalab) and I have been hard at work on an R-package called quantro that can help you decide on how best to normalize your noisy high-throughput data such as DNA methylation, RNASeq and ChIPSeq. One of the most successful and widely applied multi-sample normalization methods, quantile normalization, is a global normalization method and based on a set of assumptions that are not always appropriate depending on the type and source of variation. Until now, it has been left to the researcher to decide if these assumptions are appropriate.  quantro is a data-driven method to test for the assumptions of global normalization methods and helps researchers decide on "when to use quantile normalization?".

I am happy to announce quantro was accepted as an R-package in the Bioconductor 3.0 release this fall and a pre-print of the manuscript has been posted on bioRxiv today!    There is vignette is available to give an example of how the package works using the FlowSorted.DLPFC.450k data package in Bioconductor.

Friday, November 28, 2014

Almond Biscotti



Every Christmas, one of the must-haves around our house is biscotti! These a delicious twice-baked cookie that come in many different colors and flavors.  Over the years we have tried many different types, but one of my favorites is the classic almond biscotti. Every Christmas morning we all wake up, head down stairs, each make a big, hot cup of coffee (or tea) and sit down to open our stockings.  By the time the coffee has cooled just enough, we find that Santa has left a personal bag of biscotti in each of our stockings! It's like he can read our minds. :)

This year I set out to learn how to make almond biscotti.  If you are like our family, you will love this recipe!

Ingredients: 
- 1 cup whole almonds (with skin, toasted, chopped)
- 1 cup sugar
- 1/2 cup unsalted butter (room temperature) 
- 1 tsp vanilla extract
- 2 tsp almond extract
- 3 tbsp brandy
- 3 eggs
- 2 3/4 cups all-purpose flour
- 1 1/2 tsp baking powder
- 1/4 tsp salt

Recipe: 

1) Start by toasting almonds in a pan for 5-10 mins until light brown and fragrant. Let cool completely and coarsely chop. 


2) Mix together sugar and butter for 2 mins until light and fluffy.  Add brandy, vanilla extract, almond extract and eggs.  In a separate bowl mix together flour, baking powder and salt.  Add 1 tsp of the flour mixture to the coarsely chopped almonds.  This helps the almonds hold into their place. Slowly add the flour mixture to the wet mixture.  Finally, add the almonds to the dough.  Cover and refrigerate dough for 30 minutes.

3) Preheat oven to 350F.  One an un-greased baking sheet, shape dough into two loaves where each loaf is almost the entire length of a cookie sheet (2inches by 16inches). If the dough is sticky, use a little bit of water to help the dough from sticking to your hands.


4) Bake the loaves for 30 minutes. Transfer baked loaves to a cooling rack and let cool for 15 minutes.


5) Using a serrated knife, cut the loaves into 1/2 inch to 3/4 inch slices (I like mine on the thinner side, but this is a personal preference thing).


6) Place the slices baking on the baking sheet and bake for another 20 minutes at 350F.  Transfer the delicious, warm biscotti cookies to a cooling rack.



These will last for up to a week in a sealed container.  I think the flavor intensifies over the next day or so.  Personally, my favorite way to enjoy them is with a nice cup of tea.  Either way just try to restrain yourself from eating them all at once. :)



Monday, November 3, 2014

Halloween Trick-or-Treaters as a Poisson Process

Usually this time of the year I'm blogging about some Halloween-themed cookie recipe or jack-o-lanterns (and roasted pumpkin seeds yum!). This year I thought it would be fun to discuss the idea of a Poisson process and use Halloween as an example.  In this blogpost, I will simulate the number of trick-or-treaters as a Poisson process!



Generally speaking, a Poisson process is a continuous-time process ${N(t), t \geq 0}$ where $N(t)$ counts the number of events that occur in a time interval [0, $t$] and the inter-arrival time of these events in a given time interval. In our case, we can think the Poisson process counting the number of trick-or-treaters in a given time interval. Specifically a Poisson process is characterized by the following properties:
  1. The number of events at time $t$ = 0 is 0 (or $N(0) = 0$)
  2. Stationary increments: the probability distribution of $N(t+h) - N(t)$ depends only on $h$ (not $t$). This means the probability of observing a certain number of trick-or-treaters in a given time interval depends only on the length of the time interval (e.g. 1hr).  
  3. Independent increments: the number of events occurring in disjoint time intervals are independent of each other. You can think of this as the number of trick-or-treaters we see from e.g. 5:30-6:30pm doesn't influence the number of trick-or-treaters we see e.g. 7:30-8:30pm. 
  4. $N(t)$ is distributed as a Poisson distribution.  
Assuming these four properties, we immediately get a free piece of information:
  • Inter-arrival times between the events (or "waiting times") are independent and identically distributed as an exponential random variable with a given rate parameter. Therefore to simulate a Poisson process all we have to do is simulate the inter-arrival times between events using an exponential distribution.  
Now, there are several types of Poisson processes, but for our purposes I will discuss on two: (1) a homogeneous and (2) inhomogeneous Poisson process. The main difference between the two is the rate at which the events occur.  In the homogeneous Poisson process events occur at a constant rate $\lambda$.  In the inhomogenous Poisson process, events occur at a variable rate $\lambda(t)$.  
  • homogenous Poisson process: 
    • The probability of one event in a small interval $h$ is approximately $\lambda h$ where $\lambda$ is a rate parameter. The probability of two events in a small interval is approximately 0.
$$N(t) \sim Poisson(\lambda t)$$
$$P[N(t + s) - N(t) = k] = \frac{e^{-\lambda s} (\lambda s)^{k}}{k!}$$

If we define $S_k$ as the arrival time of the $k^{th}$ events and $X_k = S_k - S_{k-1}$ as the time between the $k^{th}$ and $k-1$ arrival time, then 

$$P(X_k > t | S_{k-1} = s) = e^{-\lambda t}$$
  • inhomogenous Poisson process: 
    • The difference is here the rate parameter varies over time: $\lambda(t)$.  This means we no longer have stationary increments as above because the number of events observed in a given time interval depends on the length of the interval AND the time $t$ itself.  
Let's try an example. Let's simulate the number trick-or-treaters using a homogeneous Poisson process with rate parameter $\lambda$. Using this blogpost as an estimate for the number of trick-or-treaters per minute, I estimated there are 1-2 trick-or-treaters per minute.  As stated above, to simulate the Poisson process, I will simulate the inter-arrival times of the trick-or-treaters using an exponential distribution. The cumulative distribution function of an exponential random variable $T$ is given by

$$u = F(x) = 1 -e^{-\lambda t}$$

As a little background reading, here are two sets of notes on simulating a Poisson process which are particularly useful: here and here.  If the hours for trick-or-treating are around 5:30-8:30pm, the inter-arrival times $X_k$ can be simulated $u \sim U[0,1]$, then we can solve solve for $t$:

$$t = - \frac{\log(u)}{\lambda}$$



One nice extension of this example would be to an inhomogeneous Poisson process where the rate at which the trick-or-treaters arrive varies across time.  I'll leave it to you to try.  Hope everyone had a safe and happy Halloween!