You can find it here:
float d= (float) ((number*5) /100);
RatingBar rb = (RatingBar) findViewById(R.id.ratingBar1);
rb.setRating(d);
And on your layout:
<RatingBar
android:id="@+id/ratingBar1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:isIndicator="true"
android:max="5"
android:stepSize="0.01" />