It is not possible
If you are looking for the implementation of PIN based login as in Windows, then Ubuntu has no such thing.
Microsoft says their PIN based login is more or equally secure as compared with passwords. I have no idea if it is true or how it works. However, it is not implemented in Ubuntu or in Linux in general.
See this question in StackExchange for more on Windows PIN implementation.
An alternative
I do not recommend setting up a 4 digit numeric password. Those are easy to crack in a second using brute force. For example, Go to How secure is my password? and enter any 4 digit PIN and see what it says.
You can set up Ubuntu to login automatically when it boots. It is not the same as PIN based login, but it will save you typing the password first thing when you turn on the computer.
To turn on Automatic Login for you. Go to Settings > Users. Make sure you are the user. In the picture below I have three users. You don't want to choose the wrong user.
Second Step: Click on the Unlock button on top right, and enter your password when prompted.
Third Step: slide the **Automatic Login switch to the On position. It is Off in the picture.
You will still need the password for administrative tasks, like the Unlock button in the above picture. This is another difference between Windows and Ubuntu. In Windows you may not be asked for password when you need administrative privileges. Windows may just ask you to click Yes or No. In Ubuntu you will need to enter your password in those cases. This is what makes Ubuntu more secure than Windows.
Hope this helps