hang by a thread vs try one's luck

hang by a thread

verb
  • To be in danger, calling for precise caution; to be in a precarious situation. 

try one's luck

verb
  • To make a risky attempt. 

How often have the words hang by a thread and try one's luck occurred in a corpus of books? (source: Google Ngram Viewer )